-
Notifications
You must be signed in to change notification settings - Fork 123
linking issues on gentoo-amd64 #8
Comments
The linking process works if I remove the statement |
if you have the rubyracer installed you can run
and it should run it through its paces. |
Same for me.
|
two questions:
|
|
|
{ ...byracer-0.9.4/bin }$ ./therubyracer but i have v8.so in therubyracer ext directory |
|
My problem totally solved - it is only gentoo ruby portage problem. Handy solution is to fix Config::CONFIG['LDFLAGS'] in rbconfig.rb to appropriate value. I think this is not related to the project and therefore must be closed. Thanks! |
What is a PR ? Tell me please and i'll do it ) |
PR == 'pull request'. Actually, it sounds like there is nothing that we can tweak in this project to make it just magically work, right? In that case, I am just going to add an entry in the README to this issue for future Gentoo users who may come across this issue. |
I have this line in rbconfig.rb CONFIG["LDFLAGS"] = "-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined" With your extconf lib will not build up, but with $LIBS << ' -lv8 -lpthread' All is compiled successfully. Before we have in make file: LIBS = $(LIBRUBYARG_SHARED) -lpthread -lpthread -lrt -ldl -lcrypt -lm -lc -lv8 and after LIBS = $(LIBRUBYARG_SHARED) -lpthread -lpthread -lrt -ldl -lcrypt -lm -lc -lv8 -lpthread
And one more - i think that #have_library('pthread') is explicit in extconf.rb in this case. I test it on ubuntu and gentoo (see above) on ubuntu with this ruby ldflags CONFIG["LDFLAGS"] = "-L. -rdynamic -Wl,-export-dynamic" i have working v8.so
Thanks for Yurial - the best C++ programmer i ever know |
I can now compile on Gentoo without error. I have not touched anything in my configuration, so I suppose the problem is now fixed? Anyway, the gem is working fine when I use it, but I cannot use $ therubyracer --selftest /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- spec_helper (LoadError) from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib64/ruby/gems/1.8/gems/therubyracer-0.9.4/spec/ext/array_spec.rb:1 from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run' from /usr/local/lib64/ruby/gems/1.8/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `autorun' from /usr/local/bin/therubyracer:19 I have rspec installed. |
gdelugre, please do selftest at gem_localtion folder where spec subfolder is situated. |
Thank you. |
Hey guys, |
according to @kalabiyau and @gdelugre, it is working fine for them, and they are using gentoo-amd64 |
I confirm, U can test my fork of therubyracer https://github.com/kalabiyau/therubyracer Please try and tell us what kind of problems will you have |
@cowboyd with the upstream gem I get the same error as above: @kalabiyau 's fork works like a charm, any plans on merging his changes in? I have a large amount of servers that need building and deploying of all the gems automatically, so fiddling the gem is not an option and I would like to avoid cloning @kalabiyau's version in order to keep up to date. |
@kalabiyau sounds to me like you can submit a pull request for this commit: @cowboyd feel like accepting this in exchange for beer? :P |
U can use it in gemfile like others but with git source, or U can make one gem builded on one server and deploy to anothers About merging - maybe @cowboyd will check my PR :) |
rubyjs/therubyracer#108 this one is done, but needs testing on other platforms - MacOS and freebsd |
ok, v0.9.6 released |
I am still having the same build problem on 0.9.6 under. EDIT: Installing directly from gems still fails with the same error. "bundle install" in my Rails dir still fails to link as above. |
Same here. |
weird. I merged his PR. What if you try this: |
Well, the following reproduces it reliably:
Also, this Gentoo build was made from stage3-amd64-20110929.tar.bz2 and a portage snapshot of 20110930. Ruby 1.9.2 installed via portage. EDIT: Same thing works for @kalabiyau's fork. |
As mentioned, I have in fact merged his fork into master, so I'm not sure what exactly the problem is. @kalabiyau, can you tell why master is not building? I don't have a gentoo box available for testing |
I have tested it. IMHO We must use -lpthread after the lv8 linkage LIBS = $(LIBRUBYARG_SHARED) -lrt -ldl -lcrypt -lm -lc -lv8 -lpthread Only one include of -lpthread after -lv8 usage - all is compiled well, but with your $LIBS << ' -lpthread' unless $LIBS =~ /-lpthread/ It will fail because of undefined errors It is save to append one pthread to the end and the first one to delete ? |
Ok, well we'll just revert my "optimization" have a look at 0.9.7 |
Now I get this on installation (through bundler):
|
It prevents the gem from being installed I should add. |
I believe that is a bug in either rubygems or in bundler |
Well I removed the Syck::DefaultKey things from the gemspec and it works now. |
see here
The text was updated successfully, but these errors were encountered: