daru-view icon indicating copy to clipboard operation
daru-view copied to clipboard

problem while installing rbczmq

Open shubhankarsharma00 opened this issue 6 years ago • 7 comments

last few lines of error :

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/usr/local/lib/ruby/gems/2.5.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c zdir.c -o zdir.o
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:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
zdir.c:159:13: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
             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:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
cc1: all warnings being treated as errors
Makefile:774: recipe for target 'zdir.lo' failed
make[2]: *** [zdir.lo] Error 1
make[2]: Leaving directory '/usr/local/lib/ruby/gems/2.5.0/gems/rbczmq-1.7.9/ext/czmq/src'
Makefile:586: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/local/lib/ruby/gems/2.5.0/gems/rbczmq-1.7.9/ext/czmq/src'
Makefile:414: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
CZMQ compile error!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
	--with-system-libs
	--without-system-libs
	--with-system-libs
	--without-system-libs

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.5.0/gems/rbczmq-1.7.9 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/rbczmq-1.7.9/gem_make.out

shubhankarsharma00 avatar Jan 08 '19 16:01 shubhankarsharma00

Hi @shubhankarsharma00 ,

Let us know what you was trying to do and got this error.

You can go through the README file and contribution section

Shekharrajak avatar Jan 09 '19 08:01 Shekharrajak

I wanted to setup daru-view. When I ran bundle install I wasn't able to install rbczmq because of some error and then I tried sudo gem install rbczmq and encountered this error.

shubhankarsharma00 avatar Jan 09 '19 10:01 shubhankarsharma00

@shubhankarsharma00 , may be some dependencies are not installed for rbczmq. Try sudo apt-get install libtool-bin (or some other dependencies) and then sudo gem install rbczmq. The installation steps may help you as well .

Shekharrajak avatar Jan 09 '19 12:01 Shekharrajak

I already installed libtool-bin, autoconf, automake and I can't figure out what dependency I am missing. I even tried to get it from the source installed all the dependencies and then ran rake and it gave me same error.

shubhankarsharma00 avatar Jan 12 '19 04:01 shubhankarsharma00

@shubhankarsharma00 This temporary fix might work for you for now.

CPPFLAGS='-Wno-error=deprecated-declarations' gem install rbczmq -v '1.7.9'

See https://github.com/methodmissing/rbczmq/issues/64

lokeshh avatar Jan 19 '19 18:01 lokeshh

I have setup the development version in different machines (Mac, Debian) following these steps . I hope you have followed it.

Shekharrajak avatar Jan 19 '19 22:01 Shekharrajak

I found a similar problem in other system and solved it using above @lokeshh's https://github.com/SciRuby/daru-view/issues/132#issuecomment-455802845 . Hopefully it will solve your issue as well @shubhankarsharma00

Shekharrajak avatar Feb 24 '19 17:02 Shekharrajak