Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111546 - udev-071 fails with KLIBC enabled
Summary: udev-071 fails with KLIBC enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 103936
  Show dependency tree
 
Reported: 2005-11-05 05:19 UTC by Lars Weiler (RETIRED)
Modified: 2005-11-22 12:07 UTC (History)
1 user (show)

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


Attachments
genkernel fix for 2.6.14 on ppc (genkernel-ppc-2.6.14.patch,564 bytes, patch)
2005-11-06 18:55 UTC, Lars Weiler (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Weiler (RETIRED) gentoo-dev 2005-11-05 05:19:05 UTC
The current genkernel (3.3.6) fails while emerging the internal udev for the
initramfs with 2.6.14-gentoo-sources.

I tracked down the error and can reproduce it with a clean udev-071 directory. 
This happens when you set USE_KLIBC=true.  Oh, this is on ppc, if you didn't saw
it.  And klibc/linux -> /usr/src/linux-2.6.14-gentoo is set.

elrohir udev-071 # make KERNEL_DIR=/usr/src/linux USE_KLIBC=true USE_LOG=false
DEBUG=true udevdir=/dev all etc/udev/udev.conf
make -C klibc KRNLSRC=/usr/src/linux SUBDIRS=klibc TESTS= \
                 SHLIBDIR=/tmp/udev-071/klibc/.install/lib \
                 INSTALLDIR=/tmp/udev-071/klibc/.install \
                 bindir=/tmp/udev-071/klibc/.install/bin \
                 mandir=/tmp/udev-071/klibc/.install/man all install
make[1]: Entering directory `/tmp/udev-071/klibc'
rm -f klibc.config 
echo 'ARCH=ppc' >> klibc.config
echo 'CROSS=' >> klibc.config
echo 'KCROSS=' >> klibc.config
echo 'CC=gcc' >> klibc.config
echo 'LD=ld' >> klibc.config
echo 'REQFLAGS=-D__KLIBC__=1 -D__KLIBC_MINOR__=1 -nostdlib -nostdinc
-iwithprefix include' >> klibc.config
echo 'OPTFLAGS=-Os' >> klibc.config
echo 'LDFLAGS=' >> klibc.config
echo 'STRIP=strip' >> klibc.config
echo 'STRIPFLAGS=--strip-all -R .comment -R .note' >> klibc.config
echo 'EMAIN=-e main' >> klibc.config
echo 'BITSIZE=32' >> klibc.config
echo 'prefix=/tmp/udev-071/klibc/.install' >> klibc.config
echo 'bindir=/tmp/udev-071/klibc/.install/bin' >> klibc.config
echo 'libdir=/tmp/udev-071/klibc/.install/lib' >> klibc.config
echo 'includedir=/tmp/udev-071/klibc/.install/include' >> klibc.config
perl makeklcc.pl klcc.in klibc.config \
/usr/bin/perl > klcc || ( rm -f klcc ; exit 1 )
chmod a+x klcc     
make[2]: Entering directory `/tmp/udev-071/klibc/klibc'
gcc -Wp,-MT,arch/ppc/crt0.o,-MD,arch/ppc/.crt0.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -D__ASSEMBLY__ -c -o arch/ppc/crt0.o arch/ppc/crt0.S
cp arch/ppc/crt0.o .
gcc -Wp,-MT,__static_init.o,-MD,./.__static_init.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o __static_init.o __static_init.c
gcc -Wp,-MT,vsnprintf.o,-MD,./.vsnprintf.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib --I./zlib -DWITH_ERRLIST
-W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o vsnprintf.o vsnprintf.c    
gcc -Wp,-MT,snprintf.o,-MD,./.snprintf.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o snprintf.o snprintf.c        
gcc -Wp,-MT,vsprintf.o,-MD,./.vsprintf.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o vsprintf.o vsprintf.c        
gcc -Wp,-MT,sprintf.o,-MD,./.sprintf.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o sprintf.o sprintf.c            
gcc -Wp,-MT,asprintf.o,-MD,./.asprintf.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o asprintf.o asprintf.c        
gcc -Wp,-MT,vasprintf.o,-MD,./.vasprintf.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o vasprintf.o vasprintf.c    
gcc -Wp,-MT,vsscanf.o,-MD,./.vsscanf.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o vsscanf.o vsscanf.c            
gcc -Wp,-MT,sscanf.o,-MD,./.sscanf.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o sscanf.o sscanf.c                
gcc -Wp,-MT,ctypes.o,-MD,./.ctypes.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o ctypes.o ctypes.c
gcc -Wp,-MT,strntoumax.o,-MD,./.strntoumax.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o strntoumax.o strntoumax.c
gcc -Wp,-MT,strntoimax.o,-MD,./.strntoimax.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o strntoimax.o strntoimax.c
gcc -Wp,-MT,atoi.o,-MD,./.atoi.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o atoi.o atoi.c
gcc -Wp,-MT,atol.o,-MD,./.atol.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o atol.o atol.c
gcc -Wp,-MT,atoll.o,-MD,./.atoll.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o atoll.o atoll.c
gcc -Wp,-MT,strtol.o,-MD,./.strtol.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o strtol.o strtol.c                
gcc -Wp,-MT,strtoll.o,-MD,./.strtoll.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o strtoll.o strtoll.c            
gcc -Wp,-MT,strtoul.o,-MD,./.strtoul.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o strtoul.o strtoul.c            
gcc -Wp,-MT,strtoull.o,-MD,./.strtoull.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o strtoull.o strtoull.c        
gcc -Wp,-MT,strtoimax.o,-MD,./.strtoimax.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W
-Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o strtoimax.o strtoimax.c    
gcc -Wp,-MT,strtoumax.o,-MD,./.strtoumax.o.d -Os  -D__KLIBC__=1
-D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include
-I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include
-I../linux/include2 -I/usr/src/linux/include -I./zlib --I./zlib -DWITH_ERRLIST
-W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
-DDYNAMIC_CRC_TABLE -c -o strtoumax.o strtoumax.c    
gcc -Wp,-MT,globals.o,-MD,./.globals.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1
-nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc
-I../include/bits32 -I../include -I../linux/include -I../linux/include2
-I/usr/src/linux/include -I./zlib -I./zlib -DWITH_ERRLIST -W -Wall
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -DDYNAMIC_CRC_TABLE
-c -o globals.o globals.c            
In file included from globals.c:6:
../include/errno.h:6:23: asm/errno.h: No such file or directory
make[2]: *** [globals.o] Error 1
make[2]: Leaving directory `/tmp/udev-071/klibc/klibc'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/udev-071/klibc'
make: *** [/tmp/udev-071/klibc/.install/bin/klcc] Error 2
elrohir udev-071 #
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-05 05:24:31 UTC

*** This bug has been marked as a duplicate of 99349 ***
Comment 2 Lars Weiler (RETIRED) gentoo-dev 2005-11-05 06:14:43 UTC
Jakub, this is not the same bug like 99349.  I read through the other bug before
I posted this one; otherwise I would not have done it.

The error I posted is with genkernel.  So, either genkernel needs to be fixed
or, as it looks like, udev can't work with 2.6.14-sources and klibc enabled. 
Probably this is a bug due to the change of asm-ppc to asm-powerpc (at least for
some header-files) in the current kernel.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-11-05 13:35:08 UTC
This looks like a udev issue if you can reproduce it manually, the workaround to
disable klibc is doable but would greatly push up the size of the udev binary,
not making this ideal... Greg, any suggestions?
Comment 4 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-11-06 12:04:37 UTC
I don't see how this is a udev issue.

Oh wait, the internal to udev klibc is failing to build, ugh.  Care to propose
a patch for how to fix this up?  I don't have access to a ppc box anymore to test
this with.
Comment 5 Lars Weiler (RETIRED) gentoo-dev 2005-11-06 12:57:56 UTC
To be honest, I tried and have no clue for fixing this problem.  Otherwise I
would have added a patch already.
Comment 6 Lars Weiler (RETIRED) gentoo-dev 2005-11-06 14:55:36 UTC
I tracked down the problem somewhat more, what seems to be kernel-related.

With 2.6.14 we have include/asm-ppc and include/asm-powerpc, unfortunately the
merged-headers-move isn't complete yet.  include/asm is a symlink to
include/asm-${ARCH}, that means include/asm-ppc in my case.

Now, udev (and every other application that is based on the kernel directly
instead of linux-headers) fails on every file in include/asm-powerpc as it can't
find them in include/asm.

How to fix: In include/asm-ppc I did `ln -s ../asm-powerpc/* .` so that every
file can be found in include/asm-ppc resp. in include/asm.  Now udev compiles
fine with klibc enabled.
Comment 7 Lars Weiler (RETIRED) gentoo-dev 2005-11-06 18:55:04 UTC
Created attachment 72351 [details, diff]
genkernel fix for 2.6.14 on ppc

This is an ugly and quick workaround for genkernel, so that one can create a
kernel for a ppc-LiveCD.

Now I can compile udev and splashutils (they also failed on missing
asm-headers) again.
Comment 8 Lars Weiler (RETIRED) gentoo-dev 2005-11-06 20:08:58 UTC
(In reply to comment #7)
> Created an attachment (id=72351) [edit]
> genkernel fix for 2.6.14 on ppc

Not really a fix.  I tested it somewhat more in a big catalyst-run, but there
the patch doesn't work.  Probably it's because I called genkernel with
--no-mrproper in my tests before.  In the patch mrproper is called after the
linking, so I guess that the links are removed again...
Comment 9 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-11-09 15:58:13 UTC
Note, klibc just got removed from upstream udev, so as of the 075 version of
udev, you will have to have a separate klibc package to build it against, if
you want to build it with klibc.
Comment 10 Eric Edgar (RETIRED) gentoo-dev 2005-11-21 10:07:00 UTC
udev-075 will be bundled in the next genkernel and it uses klibc on ppc and 
2.6.14
Comment 11 Eric Edgar (RETIRED) gentoo-dev 2005-11-22 12:07:03 UTC
 fixed in 3.3.7