<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>115354</bug_id>
          
          <creation_ts>2005-12-12 16:23 0000</creation_ts>
          <short_desc>commoncpp fails to detect strerror_r in uClibc</short_desc>
          <delta_ts>2007-09-15 00:55:40 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>pardsbane@offthehill.org</reporter>
          <assigned_to>embedded@gentoo.org</assigned_to>
          <cc>arj@gentoo.org</cc>
    
    <cc>ps.m@gmx.net</cc>

      

      
          <long_desc isprivate="0">
            <who>pardsbane@offthehill.org</who>
            <bug_when>2005-12-12 16:23:53 0000</bug_when>
            <thetext>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&apos;
make[1]: *** [thread.lo] Error 1
make[1]: Leaving directory
`/var/tmp/portage/commoncpp2-1.3.1/work/commoncpp2-1.3.1/src&apos;
make: *** [all-recursive] Error 1

I would submit a patch, but I don&apos;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&apos;
source=&apos;thread.cpp&apos; object=&apos;thread.lo&apos; libtool=yes \
depfile=&apos;.deps/thread.Plo&apos; tmpdepfile=&apos;.deps/thread.TPlo&apos; \
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
&apos;./&apos;`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&apos;
make[1]: *** [thread.lo] Error 1
make[1]: Leaving directory
`/var/tmp/portage/commoncpp2-1.3.1/work/commoncpp2-1.3.1/src&apos;
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 -&gt;
/usr/portage/profiles/uclibc/x86/2005.1/2.4</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>halcy0n@gentoo.org</who>
            <bug_when>2005-12-12 17:34:17 0000</bug_when>
            <thetext>CC&apos;ing arj since its his package.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pardsbane@offthehill.org</who>
            <bug_when>2005-12-14 08:27:58 0000</bug_when>
            <thetext>This package compiles successfully with uclibc 0.9.28, however the commoncpp2
./configure script does not correctly detect uclibc&apos;s version of strerror_r, and
defines its own.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>halcy0n@gentoo.org</who>
            <bug_when>2006-01-15 15:16:46 0000</bug_when>
            <thetext>Seems to be a uclibc problem, giving it to the embedded guys.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ps.m@gmx.net</who>
            <bug_when>2006-01-16 01:33:03 0000</bug_when>
            <thetext>cant recall when it was solved in uClibc, the part in string.h around __xpg_strerror_r has to backported to 0.9.27</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-01-16 01:34:55 0000</bug_when>
            <thetext>changing string.h wouldnt help

the configure check links against libc.so looking for the strerror_r symbol which uClibc doesnt export</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2006-05-24 14:44:08 0000</bug_when>
            <thetext>Reopen if this still a problem with uclibc-0.9.28</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-05-25 14:21:58 0000</bug_when>
            <thetext>it is a problem until an alias is made for the strerror_r symbol (still this way in uClibc svn)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ps.m@gmx.net</who>
            <bug_when>2006-05-25 14:39:41 0000</bug_when>
            <thetext>and which one should be exported? __glibc_strerror_r or __xpg_strerror_r?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-05-25 16:34:52 0000</bug_when>
            <thetext>the xpg one:
http://www.opengroup.org/onlinepubs/009695399/functions/strerror.html</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ps.m@gmx.net</who>
            <bug_when>2006-05-25 17:26:08 0000</bug_when>
            <thetext>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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-09-15 00:55:40 0000</bug_when>
            <thetext>this will be fixed in next uClibc release</thetext>
          </long_desc>
      
    </bug>

</bugzilla>