Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115354 - commoncpp fails to detect strerror_r in uClibc
Summary: commoncpp fails to detect strerror_r in uClibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 16:23 UTC by Pardsbane
Modified: 2007-09-15 00:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pardsbane 2005-12-12 16:23:53 UTC
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
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2005-12-12 17:34:17 UTC
CC'ing arj since its his package.
Comment 2 Pardsbane 2005-12-14 08:27:58 UTC
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.
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2006-01-15 15:16:46 UTC
Seems to be a uclibc problem, giving it to the embedded guys.
Comment 4 Peter S. Mazinger 2006-01-16 01:33:03 UTC
cant recall when it was solved in uClibc, the part in string.h around __xpg_strerror_r has to backported to 0.9.27
Comment 5 SpanKY gentoo-dev 2006-01-16 01:34:55 UTC
changing string.h wouldnt help

the configure check links against libc.so looking for the strerror_r symbol which uClibc doesnt export
Comment 6 solar (RETIRED) gentoo-dev 2006-05-24 14:44:08 UTC
Reopen if this still a problem with uclibc-0.9.28
Comment 7 SpanKY gentoo-dev 2006-05-25 14:21:58 UTC
it is a problem until an alias is made for the strerror_r symbol (still this way in uClibc svn)
Comment 8 Peter S. Mazinger 2006-05-25 14:39:41 UTC
and which one should be exported? __glibc_strerror_r or __xpg_strerror_r?
Comment 10 Peter S. Mazinger 2006-05-25 17:26:08 UTC
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)
Comment 11 SpanKY gentoo-dev 2007-09-15 00:55:40 UTC
this will be fixed in next uClibc release