methodmissing / rbczmq

Ruby extension that wraps the official high level ZeroMQ C API ( http://czmq.zeromq.org/ )
http://github.com/methodmissing/rbczmq
MIT License
125 stars 32 forks source link

Can't install on Debian 9.2 #64

Open kamk opened 7 years ago

kamk commented 7 years ago

When installing there's deprecation error:

zdir.c: In function ‘zdir_new’:
zdir.c:156:9: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
         int rc = readdir_r (handle, entry, &result);
         ^~~
In file included from ../include/czmq_prelude.h:257:0,
                 from ../include/czmq.h:31,
                 from zdir.c:35:

Using --with-system-libs build option doesn't help, the result is error when requiring the gem: rbczmq-089bb0029c35/lib/rbczmq_ext.so: undefined symbol: zmutex_new

luopio commented 7 years ago

Same issue here on Ubuntu 17.04: crashes on readdir_r. @kamk made any progress on this?

luopio commented 7 years ago

Taking this a bit further I've forked another fork of this to update the underlying submodules czmq and zeromq but this won't help since rbczmq itself seems to be using a deprecated v2 API. So at least the code under ext/rbczmq should be updated to use the current API

malin-as commented 6 years ago

As a temporary fix, one can install the gem by telling GCC to ignore deprecated declarations:

$ CPPFLAGS='-Wno-error=deprecated-declarations' gem install rbczmq -v '1.7.9'
Building native extensions. This could take a while...
Successfully installed rbczmq-1.7.9
1 gem installed
lokeshh commented 5 years ago

Same problem in Ubuntu 18.04 but the workaround by @malin-as works.

ghost commented 4 years ago

As noted above, this problem is actually one in the cmzq library itself. This was fixed in 2016, but this binding contains an old copy of the library. The proper fix would be to update that, but it seems this package has been abandoned, pity.