<?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>221939</bug_id>
          
          <creation_ts>2008-05-13 13:11 0000</creation_ts>
          <short_desc>sys-apps/util-linux-2.13.1.1 fails to compile on uclibc due to a.out.h header problems together with current linux-headers</short_desc>
          <delta_ts>2008-06-07 17:45:46 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>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/1463</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>leio@gentoo.org</reporter>
          <assigned_to>embedded@gentoo.org</assigned_to>
          <cc>jason@brundagemgt.com</cc>
    
    <cc>mart.raudsepp@artecdesign.ee</cc>
    
    <cc>sergey.dryabzhinsky@gmail.com</cc>
    
    <cc>steeeeeveee@gmx.net</cc>

      

      
          <long_desc isprivate="0">
            <who>leio@gentoo.org</who>
            <bug_when>2008-05-13 13:11:13 0000</bug_when>
            <thetext>sys-apps/util-linux-2.13.1.1 and all other versions that don&apos;t block coreutils-6.11 (therefore haven&apos;t tried older than util-linux-2.13-r2) fail to compile on a uclibc-0.9.28.3-r6 system because it can&apos;t find the definitions of OMAGIC, NMAGIC and ZMAGIC, which come from /usr/include/a.out.h on a glibc system.
uclibc provided a.out.h just includes linux/a.out.h, but that file does not exist, at least not with linux-headers-2.6.25-r1:


