Skip to content

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

@vahuja4

Description

@vahuja4

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$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions