[zeromq-dev] compile statically libzmq with libsodium on macosx

Benoit Chesneau bchesneau at gmail.com
Wed Mar 12 11:30:15 CET 2014


Hi all,

I am trying to build czmq, libzmq against libsodiun on macosx with the
following script:

https://www.friendpaste.com/4zEqJNZuKnKDxqp4jdYL7A

The script works on linux but on macosx I get the following error:

ld: warning: ignoring file ../src/.libs/libzmq.a, file was built for
archive which is not the architecture being linked (x86_64):
../src/.libs/libzmq.a

Undefined symbols for architecture x86_64:

  "_zmq_bind", referenced from:

      _main in local_lat.o

  "_zmq_close", referenced from:

      _main in local_lat.o

  "_zmq_init", referenced from:

      _main in local_lat.o

  "_zmq_msg_close", referenced from:

      _main in local_lat.o

  "_zmq_msg_init", referenced from:

      _main in local_lat.o

  "_zmq_msg_size", referenced from:

      _main in local_lat.o

  "_zmq_recvmsg", referenced from:

      _main in local_lat.o

  "_zmq_sendmsg", referenced from:

      _main in local_lat.o

  "_zmq_sleep", referenced from:

      _main in local_lat.o

  "_zmq_socket", referenced from:

      _main in local_lat.o

  "_zmq_strerror", referenced from:

      _main in local_lat.o

  "_zmq_term", referenced from:

      _main in local_lat.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


 I tried to build with CFLAGS="-arch x86_64 -m64" and CXXFLAGS="-arch
x86_64 -m64"  but without success. Any idea on how to fix it?

- benoit



More information about the zeromq-dev mailing list