|
From: Brian M. <mcc...@fo...> - 2003-09-10 17:31:46
|
Doing static build
It errors linking to a .so, go figure.
----------------------
DynamicLibrary.LinkUsingFileList
/Users/mccallister/work/rubycocoa-0.4.0/framework/build/
RubyCocoa.framework/Versions/A/RubyCocoa
/usr/bin/gcc2 -o
/Users/mccallister/work/rubycocoa-0.4.0/framework/build/
RubyCocoa.framework/Versions/A/RubyCocoa
"-L/Users/mccallister/work/rubycocoa-0.4.0/framework/build"
"-L/Users/mccallister/opt/apps/ruby-1.8.0/lib"
"-F/Users/mccallister/work/rubycocoa-0.4.0/framework/build" -filelist
/Users/mccallister/work/rubycocoa-0.4.0/framework/build/
RubyCocoa.build/RubyCocoa.build/Objects-normal/LinkFileList
"-framework" "Cocoa" "-lruby-static" "-arch" "ppc"
"-Wl,-single_module" "-dynamiclib" "-compatibility_version" "1"
"-current_version" "1" "-undefined" "suppress" "-flat_namespace"
-install_name "`echo
"/Library/Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa" |
/usr/bin/sed 's!//*!/!g'`"
ld: table of contents for archive:
/Users/mccallister/opt/apps/ruby-1.8.0/lib/libruby-static.a is out of
date; rerun ranlib(1) (can't load from it)
/usr/bin/libtool: internal link edit command failed
...failed DynamicLibrary.LinkUsingFileList
/Users/mccallister/work/rubycocoa-0.4.0/framework/build/
RubyCocoa.framework/Versions/A/RubyCocoa ...
** BUILD FAILED **
setup failed
'system pbxbuild' failed
try 'ruby install.rb --help' for usage
the inspect-ruby results
[mccallister@kite ~/work/rubycocoa-0.4.0]$ruby inspect-ruby.rb
VERSION: "1.8.0"
$LOAD_PATH:
["/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby/1.8",
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby/1.8/powerpc-
darwin", "/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby",
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/1.8",
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/1.8/powerpc-darwin",
"."]
----
CONFIG[LIBRUBY]: "libruby-static.a"
CONFIG[LIBRUBYARG_SHARED]: ""
CONFIG[LIBRUBY_ALIASES]: "libruby.so"
CONFIG[LIBRUBY_SO]: "libruby.so.1.8.0"
CONFIG[LIBRUBYARG_STATIC]: "-lruby-static"
CONFIG[LIBRUBYARG]: "-lruby-static"
CONFIG[LIBRUBY_DLDFLAGS]: ""
CONFIG[LIBRUBY_LDSHARED]: "cc -dynamic -bundle -undefined suppress
-flat_namespace"
CONFIG[LIBRUBY_A]: "libruby-static.a"
CONFIG[abs_srcdir]: "$(ac_abs_srcdir)"
CONFIG[sitedir]:
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby"
CONFIG[rubylibdir]:
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/1.8"
CONFIG[abs_builddir]: "$(ac_abs_builddir)"
CONFIG[builddir]: "$(ac_builddir)"
CONFIG[archdir]:
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/1.8/powerpc-darwin"
CONFIG[abs_top_builddir]: "$(ac_abs_top_builddir)"
CONFIG[srcdir]: "/Users/mccallister/work/ruby/ruby-1.8.0"
CONFIG[DESTDIR]: ""
CONFIG[sbindir]: "/Users/mccallister/opt/apps/ruby-1.8.0/sbin"
CONFIG[compile_dir]: "/Users/mccallister/work/ruby/ruby-1.8.0"
CONFIG[datadir]: "/Users/mccallister/opt/apps/ruby-1.8.0/share"
CONFIG[includedir]: "/Users/mccallister/opt/apps/ruby-1.8.0/include"
CONFIG[infodir]: "/Users/mccallister/opt/apps/ruby-1.8.0/info"
CONFIG[top_builddir]: "$(ac_top_builddir)"
CONFIG[sysconfdir]: "/Users/mccallister/opt/apps/ruby-1.8.0/etc"
CONFIG[mandir]: "/Users/mccallister/opt/apps/ruby-1.8.0/man"
CONFIG[libdir]: "/Users/mccallister/opt/apps/ruby-1.8.0/lib"
CONFIG[sharedstatedir]: "/Users/mccallister/opt/apps/ruby-1.8.0/com"
CONFIG[abs_top_srcdir]: "$(ac_abs_top_srcdir)"
CONFIG[oldincludedir]: "/usr/include"
CONFIG[sitearchdir]:
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby/1.8/powerpc-
darwin"
CONFIG[localstatedir]: "/Users/mccallister/opt/apps/ruby-1.8.0/var"
CONFIG[bindir]: "/Users/mccallister/opt/apps/ruby-1.8.0/bin"
CONFIG[sitelibdir]:
"/Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby/1.8"
CONFIG[libexecdir]: "/Users/mccallister/opt/apps/ruby-1.8.0/libexec"
----
/Users/mccallister/opt/apps/ruby-1.8.0/bin/ruby:
/usr/local/lib/libdl.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current
version 218.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 63.0.0)
otool: can't open file:
/Users/mccallister/opt/apps/ruby-1.8.0/lib/libruby.so.1.8.0 (No such
file or directory)
On Tuesday, September 9, 2003, at 09:31 PM, FUJIMOTO Hisakuni wrote:
> At Tue, 9 Sep 2003 12:33:47 -0400,
> Brian McCallister wrote:
>> [mccallister@kite /Developer/Examples/RubyCocoa]$ruby HelloWorld.rb
>> /Users/mccallister/opt/apps/ruby-1.8.0/lib/ruby/site_ruby/1.8/osx/
>> cocoa.rb:12:in `require': No such file to load -- osx/objc/cocoa
>
> This issue is FAQ, but the appropriate answer of this is not yet
> found out.
>
> Currently, clear things about this are:
>
> * The problem occurs in runtime when the libruby as a dynamic
> library is used to build RubyCocoa.framework.
>
> * Maybe, in this case, build of RubyCocoa.framework, IOW
> install.rb setup process, has finished incompletely. So the
> framework is corrupt really.
>
> * It is indistinct what kind of case this occurs in.
>
> * Nobody solves this. Or there is not a report of solution.
>
> * In my environment, I cannot experience this problem.
>
>
> A result of the below test may become hint about this:
>
> $ YOUR_RUBY_COMMAND install.rb --help
> $ YOUR_RUBY_COMMAND inspect-ruby.rb # the bottom of this email
>
> Or, specify the static libruby instead of a dynamic one in config
> phase. In this case, the problem would occur in setup phase;
> before runtime:
>
> $ YOUR_RUBY_COMMAND install.rb config YOUR_OPTIONS
> --libruby-path=FULL_PATH_OF_YOUR_LIBRUBY_A
>
> --
> Hisa
>
> ##### begin of "inspect-ruby.rb" #####
> require "rbconfig"
>
> def print_result(name, val)
> puts "#{name}: #{val.inspect}"
> end
>
> def inspect_config(pat)
> pat = Regexp.new(pat.to_s) unless pat.is_a? Regexp
> Config::CONFIG.keys.grep(pat).each do |key|
> print_result("CONFIG[#{key}]", Config::CONFIG[key])
> end
> end
>
> def otool(path)
> puts `otool -L #{path}`
> end
>
> print_result "VERSION", VERSION
> print_result "$LOAD_PATH", $LOAD_PATH
> puts "----"
> inspect_config(/libruby/i)
> inspect_config(/dir\Z/i)
> puts "----"
> otool(File.join(Config::CONFIG['bindir'],Config::CONFIG['RUBY_INSTALL_N
> AME']))
> otool(File.join(Config::CONFIG['libdir'],Config::CONFIG['LIBRUBY_SO']))
> ##### end of "inspect-ruby.rb" #####
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Rubycocoa-talk mailing list
> Rub...@li...
> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk
>
|