Can't install: "error: ignoring return value of 'int sodium_init()'"

431 views
Skip to first unread message

Eugene Pakhomov

unread,
Dec 2, 2016, 4:37:57 AM12/2/16
to RBigDataProgramming
Can't install pbdZMQ via "install.packages" or from source for R 3.3.2:
make  all-am
make[2]: Entering directory '/tmp/RtmpSBlS3F/R.INSTALL981465badf7/pbdZMQ/src/zmqsrc/src'
  CXX    libzmq_la-address.lo
  CXX    libzmq_la-clock.lo
  CXX    libzmq_la-ctx.lo
  CXX    libzmq_la-curve_client.lo
curve_client.cpp: In constructor 'zmq::curve_client_t::curve_client_t(const zmq::options_t&)':
curve_client.cpp:51:18: error: ignoring return value of 'int sodium_init()', declared with attribute warn_unused_result [-Werror=unused-result]
     sodium_init();
                  ^
cc1plus: all warnings being treated as errors
Makefile:728: recipe for target 'libzmq_la-curve_client.lo' failed
make[2]: *** [libzmq_la-curve_client.lo] Error 1
make[2]: Leaving directory '/tmp/RtmpSBlS3F/R.INSTALL981465badf7/pbdZMQ/src/zmqsrc/src'
Makefile:515: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/RtmpSBlS3F/R.INSTALL981465badf7/pbdZMQ/src/zmqsrc/src'
make[1]: Entering directory '/tmp/RtmpSBlS3F/R.INSTALL981465badf7/pbdZMQ/src/zmqsrc/src'
  CXX    libzmq_la-curve_client.lo
curve_client.cpp: In constructor 'zmq::curve_client_t::curve_client_t(const zmq::options_t&)':
curve_client.cpp:51:18: error: ignoring return value of 'int sodium_init()', declared with attribute warn_unused_result [-Werror=unused-result]
     sodium_init();
                  ^
cc1plus: all warnings being treated as errors
Makefile:728: recipe for target 'libzmq_la-curve_client.lo' failed
make[1]: *** [libzmq_la-curve_client.lo] Error 1
make[1]: Leaving directory '/tmp/RtmpSBlS3F/R.INSTALL981465badf7/pbdZMQ/src/zmqsrc/src'
Makevars:45: recipe for target 'libzmq' failed
make: *** [libzmq] Error 2
ERROR: compilation failed for package ‘pbdZMQ’


Wei-Chen Chen

unread,
Dec 2, 2016, 6:53:07 PM12/2/16
to RBigDataProgramming

Eugene Pakhomov

unread,
Dec 3, 2016, 12:57:01 AM12/3/16
to RBigDataProgramming
I'm not using Conda for that, so the only relevant part from that topic is "your error happened during pbdZMQ installation, so you should go there for reporting it".

Wei-Chen Chen

unread,
Dec 3, 2016, 8:50:19 PM12/3/16
to RBigDataProgramming
I think their discussion is pretty relevant. Either take off -Wall, -Werror or set -W-no-error= ... to disable compiler where turns warning into error.

Or, use an external ZMQ library.

Eugene Pakhomov

unread,
Dec 4, 2016, 1:30:36 AM12/4/16
to RBigDataProgramming
  1. I do not use any global configurations that I'm aware of - I couldn't find any way to make such configurations for gcc and I believe that every setting it uses is either a default one or configured within the project.
  2. I did not change pbdZMQ code.
So if you suggest that I have to change the project code in order to make it work on a pretty generic system (Ubuntu 16.04.1), then I genuinely think there's something wrong with the project and not the system.
I also tried to build the same code on CentOS 7 - the same exact results.

In file "pbdZMQ/src/zmqsrc/configure.ac" you can find a line saying "# By default compiling with -Werror except OSX". Maybe the lines after that are the source of the problem, and they're the ones that should be changed?

Wei-Chen Chen

unread,
Dec 4, 2016, 7:12:45 PM12/4/16
to RBigDataProgramming
FYI. https://github.com/zeromq/zeromq4-1/blob/5f0a8dcffe107b668075515b3c03d921c2e24455/configure.ac#L114 That was set by the original ZMQ since 2013 ...

Thanks for more informative setup. However, I did install Xubuntu 16.04.1 and R-devel, but has no problem to make ZMQ 4.1.0 rc1 and CRAN pbdZMQ even after removing system libsodium... Can you install any ZMQ? You can either use libzmq-dev or from source, then have pbdZMQ to externally link with.

Wei-Chen Chen

unread,
Dec 4, 2016, 9:28:28 PM12/4/16
to RBigDataProgramming

Wei-Chen Chen

unread,
Dec 4, 2016, 11:12:04 PM12/4/16
to RBigDataProgramming
Please check if the patch works at https://github.com/snoweye/pbdZMQ . Thanks.

Eugene Pakhomov

unread,
Dec 6, 2016, 1:26:39 AM12/6/16
to RBigDataProgramming
It works, thank you!
Reply all
Reply to author
Forward
0 new messages