erlang-czmq icon indicating copy to clipboard operation
erlang-czmq copied to clipboard

Fails to compile with gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)

Open Janulka opened this issue 7 years ago • 2 comments

I am getting the following error when trying to compile on Ubuntu 18.04 with gcc 7.3.0

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -I/home/janabaran/src/erlang-czmq/c_src/.libs/libsodium/include -I/home/janabaran/src/erlang-czmq/c_src/.libs/libzmq/include -g -I/home/janabaran/src/erlang-czmq/c_src/.libs/libsodium/include -I/home/janabaran/src/erlang-czmq/c_src/.libs/libzmq/include -c zauth.c  -fPIC -DPIC -o .libs/zauth.o
In file included from /usr/include/ctype.h:25:0,
                 from ../include/czmq_prelude.h:203,
                 from ../include/czmq.h:19,
                 from zauth.c:25:
/usr/include/features.h:184:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc1: all warnings being treated as errors
Makefile:531: recipe for target 'zauth.lo' failed
make[4]: *** [zauth.lo] Error 1
make[4]: Leaving directory '/home/janabaran/src/erlang-czmq/c_src/.libs/czmq-2.2.0/src'
Makefile:344: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/janabaran/src/erlang-czmq/c_src/.libs/czmq-2.2.0/src'
Makefile:326: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/janabaran/src/erlang-czmq/c_src/.libs/czmq-2.2.0'
Makefile:37: recipe for target 'buildcmq' failed
make[1]: *** [buildcmq] Error 1
make[1]: Leaving directory '/home/janabaran/src/erlang-czmq/c_src'
Makefile:7: recipe for target 'app' failed
make: *** [app] Error 2

Janulka avatar Aug 08 '18 23:08 Janulka

it's an old release of cmzq 2.2.0 it won't compile because you have to change _BSD_SOURCE to _DEFAULT_SOURCE and something more it's already mentioned in an early issue this.. it all boils down you have to hard copy cmzq locally and before compile fix those errors

wayann avatar Nov 30 '19 20:11 wayann

  • czmq has 2 issues: the 'check' target uses 1 colon instead of 2; and a C dependency fails to compile with recent gcc as per gar1t/erlang-czmq#33

wayann avatar Nov 30 '19 20:11 wayann