Skip to content
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

set prefix to empty string if config_string(prefix) is nill #101

Closed

Conversation

trbrink
Copy link

@trbrink trbrink commented Mar 21, 2014

I get the following error when building Rmagick-2.13.2 on Centos 6.4 using Ruby 2.1:

 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
     /usr/bin/ruby extconf.rb 
 checking for Ruby version >= 1.8.5... yes
 checking for gcc... yes
 checking for Magick-config... yes
 *** 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}/lib64
         --with-make-prog
         --without-make-prog
         --srcdir=.
         --curdir
         --ruby=/usr/bin/ruby
 extconf.rb:83:in `check_partial_imagemagick_versions': undefined method `+' for false:FalseClass (NoMethodError)
         from extconf.rb:140:in `<main>'
 extconf failed, exit code 1
 Gem files will remain installed in /var/www/purchase.stcnet.com/shared/bundle/ruby/gems/rmagick-2.13.2 for inspection.
 Results logged to /var/www/purchase.stcnet.com/shared/bundle/ruby/extensions/x86_64-linux/2.1.0/rmagick-2.13.2/gem_make.out
 An error occurred while installing rmagick (2.13.2), and Bundler cannot
 continue.
 Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.

This pull request sets the prefix variable defined in the check_partial_imagemagick_versions method to "" if config_string("prefix") returns false. For me this fixed the build issue.

The same fix was implemented here.

@trbrink
Copy link
Author

trbrink commented Mar 21, 2014

Wow I can't believe I missed rmagick/rmagick#71.

@trbrink trbrink closed this Mar 21, 2014
@trbrink trbrink deleted the fix_build_error_on_centos branch March 21, 2014 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant