SciRuby / daru-view

daru-view is for easy and interactive plotting in web application & IRuby notebook. daru-view is a plugin gem to the existing daru gem.
https://sciruby.github.io/daru-view/
MIT License
95 stars 20 forks source link

problem while installing rbczmq #132

Open shubhankarsharma00 opened 5 years ago

shubhankarsharma00 commented 5 years ago

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
Shekharrajak commented 5 years ago

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

shubhankarsharma00 commented 5 years ago

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.

Shekharrajak commented 5 years ago

@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 .

shubhankarsharma00 commented 5 years ago

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.

lokeshh commented 5 years ago

@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

Shekharrajak commented 5 years ago

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

Shekharrajak commented 5 years ago

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