Commoncpp fails to compile with uclibc version 0.9.27. This is the error: In file included from /usr/include/sys/un.h:38, from ../include/cc++/config.h:773, from thread.cpp:38: /usr/include/string.h:273: error: syntax error before `char' make[1]: *** [thread.lo] Error 1 make[1]: Leaving directory `/var/tmp/portage/commoncpp2-1.3.1/work/commoncpp2-1.3.1/src' make: *** [all-recursive] Error 1 I would submit a patch, but I don't understand all the __REDIRECT macro stuff enough to tell if it is a uclibc or commoncpp bug. Reproducible: Always Steps to Reproduce: 1. start with a system with uclibc 0.9.27 installed 2. emerge commoncpp (1.3.1, 1.3.20, 1.3.22, your pick 3. watch it fail Actual Results: Making all in src make[1]: Entering directory `/var/tmp/portage/commoncpp2-1.3.1/work/commoncpp2-1.3.1/src' source='thread.cpp' object='thread.lo' libtool=yes \ depfile='.deps/thread.Plo' tmpdepfile='.deps/thread.TPlo' \ depmode=gcc3 /bin/sh ../autoconf/depcomp \ /bin/sh ../libtool --mode=compile i586-gentoo-linux-uclibc-g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_GNU_SOURCE -I../include -march=i386 -Os -pipe -c -o thread.lo `test -f thread.cpp || echo './'`thread.cpp mkdir .libs i586-gentoo-linux-uclibc-g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_GNU_SOURCE -I../include -march=i386 -Os -pipe -c thread.cpp -MT thread.lo -MD -MP -MF .deps/thread.TPlo -fPIC -DPIC -o .libs/thread.o In file included from /usr/include/sys/un.h:38, from ../include/cc++/config.h:773, from thread.cpp:38: /usr/include/string.h:273: error: syntax error before `char' make[1]: *** [thread.lo] Error 1 make[1]: Leaving directory `/var/tmp/portage/commoncpp2-1.3.1/work/commoncpp2-1.3.1/src' make: *** [all-recursive] Error 1 !!! ERROR: dev-cpp/commoncpp2-1.3.1 failed. !!! Function src_compile, Line 23, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Expected Results: emerged moya src # ls -la /etc/make.profile lrwxrwxrwx 1 root root 43 Nov 17 19:29 /etc/make.profile -> /usr/portage/profiles/uclibc/x86/2005.1/2.4
CC'ing arj since its his package.
This package compiles successfully with uclibc 0.9.28, however the commoncpp2 ./configure script does not correctly detect uclibc's version of strerror_r, and defines its own.
Seems to be a uclibc problem, giving it to the embedded guys.
cant recall when it was solved in uClibc, the part in string.h around __xpg_strerror_r has to backported to 0.9.27
changing string.h wouldnt help the configure check links against libc.so looking for the strerror_r symbol which uClibc doesnt export
Reopen if this still a problem with uclibc-0.9.28
it is a problem until an alias is made for the strerror_r symbol (still this way in uClibc svn)
and which one should be exported? __glibc_strerror_r or __xpg_strerror_r?
the xpg one: http://www.opengroup.org/onlinepubs/009695399/functions/strerror.html
the problem lies in extern char * _REDIRECT[_NTH] syntax, if I rely on #define strerror_r __glibc_strerror_r, it goes further (havent built it because I miss ::clog in uClibc++ (not enabled in my used version)
this will be fixed in next uClibc release