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

Error compiling on freeBSD 10.0 #23

Closed
ghost opened this issue Apr 1, 2014 · 4 comments · Fixed by #24
Closed

Error compiling on freeBSD 10.0 #23

ghost opened this issue Apr 1, 2014 · 4 comments · Fixed by #24

Comments

@ghost
Copy link

ghost commented Apr 1, 2014

I have problem compiling the hiredis :

        /usr/local/bin/ruby19 extconf.rb
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 32: Missing dependency operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 36: Need an operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 37: Missing dependency operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 42: Need an operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 70: Need an operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 74: Need an operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 76: warning: duplicate script for target "hiredis-example-ae" ignored
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 73: warning: using previous script for "hiredis-example-ae" defined here
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 77: Need an operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 113: Missing dependency operator
make: "/usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis/Makefile" line 115: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/vendor/hiredis
*** 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=/usr/local/bin/ruby19
extconf.rb:20:in `block in <main>': Building hiredis failed (RuntimeError)
        from extconf.rb:18:in `chdir'
        from extconf.rb:18:in `<main>'


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9/gems/hiredis-0.5.1/ext/hiredis_ext/gem_make.out
@kreynolds
Copy link
Contributor

This was fixed in #4 but that was passed over for the ability to specify make on the command line so you can now build it using env make=/usr/local/bin/gmake (assuming you've installed gmake). Unfortunately, if you use capistrano to deploy in a bundler environment, it will still fail to build because there is no good way to specify an environment variable for just this one gem to build.

@pietern Will you accept a PR that puts a bsd/solaris check back for gmake? This is still a problem.

@pietern
Copy link
Collaborator

pietern commented Apr 10, 2014

Sure, that'd be great actually. The reason for picking the configurable one over the permanent change is that it allows people to fix compilation through the environment. I see the value of having reasonable defaults though. We could have the make_program assignment in extconf.rb be a switch/case with a bunch of regular expressions on the platform I suppose.

@pietern
Copy link
Collaborator

pietern commented Apr 10, 2014

@rhacker Pushed version 0.5.2 that should fix your issue, thanks to @kreynolds.

@ghost
Copy link
Author

ghost commented Apr 13, 2014

great, thanks guys !

stanhu added a commit to stanhu/rubygems that referenced this issue Jan 2, 2024
The BSD `make` is not compatible with many directives in GNU make.
For FreeBSD and Solaris systems, default to `gmake` so that native gem
builds work without having to specify `MAKE=gmake` in the environment.

Relates to:
* oxidize-rb/rb-sys#299
* redis/hiredis-rb#23
stanhu added a commit to stanhu/rubygems that referenced this issue Jan 2, 2024
The BSD `make` is not compatible with many directives in GNU make.
For FreeBSD and Solaris systems, default to `gmake` so that native gem
builds work without having to specify `MAKE=gmake` in the environment.

Relates to:
* oxidize-rb/rb-sys#299
* redis/hiredis-rb#23
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 a pull request may close this issue.

2 participants