Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

source install does not work on Ubuntu 10.04 with ruby 1.8.7 #23

Closed
cowboyd opened this issue Nov 15, 2011 · 21 comments
Closed

source install does not work on Ubuntu 10.04 with ruby 1.8.7 #23

cowboyd opened this issue Nov 15, 2011 · 21 comments

Comments

@cowboyd
Copy link
Collaborator

cowboyd commented Nov 15, 2011

http://travis-ci.org/#!/rubyworks/malt/builds/309576

@erisdev
Copy link

erisdev commented Nov 15, 2011

It seems that it won't work with any Ruby 1.8.7 because extconf.rb uses Gem::Version but doesn't require 'rubygems' anywhere. 👎 to that.

@cowboyd
Copy link
Collaborator Author

cowboyd commented Nov 16, 2011

Please check the the latest released version, especially before making negative comments.

https://github.com/fractaloop/libv8/commit/ec4bc3b60e609d44e60c743b27609c569a617418

@erisdev
Copy link

erisdev commented Nov 16, 2011

@cowboyd Has this actually been pushed to rubygems.org? I had to fix and install manually at the time I wrote that comment because the error was still there. I found this issue while looking for potential solutions. The stack trace for me was the same as the one on the other end of that link.

Call it a negative comment if you like; I was confirming what the problem was and that it wasn't specific to Ubuntu. C:

To clarify my situation a little, because I should have included this information in my initial comment:

  • Mac OS X 10.7.2
  • Ruby 1.8.7-p352
  • RubyGems 1.6.2
  • libv8 3.3.10.4—the version that I was getting from rubygems.org at the time

@cowboyd
Copy link
Collaborator Author

cowboyd commented Nov 16, 2011

It should be on rubygems.org as of version 3.3.10.4 Also, there should be binary gems for both 64bit and 32bit linux. Please let me know if this is not the case.

While thumbs down certainly does feel negative on reading, I take your word that you did not mean it that way.

Thanks for taking the time to participate in this issue.

@erisdev
Copy link

erisdev commented Nov 16, 2011

I'll admit my tone was probably a little brash; apologies for that.

I don't have a machine with Linux handy so I'm afraid I can't test the Linux binaries. I think the Mac version targets 10.6 and I'm not sure how to force it to install that one, so it defaults to from-source. :C

The change you pointed out doesn't appear to have been deployed. Trying to install libv8 with an empty GEM_HOME and a cleared cache gives me this:

Fetching: libv8-3.3.10.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
    ERROR: Failed to build gem native extension.

        /Users/Eris/.rbenv/versions/1.8.7-p352/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/Eris/.rbenv/versions/1.8.7-p352/bin/ruby
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...

Gem files will remain installed in /tmp/ruby-sandbox/rubygems/gems/libv8-3.3.10.4 for inspection.
Results logged to /tmp/ruby-sandbox/rubygems/gems/libv8-3.3.10.4/ext/libv8/gem_make.out

When I look at extconf.rb, I'm still seeing the old version:

require 'mkmf'
require 'pathname'

begin
  def crash(str)
    printf("Unable to build libv8: %s\n", str)
    exit 1
  end

  print "Checking for Python..."
  version = `python --version 2>&1`
  crash "Python not found!" if version.split.first != "Python"
  crash "Python 3.x is unsupported by V8!" if Gem::Version.new(version.split.last) >= Gem::Version.new(3)
  crash "Python 2.4+ is required by V8!" if Gem::Version.new(version.split.last) < Gem::Version.new("2.4")
  puts version.split.last
end


Dir.chdir(Pathname(__FILE__).dirname.join('..', '..', 'lib', 'libv8')) do
  puts "Compiling V8..."
  `make`
end

create_makefile('libv8')

@cowboyd
Copy link
Collaborator Author

cowboyd commented Nov 16, 2011

Bah, you're right. It looks like that didn't get included into the source release. We'll get binaries for OSX 10.7 and ruby 1.8.7 out there this morning.

In the mean time, you're best bet is to check out the source from master, and run 'rake build' which will package up the fixed source gem for you which you can install from command line.

@erisdev
Copy link

erisdev commented Nov 16, 2011

Don't worry, I managed to get it working the hard way yesterday. I honestly didn't have much else to do so it wasn't a big deal. C:

Thanks for the tip anyway, though; I'll remember that if I have problems updating in the future. 👍

@systemed
Copy link

Just encountered this. export RUBYOPT="-r rubygems" is a quick and dirty fix.

@erisdev
Copy link

erisdev commented Nov 23, 2011

@systemed damn! I wish I had thought of RUBYOPT, because it would have saved me the trouble of looking up how to install gems by hand. Thanks for the snippet!

@botandrose
Copy link

Bump. Problem still exhibiting itself for our Mac users.

@cowboyd
Copy link
Collaborator Author

cowboyd commented Dec 1, 2011

@botandrose This issue affects Ubuntu users. It should work just fine on Mac. What are you seeing?

@botandrose
Copy link

@cowboyd Huh, that's interesting. Our dev, ci, and production machines all run Ubuntu, and none of them have had a problem compiling. Only my designer, on his Mac, has hit this problem. Having him set RUBYOPT to require rubygems works, but is less than ideal. It sounds like @erisdiscord also ran into this issue on a Mac, so I don't think its Ubuntu only. All our machines are running REE 1.8.7, if that helps.

In any case, the 3.3.10.4 version on Rubygems.org doesn't compile without the RUBYOPT workaround. Can you stick a require 'rubygems' in there? Thanks for your time.

@dvereber
Copy link

dvereber commented Dec 2, 2011

I am on windows and I am having a similar problem. I have opened a new issue (25) which maybe should be closed if this is the same thing.

How do you fix this the hard way?

@dvereber
Copy link

dvereber commented Dec 2, 2011

export RUBYOPT="-r rubygems" seems to have no effect.

If I have phtyon27 in c/users/david/bin/python.exe then patch fails

if i remove that file, bundle complains about lacking python

export RUBYOPT="-r rubygems seems to have no effect.

@cowboyd
Copy link
Collaborator Author

cowboyd commented Dec 2, 2011

@botandrose We had somebody run into this on a 32bit Mac, which, for Ruby 1.8.7 will not work due to a bug in rubygems. I'm curious why it did not select a binary gem to install on your designer's Mac.

The fix you describe is, in fact, on master. so until the next release I would suggest checking out the source and running rake install

https://github.com/fractaloop/libv8/commit/ec4bc3b60e609d44e60c743b27609c569a617418

@cowboyd cowboyd closed this as completed Dec 2, 2011
@botandrose
Copy link

Awesome possum. I'll point bundler to that commit, and hopefully my designer will stop complaining. Any eta on next release? Thanks for your time.

@dvereber
Copy link

dvereber commented Dec 3, 2011

thanks guys! I haven't had a chance to try this yet but I'll report back when I do.

Is there any way to make a paypal donation?

@botandrose
Copy link

Any possibility of pushing out a new bugfix release? Every time any one of my designers joins a project, they come running to me with this error.

@tboyko
Copy link

tboyko commented Jan 9, 2012

For the sake of clarification, what is the cleanest, future-proof way of forcing bundle pack to either include linux-flavored .gem files, or exclude the darwin version .gem files so that OS X development to Ubuntu production capistrano deployments work correctly?

@cowboyd
Copy link
Collaborator Author

cowboyd commented Jan 10, 2012

I'm not exactly sure what the best way. It's a bug in bundler

@botandrose As far as pushing out the bugfix release, we've been trying to automate the process because 1) it takes a long time and 2) it is prone to human error, and so we release borking things for everybody else. I suppose we could try and push out a manual release next week.

@tboyko at least that will solve your problem if the linux version is up to date. For the record, if you are running a 64bit linux, then you should not have a problem.

@botandrose
Copy link

Ah, I was assuming that the release process was trivial. By all means,
then, work on making it so!
On Mon, Jan 9, 2012 at 9:49 PM, Charles Lowell <
reply@reply.github.com

wrote:

I'm not exactly sure what the best way. It's a bug in bundler

@botandrose As far as pushing out the bugfix release, we've been trying to
automate the process because 1) it takes a long time and 2) it is prone to
human error, and so we release borking things for everybody else. I suppose
we could try and push out a manual release next week.


Reply to this email directly or view it on GitHub:
https://github.com/fractaloop/libv8/issues/23#issuecomment-3425647

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants