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: Failed to build gem native extension #643

Closed
craigmdennis opened this issue Oct 9, 2015 · 36 comments
Closed

ERROR: Failed to build gem native extension #643

craigmdennis opened this issue Oct 9, 2015 · 36 comments

Comments

@craigmdennis
Copy link

@craigmdennis craigmdennis commented Oct 9, 2015

I'm trying to install middleman but it crashes when trying to install version 1.0.8 of eventemitter.

I'm running OSX 10.11 El Capitan.
I use rbenv and have tried ruby 2.1.7 and 2.2.0

The full error is below:

Installing eventmachine 1.0.8 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/var/rbenv/versions/2.1.7/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
CFLAGS= -O3 -Wno-error=shorten-64-to-32  -pipe  -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result
CPPFLAGS=-I/usr/local/var/rbenv/versions/2.1.7/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags) -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
make: *** [binder.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/var/rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8 for inspection.
Results logged to /usr/local/var/rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/eventmachine-1.0.8/gem_make.out
An error occurred while installing eventmachine (1.0.8), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.8'` succeeds before bundling.
@sodabrew
Copy link
Contributor

@sodabrew sodabrew commented Oct 9, 2015

El Capitan no longer provides OpenSSL headers. You'll need to install openssl using either HomeBrew or MacPorts.

@craigmdennis
Copy link
Author

@craigmdennis craigmdennis commented Oct 9, 2015

Homebrew states that openSSL is already installed Warning: openssl-1.0.2d_1 already installed

@tmm1
Copy link
Contributor

@tmm1 tmm1 commented Oct 9, 2015

Try brew link openssl
On Fri, Oct 9, 2015 at 2:39 PM Craig Dennis notifications@github.com
wrote:

Homebrew states that openSSL is already installed Warning:
openssl-1.0.2d_1 already installed


Reply to this email directly or view it on GitHub
#643 (comment)
.

@craigmdennis
Copy link
Author

@craigmdennis craigmdennis commented Oct 9, 2015

brew link openssl --force did the trick. Thanks!!

@davedub
Copy link

@davedub davedub commented Oct 23, 2015

Hallelujah. Looking for a way around this problem for an hour. Thanks.

@covard
Copy link

@covard covard commented Oct 23, 2015

woot, woot. Thanks for this. 👍

@semikolon
Copy link

@semikolon semikolon commented Oct 24, 2015

thanks!

@AndreasKlein
Copy link

@AndreasKlein AndreasKlein commented Oct 30, 2015

👍

1 similar comment
@gearnode
Copy link

@gearnode gearnode commented Nov 3, 2015

👍

@sai43
Copy link

@sai43 sai43 commented Nov 3, 2015

brew link openssl --force is work for me. thanks @craigmdennis

@KelseyDH
Copy link

@KelseyDH KelseyDH commented Nov 4, 2015

👍 for brew link openssl --force

@patmalt
Copy link

@patmalt patmalt commented Nov 4, 2015

+1

@mhenrixon
Copy link

@mhenrixon mhenrixon commented Nov 4, 2015

Thanks @sai43

@evanknight
Copy link

@evanknight evanknight commented Nov 4, 2015

yay brew link openssl --force

@hoang1417
Copy link

@hoang1417 hoang1417 commented Nov 4, 2015

👍 thanks @tmm1. brew link openssl --force works!

@shjohnson
Copy link

@shjohnson shjohnson commented Nov 5, 2015

👍 Nice work guys! Worked like a charm @craigmdennis

@pam-
Copy link

@pam- pam- commented Nov 5, 2015

👍

@geori
Copy link

@geori geori commented Nov 5, 2015

👍 Thanks for the fix!

@aryngazydastan
Copy link

@aryngazydastan aryngazydastan commented Nov 6, 2015

Thanks, It worked for me!

@strickinato
Copy link

@strickinato strickinato commented Nov 6, 2015

👍 for brew link openssl --force

@dearprakash
Copy link

@dearprakash dearprakash commented Nov 7, 2015

👍 for brew link openssl --force
Saved my time :)

@benpeterson210
Copy link

@benpeterson210 benpeterson210 commented Nov 7, 2015

Thank you! This finally solved my issue

@nikek
Copy link

@nikek nikek commented Nov 9, 2015

👍 for brew link openssl --force
Epic!

@yatish27
Copy link

@yatish27 yatish27 commented Nov 9, 2015

+1

@justinisamaker
Copy link

@justinisamaker justinisamaker commented Nov 9, 2015

@jlgasparrini
Copy link

@jlgasparrini jlgasparrini commented Nov 10, 2015

Thank!! :D for brew link openssl --force

@fabianrios
Copy link

@fabianrios fabianrios commented Nov 10, 2015

+1

1 similar comment
@vasyanik
Copy link

@vasyanik vasyanik commented Nov 10, 2015

👍

@unplugandplay
Copy link

@unplugandplay unplugandplay commented Nov 10, 2015

👍

2 similar comments
@yukihr
Copy link

@yukihr yukihr commented Nov 11, 2015

👍

@bsodmike
Copy link

@bsodmike bsodmike commented Nov 11, 2015

👍

@rebeling
Copy link

@rebeling rebeling commented Nov 11, 2015

Thanks.

@kemtopher
Copy link

@kemtopher kemtopher commented Nov 11, 2015

+1000
brew link openssl --force worked on my end

@wiki1210
Copy link

@wiki1210 wiki1210 commented Nov 12, 2015

+1!!!!

@sodabrew
Copy link
Contributor

@sodabrew sodabrew commented Nov 12, 2015

I'm going to lock the thread now because the stream of +1's isn't adding information.

@eventmachine eventmachine locked and limited conversation to collaborators Nov 12, 2015
@sodabrew
Copy link
Contributor

@sodabrew sodabrew commented Jan 13, 2016

Please try eventmachine-1.0.9, it should compile and install without error on El Capitan. Discuss issues on #668.

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

Successfully merging a pull request may close this issue.

None yet