<?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>203711</bug_id>
          
          <creation_ts>2007-12-29 19:54 0000</creation_ts>
          <short_desc>sys-apps/util-linux-2.13-r3 fails to compile on uclibc due to multiple problems</short_desc>
          <delta_ts>2008-02-01 10:57:30 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>Core system</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>stefan@the2masters.de</reporter>
          <assigned_to>embedded@gentoo.org</assigned_to>
          <cc>aurelien.francillon@inrialpes.fr</cc>
    
    <cc>christoph.gysin@fr33z3.org</cc>
    
    <cc>phreak@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>stefan@the2masters.de</who>
            <bug_when>2007-12-29 19:54:02 0000</bug_when>
            <thetext>I&apos;m trying to update a uclibc-base stage3 to ~x86, first I had to add 3 lines to /usr/include/netdb.h, like described in http://bugs.gentoo.org/show_bug.cgi?id=195368

The only package left with build errors is util-linux

Making all in include
Making all in disk-utils
fsck.cramfs.c:39:1: warning: &quot;_GNU_SOURCE&quot; redefined
In file included from &lt;command-line&gt;:0:
./../config.h:206:1: warning: this is the location of the previous definition
Making all in fdisk
Making all in getopt
Making all in hwclock
Making all in login-utils
agetty.c: In function &apos;do_prompt&apos;:
agetty.c:887: error: &apos;HOST_NAME_MAX&apos; undeclared (first use in this function)
agetty.c:887: error: (Each undeclared identifier is reported only once
agetty.c:887: error: for each function it appears in.)
make[2]: *** [agetty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I grepped through another system with glibc, found a declaration of HOST_NAME_MAX to 64 and added this to /usr/include/netdb.h (very bad hack!)

But it&apos;s not enough, util-linux crashes now with this:

Making all in include
Making all in disk-utils
fsck.cramfs.c:39:1: warning: &quot;_GNU_SOURCE&quot; redefined
In file included from &lt;command-line&gt;:0:
./../config.h:206:1: warning: this is the location of the previous definition
Making all in fdisk
Making all in getopt
Making all in hwclock
Making all in login-utils
Making all in misc-utils
Making all in mount
Making all in partx
Making all in po
Making all in schedutils
chrt.c:24:1: warning: &quot;_GNU_SOURCE&quot; redefined
In file included from &lt;command-line&gt;:0:
./../config.h:206:1: warning: this is the location of the previous definition
taskset.c:29:1: warning: &quot;_GNU_SOURCE&quot; redefined
In file included from &lt;command-line&gt;:0:
./../config.h:206:1: warning: this is the location of the previous definition
taskset.c: In function &apos;main&apos;:
taskset.c:407: error: &apos;cpu_set_t&apos; undeclared (first use in this function)
taskset.c:407: error: (Each undeclared identifier is reported only once
taskset.c:407: error: for each function it appears in.)
taskset.c:407: error: expected expression before &apos;)&apos; token
taskset.c:440: error: expected expression before &apos;)&apos; token
taskset.c:447: error: expected expression before &apos;)&apos; token
make[2]: *** [taskset.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

this time I don&apos;t know how to fix it ;)



Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/util-linux-2.13-r3 on uclibc



Expected Results:  
util-linux should compile.

the stage3 i&apos;m using is stage3-x86-uclibc-2006.1.tar.bz2, updated to ~x86 with emerge -e world

$ emerge --info
Portage 2.1.4_rc11 (uclibc/x86, gcc-4.2.2, uclibc-0.9.28.3-r1, 2.6.24-rc6-git2 i686)
=================================================================
System uname: 2.6.24-rc6-git2 i686 AMD Athlon(tm) 64 Processor 3700+
Timestamp of tree: Sat, 29 Dec 2007 12:30:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r4
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
CBUILD=&quot;i386-gentoo-linux-uclibc&quot;
CFLAGS=&quot;-O2 -march=pentium3 -mtune=k8 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs&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/revdep-rebuild /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-O2 -march=pentium3 -mtune=k8 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/&quot;
LDFLAGS=&quot;-Wl,-z,relro -Wl,--as-needed -Wl,-O1&quot;
MAKEOPTS=&quot;-j3 -s&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;minimal nocxx unicode x86&quot; ELIBC=&quot;uclibc&quot; KERNEL=&quot;linux&quot; USERLAND=&quot;GNU&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-12 10:48:35 0000</bug_when>
            <thetext>ive added a patch to account for uClibc deficiencies to util-linux-2.13-r3

http://sources.gentoo.org/sys-apps/util-linux/files/util-linux-2.13-uclibc.patch?rev=1.1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-29 17:14:24 0000</bug_when>
            <thetext>*** Bug 207918 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-01 10:57:30 0000</bug_when>
            <thetext>*** Bug 208411 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
    </bug>

</bugzilla>