Making all in text-utils
make[2]: Entering directory `/var/tmp/portage/sys-apps/util-linux-2.13.1.1/work/util-linux-ng-2.13.1.1/text-utils&apos;
i386-gentoo-linux-uclibc-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -include ../config.h -I../include -DLOCALEDIR=\&quot;/usr/share/locale\&quot;  -fsigned-char -Os -mtune=geode -pipe -MT more.o -MD -MP -MF .deps/more.Tpo -c -o more.o more.c
In file included from more.c:57:
/usr/include/a.out.h:4:26: error: linux/a.out.h: No such file or directory
more.c: In function &apos;magic&apos;:
more.c:549: error: &apos;OMAGIC&apos; undeclared (first use in this function)
more.c:549: error: (Each undeclared identifier is reported only once
more.c:549: error: for each function it appears in.)
more.c:550: error: &apos;NMAGIC&apos; undeclared (first use in this function)
more.c:551: error: &apos;ZMAGIC&apos; undeclared (first use in this function)
make[2]: *** [more.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-apps/util-linux-2.13.1.1/work/util-linux-ng-2.13.1.1/text-utils&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/util-linux-2.13.1.1/work/util-linux-ng-2.13.1.1&apos;
make: *** [all] Error 2
 * 
 * ERROR: sys-apps/util-linux-2.13.1.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2058:  Called die
 * The specific snippet of code:
 *       emake || die &quot;emake failed&quot;
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sys-apps/util-linux-2.13.1.1/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sys-apps/util-linux-2.13.1.1/temp/environment&apos;.
 *</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leio@gentoo.org</who>
            <bug_when>2008-05-13 13:11:40 0000</bug_when>
            <thetext>Portage 2.1.5_rc10 (uclibc/x86, gcc-4.3.0, uclibc-0.9.28.3-r6, 2.6.24-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Timestamp of tree: Mon, 12 May 2008 07:15:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.4
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.62
sys-devel/automake:  1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
CBUILD=&quot;i386-gentoo-linux-uclibc&quot;
CFLAGS=&quot;-Os -mtune=geode -pipe&quot;
CHOST=&quot;i386-gentoo-linux-uclibc&quot;
CONFIG_PROTECT=&quot;/etc&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-Os -mtune=geode -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig buildpkg distlocks nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://ftp.linux.ee/pub/gentoo/distfiles/ http://trumpetti.atm.tut.fi/gentoo/&quot;
LDFLAGS=&quot;-Wl,-O1,--as-needed&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/root/overlay /root/x11&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;bindist cli cracklib dri midi mudflap ncurses nocxx openmp pcre perl readline reflection session spl ssl tcpd uclibc x86 xcb xorg zlib&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias&quot; ELIBC=&quot;uclibc&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; USERLAND=&quot;GNU&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sergey.dryabzhinsky@gmail.com</who>
            <bug_when>2008-05-19 05:47:22 0000</bug_when>
            <thetext>Builds fine with stable linux-headers-2.6.23</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>steeeeeveee@gmx.net</who>
            <bug_when>2008-05-29 17:41:05 0000</bug_when>
            <thetext>Yes. Stable (In reply to comment #2)
&gt; Builds fine with stable linux-headers-2.6.23
&gt; 
sys-kernel/linux-headers-2.6.23-r3 headers work too.


(In reply to comment #1)
&gt; Portage 2.1.5_rc10 (uclibc/x86, gcc-4.3.0, uclibc-0.9.28.3-r6, 2.6.24-gentoo-r3
&gt; x86_64)
&gt;
How did you manage to get gcc 4.3.0 with uClibc? I can&apos;t get it to compile under uClibc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leio@gentoo.org</who>
            <bug_when>2008-05-30 00:22:13 0000</bug_when>
            <thetext>I think I manually fixed /usr/include/fenv.h based on changes done on uclibc trunk, as seen by its ViewVC interface - not sure that was for gcc though</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-05-31 05:55:01 0000</bug_when>
            <thetext>fenv.h really has nothing to do with a.out.h or the issue at hand here</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>steeeeeveee@gmx.net</who>
            <bug_when>2008-05-31 11:53:38 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; fenv.h really has nothing to do with a.out.h or the issue at hand here
&gt; 

But emerging gcc 4.3.0 under uClibc is complaining about missing fenv.h:
[...]
/var/tmp/portage/sys-devel/gcc-4.3.0/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.0/work/build/./gcc/ -B/usr/i686-gentoo-linux-uclibc/bin/ -B/usr/i686-gentoo-linux-uclibc/lib/ -isystem /usr/i686-gentoo-linux-uclibc/include -isystem /usr/i686-gentoo-linux-uclibc/sys-include -O -O2  -g -Os -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc -I/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/. -I/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/../include -I/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o bid_decimal_globals.o -MT bid_decimal_globals.o -MD -MP -MF bid_decimal_globals.dep -c /var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:52:18: error: fenv.h: No such file or directory
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c: In function &apos;__dfp_test_except&apos;:
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:64: error: &apos;FE_INEXACT&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:64: error: (Each undeclared identifier is reported only once
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:64: error: for each function it appears in.)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:66: error: &apos;FE_UNDERFLOW&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:68: error: &apos;FE_OVERFLOW&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:70: error: &apos;FE_DIVBYZERO&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:72: error: &apos;FE_INVALID&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c: In function &apos;__dfp_raise_except&apos;:
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:81: error: &apos;FE_INEXACT&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:83: error: &apos;FE_UNDERFLOW&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:85: error: &apos;FE_OVERFLOW&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:87: error: &apos;FE_DIVBYZERO&apos; undeclared (first use in this function)
/var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0/libgcc/config/libbid/bid_decimal_globals.c:89: error: &apos;FE_INVALID&apos; undeclared (first use in this function)
make[3]: *** [bid_decimal_globals.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0/work/build/i686-gentoo-linux-uclibc/libgcc&apos;
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0/work/build&apos;
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0/work/build&apos;
make: *** [profiledbootstrap] Error 2
 *
 * ERROR: sys-devel/gcc-4.3.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4556:  Called toolchain_src_compile
 *             environment, line 5025:  Called gcc_src_compile
 *             environment, line 2891:  Called gcc_do_make
 *             environment, line 2721:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS=&quot;${LDFLAGS}&quot; STAGE1_CFLAGS=&quot;${STAGE1_CFLAGS}&quot; LIBPATH=&quot;${LIBPATH}&quot; BOOT_CFLAGS=&quot;${BOOT_CFLAGS}&quot; ${GCC_MAKE_TARGET} || die &quot;emake failed with ${GCC_MAKE_TARGET}&quot;;
 *  The die message:
 *   emake failed with profiledbootstrap
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sys-devel/gcc-4.3.0/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sys-devel/gcc-4.3.0/temp/environment&apos;.
 *

 * Messages for package sys-devel/gcc-4.3.0:

 *
 * ERROR: sys-devel/gcc-4.3.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4556:  Called toolchain_src_compile
 *             environment, line 5025:  Called gcc_src_compile
 *             environment, line 2891:  Called gcc_do_make
 *             environment, line 2721:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS=&quot;${LDFLAGS}&quot; STAGE1_CFLAGS=&quot;${STAGE1_CFLAGS}&quot; LIBPATH=&quot;${LIBPATH}&quot; BOOT_CFLAGS=&quot;${BOOT_CFLAGS}&quot; ${GCC_MAKE_TARGET} || die &quot;emake failed with ${GCC_MAKE_TARGET}&quot;;
 *  The die message:
 *   emake failed with profiledbootstrap
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sys-devel/gcc-4.3.0/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sys-devel/gcc-4.3.0/temp/environment&apos;.
 *
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leio@gentoo.org</who>
            <bug_when>2008-05-31 14:08:28 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; fenv.h really has nothing to do with a.out.h or the issue at hand here
&gt; &gt; 
&gt; 
&gt; But emerging gcc 4.3.0 under uClibc is complaining about missing fenv.h:

Yes, I forgot to file a bug for that separate issue. Please ensure a separate bug exists for the fenv.h gcc4.3 problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-05-31 17:23:57 0000</bug_when>
            <thetext>as Mart says, this is about util-linux only, not gcc</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>steeeeeveee@gmx.net</who>
            <bug_when>2008-05-31 18:57:56 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; as Mart says, this is about util-linux only, not gcc
&gt; 
Okay. (In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; fenv.h really has nothing to do with a.out.h or the issue at hand here
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; But emerging gcc 4.3.0 under uClibc is complaining about missing fenv.h:
&gt; 
&gt; Yes, I forgot to file a bug for that separate issue. Please ensure a separate
&gt; bug exists for the fenv.h gcc4.3 problem.
&gt; 
I should creat a separate bug or will you do that (with the changes you did to your uClib for getting it to compile GCC &gt;= 4.3. btw: uclibc 0.9.29 has now finally a fenv.h file)?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sergey.dryabzhinsky@gmail.com</who>
            <bug_when>2008-05-31 20:38:46 0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; btw: uclibc 0.9.29 has now finally a fenv.h file)?

On my chroot environment with uClibc-0.9.29:

# qfile fenv.h
sys-devel/gcc (/usr/lib/gcc/i486-gentoo-linux-uclibc/4.2.3/include/g++-v4/tr1/fenv.h)
sys-libs/uclibc (/usr/include/bits/fenv.h)

Don&apos;t tried to compile gcc-4.3.0 yet...
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-06-07 17:45:46 0000</bug_when>
            <thetext>committed the change i proposed upstream (dont use a.out.h)</thetext>
          </long_desc>
      
    </bug>

</bugzilla>