-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to install "eventmachine" both from gem and build #186
Comments
After cloning, do
and then
to build a gem. Now on to installation:
will also install it but it uses sudo. If you are running RVM, for example, and not really installing gems system-wide, install it via
Your pastie suggests that gem failed to build it's C++ extension. Can you post contents of /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/ext/gem_make.out up? |
After cloning I get up to And /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/ext/gem_make.out file content here : http://pastie.org/private/q9sa5dovdxdoajxdotctg |
Sorry for stupid question but are you sure you have all the build toolchain installed? g++ (part of gcc) and libstdc++6 package? I see a blog post that demonstrates the same issue (even though that is on OS X) and the solution seems to be editing extconf.rb to force g++ usage. Try what is in that post but I suspect that something from the C++ build toolchain is missing from your system. |
It's not a problem. Well I have already installed mingw32 and libstd++6 and libconfig8-dev before doing all this. Cause if I hadn't done it then |
I see. try exporting CXX="g++"? |
still not working :( |
You are missing |
Oops, should have looked closer. You're not even on OSX. Something is screwy with your build chain or ruby installation. What is your |
Well sorry, I must have told you this part of the story too. my /home/surya/.rake-compiler/config.ymlrbconfig-1.8.7: /home/surya/.rake-compiler/ruby/ruby-1.8.7-p330/lib/ruby/1.8/i386-mingw32/rbconfig.rb I know I should not do something like this. But is there any way to get rid off all from this? |
How did you install @luislavena: any ideas? |
I had followed this blog : https://help.ubuntu.com/community/RubyOnRails |
What distribution are you running that includes a |
@tmm1 1.8.8 is not even released, how on earth it got installed? See here http://ftp.ruby-lang.org/pub/ruby/1.8/ no releases And Ruby Core decided not to release 1.8.8 at all Now, rake-compiler will affect @SuryaTripathi the cross compilation part is only required when cross compiling to Windows, which I think you don't need it, why you did that in the first place? None of this makes any sense. Which version of Ubuntu are we talking about? 11.04? Sorry, but I can't believe that. |
@luislavena I think there is no cross-compilation going on and @SuryaTripathi understands that. What it comes down is some Linux build chain (or environment setup) deficiency that prevents EM reactor from compiling. I personally think it is not even 1.8.8-specific. Sorry that we bothered you ;) @SuryaTripathi, try this: in EM git repository on your server, run
which will generate Makefile in the repository root. Now if you run make from the repository root, C++ extension will compile just like it does upon gem installation. At the very least, post that Makefile to pastie or gist.github.com. |
@michaelklishin seems it was as Anyhow, can @SuryaTripathi try this? which g++ Seems to me from the make output that g++ executable is not set properly, perhaps |
All I used to get stuck is on this command: @luislavena I did compilation at the first place cause it were asking for the same I got this error before installing rake-cmpiler: no such file to load -- rake/extensiontask, and when I installed rake-compiler it again puzzled me with this: rake-compiler must be configured first to enable cross-compilation you may see the rake build --trace here: http://pastie.org/private/rbo9phabe1xochspnu5g I don't know but it is(ruby-1.8.8-p1) on my system and running fine before I wasn't trying to install eventmachine, I had installed it on 2011-01-19(yyyy-mm-dd) . I am using Ubuntu 10.10, the Maverick Meerkat - released in October 2010. This is my gem ENV:
I don't know what kind of issue I'm facing cause there is no reference out there on internet for this :( If you still don't believe that I have ruby-1.8.8 then you are welcome to share my system and may try out things by yourself! I think I need to do everything from scratch now, well I'll close this issue if installing from scratch worked, else guys I will let you know the issue came with it.. If you have any suggestion or any idea you think can work then kindly let me know.. |
@michaelklishin I got the make file here it is: http://pastie.org/private/ukxw63lghqacyiqpnrfnbg @luislavena |
@SuryaTripathi @michaelklishin @tmm1 line 43 of this pastie is the guilty one: http://pastie.org/private/ukxw63lghqacyiqpnrfnbg For some reason is not being referenced to |
@luislavena should I try |
@SuryaTripathi please do, it should work, however, that does not explain why is failing in the first place. |
@luislavena here is the log of |
@tmm1 see above, it did compile, so the issue is why CXX was added to the Makefile empty. Leave that to you guys now that I cleared rake-compiler's fame ;-) |
@michaelklishin I think there are some issues with |
@SuryaTripathi for whatever reason, on your system CXX Makefile variable is blank. If you fire up irb and run
what are values of CONFIG['CC'] and CONFIG['CXX']? |
Also, lets see what RbConfig looks like:
|
@michaelklishin Here are the irb results: rbconfig isn't loading, any guess? surya@surya-desktop:~/Desktop/Surya/Projects/eventmachine$ irb irb(main):001:0> require 'mkmf' => true irb(main):002:0> puts CONFIG['CC'] gcc => nil irb(main):003:0> puts CONFIG['CXX'] nil => nil irb(main):004:0> require "rbconfig" => false |
No reason to worry: it does load, false returned by Kernel#require means that the file was already loaded (presumably by mkmf under the hood). From my irb: ruby-1.9.2-p180 :001 > require 'mkmf' => true ruby-1.9.2-p180 :002 > require 'rbconfig' => false ruby-1.9.2-p180 :003 > RbConfig => RbConfig ruby-1.9.2-p180 :004 > CONFIG['CXX'] => "g++" and to prove that mkmf loads rbconfig under the hood: ruby-1.9.2-p180 :001 > require 'mkmf' => true ruby-1.9.2-p180 :002 > CONFIG['CXX'] => "g++" RbConfig contents is a reflection of what environment looked like when Ruby was compiled. CXX variable wasn't set. I guess you are running a binary package and this is something inherited from whoever built the package. You can edit extconf.rb and set CONFIG['CXX'] to "g++", then run
again to regenerate Makefile. Then see if make works. |
Great it worked! I put this: CONFIG['CXX'] = "g++"in /eventmachine/ext/extconf.rb and /eventmachine/ext/fastfilereader/extconf.rb files, right below require 'mkmf' line.
then I did: @michaelklishin, @tmm1 and @luislavena for your time and great support! This issue is resolved now! Great work :) |
Bump |
I am trying to install eventmachine by command: gem install eventmachine and it is giving me this error at the end:
make: shared: Command not found
make: [rubyeventmachine.so] Error 127 (ignored)
/usr/bin/install -c -m 0755 rubyeventmachine.so /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib
/usr/bin/install: cannot stat `rubyeventmachine.so': No such file or directory
make: *** [/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/rubyeventmachine.so] Error 1
you may review whole log here: http://pastie.org/private/ebiehjoa23klhec6hurmg
And when I tried to grab and build like this:
git clone git://github.com/eventmachine/eventmachine.git
cd eventmachine
rake build
at rake build it is prompting following error:
surya@surya-desktop:~/Desktop/Surya/Projects/eventmachine$ rake build
(in /home/surya/Desktop/Surya/Projects/eventmachine)
rake aborted!
Don't know how to build task 'build'
(See full trace by running task with --trace)
surya@surya-desktop:~/Desktop/Surya/Projects/eventmachine$
Can you kindly suggest me any possible way to solve this issue?
Thanks
Surya
The text was updated successfully, but these errors were encountered: