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

Comments

Projects
None yet
@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

This comment has been minimized.

Contributor

sodabrew commented Oct 9, 2015

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

@craigmdennis

This comment has been minimized.

craigmdennis commented Oct 9, 2015

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

@tmm1

This comment has been minimized.

Contributor

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

This comment has been minimized.

craigmdennis commented Oct 9, 2015

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

@davedub

This comment has been minimized.

davedub commented Oct 23, 2015

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

@covard

This comment has been minimized.

covard commented Oct 23, 2015

woot, woot. Thanks for this. 👍

@semikolon

This comment has been minimized.

semikolon commented Oct 24, 2015

thanks!

@AndreasKlein

This comment has been minimized.

AndreasKlein commented Oct 30, 2015

👍

1 similar comment
@gearnode

This comment has been minimized.

gearnode commented Nov 3, 2015

👍

@sai43

This comment has been minimized.

sai43 commented Nov 3, 2015

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

@KelseyDH

This comment has been minimized.

KelseyDH commented Nov 4, 2015

👍 for brew link openssl --force

@patmalt

This comment has been minimized.

patmalt commented Nov 4, 2015

+1

@mhenrixon

This comment has been minimized.

mhenrixon commented Nov 4, 2015

Thanks @sai43

@evanknight

This comment has been minimized.

evanknight commented Nov 4, 2015

yay brew link openssl --force

@hoang1417

This comment has been minimized.

hoang1417 commented Nov 4, 2015

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

@shjohnson

This comment has been minimized.

shjohnson commented Nov 5, 2015

👍 Nice work guys! Worked like a charm @craigmdennis

@pam-

This comment has been minimized.

pam- commented Nov 5, 2015

👍

@geori

This comment has been minimized.

geori commented Nov 5, 2015

👍 Thanks for the fix!

@aryngazydastan

This comment has been minimized.

aryngazydastan commented Nov 6, 2015

Thanks, It worked for me!

@strickinato

This comment has been minimized.

strickinato commented Nov 6, 2015

👍 for brew link openssl --force

@dearprakash

This comment has been minimized.

dearprakash commented Nov 7, 2015

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

@benpeterson210

This comment has been minimized.

benpeterson210 commented Nov 7, 2015

Thank you! This finally solved my issue

@nikek

This comment has been minimized.

nikek commented Nov 9, 2015

👍 for brew link openssl --force
Epic!

@yatish27

This comment has been minimized.

yatish27 commented Nov 9, 2015

+1

@justinisamaker

This comment has been minimized.

justinisamaker commented Nov 9, 2015

@jlgasparrini

This comment has been minimized.

jlgasparrini commented Nov 10, 2015

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

@fabianrios

This comment has been minimized.

fabianrios commented Nov 10, 2015

+1

1 similar comment
@vasyanik

This comment has been minimized.

vasyanik commented Nov 10, 2015

👍

@unplugandplay

This comment has been minimized.

unplugandplay commented Nov 10, 2015

👍

2 similar comments
@yukihr

This comment has been minimized.

yukihr commented Nov 11, 2015

👍

@bsodmike

This comment has been minimized.

bsodmike commented Nov 11, 2015

👍

@rebeling

This comment has been minimized.

rebeling commented Nov 11, 2015

Thanks.

@kemtopher

This comment has been minimized.

kemtopher commented Nov 11, 2015

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

@wiki1210

This comment has been minimized.

wiki1210 commented Nov 12, 2015

+1!!!!

@sodabrew

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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.