Skip to content

Instantly share code, notes, and snippets.

@kballenegger
Created May 26, 2012 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kballenegger/2791766 to your computer and use it in GitHub Desktop.
Save kballenegger/2791766 to your computer and use it in GitHub Desktop.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/kenneth/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for zmq.h... yes
checking for zmq_init() in -lzmq... yes
Cool, I found your zmq install...
creating Makefile
make
compiling rbzmq.c
rbzmq.c: In function ‘context_initialize’:
rbzmq.c:126: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘poll_add_item’:
rbzmq.c:219: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:232: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘internal_select’:
rbzmq.c:338: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘module_select’:
rbzmq.c:388: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘context_socket’:
rbzmq.c:431: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘socket_getsockopt’:
rbzmq.c:968: error: ‘ZMQ_RECOVERY_IVL_MSEC’ undeclared (first use in this function)
rbzmq.c:968: error: (Each undeclared identifier is reported only once
rbzmq.c:968: error: for each function it appears in.)
rbzmq.c:990: error: ‘ZMQ_HWM’ undeclared (first use in this function)
rbzmq.c:991: error: ‘ZMQ_SWAP’ undeclared (first use in this function)
rbzmq.c:995: error: ‘ZMQ_MCAST_LOOP’ undeclared (first use in this function)
rbzmq.c: In function ‘socket_setsockopt’:
rbzmq.c:1292: error: ‘ZMQ_HWM’ undeclared (first use in this function)
rbzmq.c:1293: error: ‘ZMQ_SWAP’ undeclared (first use in this function)
rbzmq.c:1297: error: ‘ZMQ_MCAST_LOOP’ undeclared (first use in this function)
rbzmq.c:1315: error: ‘ZMQ_RECOVERY_IVL_MSEC’ undeclared (first use in this function)
rbzmq.c: In function ‘socket_bind’:
rbzmq.c:1379: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘socket_connect’:
rbzmq.c:1422: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘zmq_send_blocking’:
rbzmq.c:1443: error: too few arguments to function ‘zmq_send’
rbzmq.c: In function ‘socket_send’:
rbzmq.c:1490: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:1496: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:1507: error: ‘ZMQ_NOBLOCK’ undeclared (first use in this function)
rbzmq.c:1517: error: too few arguments to function ‘zmq_send’
rbzmq.c: In function ‘zmq_recv_blocking’:
rbzmq.c:1541: error: too few arguments to function ‘zmq_recv’
rbzmq.c: In function ‘socket_recv’:
rbzmq.c:1580: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:1584: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:1591: error: ‘ZMQ_NOBLOCK’ undeclared (first use in this function)
rbzmq.c:1602: error: too few arguments to function ‘zmq_recv’
rbzmq.c:1616: warning: ISO C90 forbids mixed declarations and code
rbzmq.c: In function ‘Init_zmq’:
rbzmq.c:1658: warning: ISO C90 forbids mixed declarations and code
rbzmq.c:1675: error: ‘ZMQ_HWM’ undeclared (first use in this function)
rbzmq.c:1676: error: ‘ZMQ_SWAP’ undeclared (first use in this function)
rbzmq.c:1683: error: ‘ZMQ_MCAST_LOOP’ undeclared (first use in this function)
rbzmq.c:1698: error: ‘ZMQ_RECOVERY_IVL_MSEC’ undeclared (first use in this function)
rbzmq.c:1701: error: ‘ZMQ_NOBLOCK’ undeclared (first use in this function)
make: *** [rbzmq.o] Error 1
Gem files will remain installed in /home/kenneth/.rvm/gems/ruby-1.9.3-p0/gems/zmq-2.1.4 for inspection.
Results logged to /home/kenneth/.rvm/gems/ruby-1.9.3-p0/gems/zmq-2.1.4/./gem_make.out
An error occured while installing zmq (2.1.4), and Bundler cannot continue.
Make sure that `gem install zmq -v '2.1.4'` succeeds before bundling.
@katragadda
Copy link

Has this issue been resolved or does anyone know of workarounds for this problem. I'm having the same problem and not sure how to proceed.

@kballenegger
Copy link
Author

Yes, make sure you're not using the 3.x beta version of zeromq -- you wanna use the official 2.x lib.

@mattweyant
Copy link

With a stable 3.x release, will the C extension be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment