zeromq / majordomo

Majordomo Project
Mozilla Public License 2.0
115 stars 52 forks source link

error compiling on Mac OSX(Darwin) with zeromq-4.0.3 and czmq-2.0.3 #52

Open vahuja4 opened 9 years ago

vahuja4 commented 9 years ago

Am having trouble compiling the majordomo source on Mac OSX Darwin.

gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -Wno-unused -D_DARWIN_C_SOURCE -D_REENTRANT -D_THREAD_SAFE -g -O2 -MT mdp_broker.o -MD -MP -MF .deps/mdp_broker.Tpo -c -o mdp_broker.o mdp_broker.c mdp_broker.c:560:11: error: 'daemon' is deprecated: first deprecated in OS X 10.5 [-Werror,-Wdeprecated-declarations] int rc = daemon(0, 0); ^ /usr/include/stdlib.h:267:6: note: 'daemon' declared here int daemon(int, int) DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED(MAC_10_0, MAC_10_5, IPHONE_2_0, __IPHONE_2_0);

^

I commented that part of the code, and ran make. Then, the following error occured.


campus-055-022:libmdp kvantum$ make D_DARWIN_C_SOURCE -D_REENTRANT -D_THREAD_SAFE -g -O2 -MT engine.o -MD -MP -MF .deps/engine.Tpo -c -o engine.o engine.c engine.c:55:5: error: implicit declaration of function 'zmsg_pushstrf' is invalid in C99 [-Werror,-Wimplicit-function-declaration] zmsg_pushstrf (report, "%d", volume); ^ engine.c:55:5: note: did you mean 'zmsg_pushstr'? zmsg_pushstrf (report, "%d", volume); ^~~~~ zmsg_pushstr /usr/local/include/zmsg.h:103:5: note: 'zmsg_pushstr' declared here zmsg_pushstr (zmsg_t self, const char format, ...); ^ 1 error generated. make[2]: * [engine.o] Error 1 make[1]: * [all] Error 2 make: * [all-recursive] Error 1 campus-055-022:libmdp kvantum$