achiurizo / consular

Terminal automation
http://rdoc.info/github/achiu/consular/master/file/README.md
MIT License
813 stars 46 forks source link

Building native extensions error on Ubuntu #78

Closed snitko closed 12 years ago

snitko commented 13 years ago
~ $ gem install terminitor
Building native extensions.  This could take a while...
ERROR:  Error installing terminitor:
ERROR: Failed to build gem native extension.
/home/roman/.rvm/rubies/ree-1.8.7-head/bin/ruby extconf.rb
create /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile

make
Makefile:184: warning: overriding commands for target `/home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/lib'
Makefile:182: warning: ignoring old commands for target `/home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/lib'
gcc -I. -I/home/roman/.rvm/rubies/ree-1.8.7-head/lib/ruby/1.8/x86_64-linux -I/home/roman/.rvm/rubies/ree-1.8.7-head/lib/ruby/1.8/x86_64-linux -Isrc   -fPIC -g -O2  -Wall  -c src/SendThreadSafe.c
In file included from src/SendThreadSafe.c:75:0:
src/SendThreadSafe.h:73:53: fatal error: ApplicationServices/ApplicationServices.h: No such file or directory
compilation terminated.
make: *** [SendThreadSafe.o] Error 1

Gem files will remain installed in /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1 for inspection.   
Results logged to /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/./gem_make.out
achiurizo commented 13 years ago

thanks for the report. i'm in the middle of cleaning up the gem to better handle the different cores. I'll push it out soon.

bergalath commented 13 years ago

I have exactly the same issue (v 0.6.0) on LinuxMint 11 (Ubuntu 11.04 based). FWIW, as a workaround in the meanwhile, just ignore the Terminitor’s gem dependencies and install them manually :

gem install terminitor --ignore-dependencies
gem install ruby-dbus 
gem install thor -v "~>0.14.0"
gem install github -v "~>0.6.2"

And don’t forget to install xdotool for Terminator :

sudo apt-get install xdotool

Then, let’s go :

terminitor init

Bingo ;o)

snitko commented 13 years ago

bergalath, thanks a lot, I'll try that!

snitko commented 13 years ago

Ok, I did what you said, installed all the gems manually and here's what I got:

$ terminitor init
/home/roman/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rb-appscript (~> 0.6.1)

Unfortunately rb-appscript wouldn't install, because it is probably something macosx-specific which cannot build native extensions under Linux.

bergalath commented 13 years ago

You’re completely right, rb-appscript is MacOS X specific stuff, as you can see in the terminitor.gemspec file from line 17 to 28 : https://github.com/achiu/terminitor/blob/master/terminitor.gemspec#L17 But it should be ignored by RubyGems as the value of your RUBY_PLATFORM is not supposed to contain 'darwin'. That’s why ignoring the dependencies should have avoid the problem. So, to be sure, I went from scratch with a new gemset and it also worked : then I think it should be related to your environment. My setup is RVM 1.6.20 with ruby-1.9.2-p180 and RubyGems 1.6.2. After creating the new gemset the only gem installed is rake 0.8.7. So, try again after updating your RubyGems’ version to RVM’s default 1.6.2 (gem update --system 1.6.2 should do it). As I just came back from Ruby Lugdunum 2011, my mind is pretty blurred and asleep, so I hope it’s clear enough and it helps you. Let me know ;o)

snitko commented 13 years ago

Yes indeed, it works with rubygems 1.6.2, but not with rubygems 1.8.5. Any ideas why?

bergalath commented 13 years ago

Well, not really. I know there has been a lot of struggles about RubyGems lately with deprecations and release management above all, but that’s all. So, if you want to learn more, I recommend following Gregory Brown’s blog. You can also follow him on twitter as @seacreature and on github as @sandal. I’m sure he could inform you better than me … :o)

sid137 commented 13 years ago

I managed to install it on Ubuntu with this tweak https://github.com/achiu/terminitor/pull/85

achiurizo commented 12 years ago

i did a rewrite of terminitor renamed to consular. It breaks out the mutli core functionality into its own gem and does some additional clean up. for those that want to use the Terminator core, you can check out consular-terminator or this for just the gnome-terminal. Let me know if this works for you guys. thanks!