From: Daniel Berger Date: 2007-10-19T03:30:06+09:00 Subject: Re: rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml On Oct 18, 12:09 pm, Mauricio Fernandez wrote: > On Fri, Oct 19, 2007 at 12:26:04AM +0900, Daniel Berger wrote: > > > You didn't > > > make opt.opt > > > (or make world.opt) when you built ocaml-3.10.0, did you? > > > Ok, I did make world.opt and reinstalled. Then I rebuilt camlp5 with > > "transitional". Now it seems I'm missing some header files: > > > >make > > ocamldep.opt rubyOCamlUtil.ml > .depend > > cc -I. -I/usr/local/lib/ruby/1.8/sparc-solaris2.10 -I/usr/local/lib/ > > ruby/1.8/sparc-solaris2.10 -I. -KPIC -g -c foo_rocaml_wrapper.c > > "foo_rocaml_wrapper.c", line 14: cannot find include file: > mlvalues.h> > [...] > > > I don't think OCaml's installation instructions could be any more > > confusing. What option did I miss? > > I'm sorry for all the issues and appreciate your patience. The basic problem > is that I'm using Debian and everything Just Works(TM) with its OCaml > packages, so it is harder for me to anticipate problems like those you ran > into. I see that you're using Solaris, which adds further uncertainty because > I'm not sure its linker can build shared objects with non-PIC code [1]. Some > magic incantations in the form of $LDFLAGS might be required. You're stepping > on new ground :) It would seem so. Your one line patch to rocaml_extconf.rb worked (thanks!), but now I get this: irb(main):002:0> require 'foo' LoadError: ld.so.1: ruby: fatal: relocation error: file /export/home/ djberge/src/ruby/rocaml-0.6.1/foo.so: symbol __muldi3: referenced symbol not found - /export/home/djberge/src/ruby/rocaml-0.6.1/foo.so from /export/home/djberge/src/ruby/rocaml-0.6.1/foo.so from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from (irb):2 This is Sun Studio 12 on Sparc/Solaris 10, btw. I already tried installing a gcc add-on found here: http://cooltools.sunsource.net/gcc/ No joy. Any ideas? Oh, and these warnings showed up during the build. Dunno if you're interested: "foo_rocaml_wrapper.c", line 61: warning: statement not reached "foo_rocaml_wrapper.c", line 68: warning: statement not reached "foo_rocaml_wrapper.c", line 338: warning: statement not reached "foo_rocaml_wrapper.c", line 388: warning: statement not reached "foo_rocaml_wrapper.c", line 438: warning: statement not reached "foo_rocaml_wrapper.c", line 485: warning: statement not reached "foo_rocaml_wrapper.c", line 532: warning: statement not reached "foo_rocaml_wrapper.c", line 582: warning: statement not reached "foo_rocaml_wrapper.c", line 632: warning: statement not reached "foo_rocaml_wrapper.c", line 681: warning: statement not reached "foo_rocaml_wrapper.c", line 730: warning: statement not reached "foo_rocaml_wrapper.c", line 779: warning: statement not reached "foo_rocaml_wrapper.c", line 829: warning: statement not reached Regards, Dan