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. #717

Closed
eatspaint opened this issue May 26, 2016 · 5 comments
Closed

ERROR: Failed to build gem native extension. #717

eatspaint opened this issue May 26, 2016 · 5 comments

Comments

@eatspaint
Copy link

eatspaint commented May 26, 2016

I'm trying to spin up an old project using ruby 1.8.7-p375 and cannot successfully bundle because eventmachine fails to install.

Here are some of the commands I've tried:

  • env ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install eventmachine -v '1.2.0.1'
  • gem install eventmachine -v 1.2.0.1 -- --with-cppflags=-I/usr/local/opt/openssl/include

Here's my output:

/Users/christianfuller/.rbenv/versions/1.8.7-p375/bin/ruby extconf.rb --with-cppflags=-I/usr/local/opt/openssl/include
checking for main() in -lcrypto... yes
checking for main() in -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... no
checking for rb_thread_fd_select()... no
checking for rb_fdset_t in ruby/intern.h... no
checking for rb_wait_for_single_fd()... no
checking for rb_enable_interrupt()... no
checking for rb_time_new()... 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 pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
CXXFLAGS=
creating Makefile

make
c++ -I. -I. -I/Users/christianfuller/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin15.4.0 -I. -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_RB_TRAP_IMMEDIATE -DHAVE_RB_TIME_NEW -DHAVE_WRITEV -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DOS_DARWIN -I/usr/local/opt/openssl/include -fno-common -g -02 -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common     -c binder.cpp
clang: error: unknown argument: '-02'
make: *** [binder.o] Error 1

From what I've read, there was a temporary workaround, but that seems to no longer be working. Any ideas?

@sodabrew
Copy link
Contributor

sodabrew commented May 26, 2016 via email

@eatspaint
Copy link
Author

I'm not totally familiar with that part of ruby yet. How should I go about correcting that?

@sodabrew
Copy link
Contributor

Unfortunately I don't know how that got there either!
Note the -02 right before the -O3, the former looks like a typo.

c++ -I. -I. -I/Users/christianfuller/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin15.4.0 -I. -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_RB_TRAP_IMMEDIATE -DHAVE_RB_TIME_NEW -DHAVE_WRITEV -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DOS_DARWIN -I/usr/local/opt/openssl/include -fno-common -g -02 -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common     -c binder.cpp

@sodabrew
Copy link
Contributor

@eatspaint Is this still an open issue for you?

@eatspaint
Copy link
Author

No! Apologies for not marking as closed sooner!

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

No branches or pull requests

2 participants