Android Things 1.06 Compiling zeromq
brubakerjeff opened this issue · comments
Hi,
I'm trying to compile zeromq3 on Android things 1.06 under termux and receive the below.
The error references the function tempman, is there a suitable substitution to make? I'm thinking try the recommendation and do a PR.
zeromq3-x/src/ipc_listener.cpp
Line 124 in b56cb96
git clone https://github.com/zeromq/zeromq3-x.git
cd zeromq3-x/
./autogen.sh
./configure --enable-static --disable-shared --host=arm-linux-androideabi --prefix=$OUTPUT_DIR LDFLAGS="-L$OUTPUT_DIR/lib" CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LIBS="-lgcc"
make
make install
Making all in src
make[1]: Entering directory '/data/data/com.termux/files/home/zeromq3-x/src'
make all-am
make[2]: Entering directory '/data/data/com.termux/files/home/zeromq3-x/src'
CXX libzmq_la-address.lo
CXX libzmq_la-clock.lo
CXX libzmq_la-ctx.lo
CXX libzmq_la-decoder.lo
CXX libzmq_la-devpoll.lo
CXX libzmq_la-dist.lo
CXX libzmq_la-encoder.lo
CXX libzmq_la-epoll.lo
CXX libzmq_la-err.lo
CXX libzmq_la-fq.lo
CXX libzmq_la-io_object.lo
CXX libzmq_la-io_thread.lo
CXX libzmq_la-ip.lo
CXX libzmq_la-ipc_address.lo
CXX libzmq_la-ipc_connecter.lo
CXX libzmq_la-ipc_listener.lo
ipc_listener.cpp:124:17: error: 'tempnam' is deprecated: tempnam is unsafe, use
mkstemp or tmpfile instead [-Werror,-Wdeprecated-declarations]
addr_ = tempnam(NULL, NULL);
^
/data/data/com.termux/files/usr/include/stdio.h:173:5: note: 'tempnam' has been
explicitly marked deprecated here
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
^
/data/data/com.termux/files/usr/include/sys/cdefs.h:160:40: note: expanded from
macro '__warnattr'
#define __warnattr(msg) __attribute__((deprecated(msg)))
^
1 error generated.
make[2]: *** [Makefile:878: libzmq_la-ipc_listener.lo] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/zeromq3-x/src'
make[1]: *** [Makefile:590: all] Error 2
make[1]: Leaving directory '/data/data/com.termux/files/home/zeromq3-x/src'
make: *** [Makefile:418: all-recursive] Error 1
$ make install
Making install in src
make[1]: Entering directory '/data/data/com.termux/files/home/zeromq3-x/src'
CXX libzmq_la-ipc_listener.lo
ipc_listener.cpp:124:17: error: 'tempnam' is deprecated: tempnam is unsafe, use
mkstemp or tmpfile instead [-Werror,-Wdeprecated-declarations]
addr_ = tempnam(NULL, NULL);
^
/data/data/com.termux/files/usr/include/stdio.h:173:5: note: 'tempnam' has been
explicitly marked deprecated here
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
^
/data/data/com.termux/files/usr/include/sys/cdefs.h:160:40: note: expanded from
macro '__warnattr'
#define __warnattr(msg) __attribute__((deprecated(msg)))
^
1 error generated.
make[1]: *** [Makefile:878: libzmq_la-ipc_listener.lo] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/zeromq3-x/src'
make: *** [Makefile:418: install-recursive] Error 1
This legacy branch is no longer maintained. Use https://github.com/zeromq/libzmq
Thank you. Can this be updated? http://zeromq.org/build:android. Not sure who to contact.
Re-opening here zeromq/libzmq#3307
Done