Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3083 - linux-2.4.19-gentoo-r5 doesn't compile on linux-2.4.19-gentoo-r5 with gcc-3.1-r4
Summary: linux-2.4.19-gentoo-r5 doesn't compile on linux-2.4.19-gentoo-r5 with gcc-3.1-r4
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Matthew Kennedy (RETIRED)
URL: http://www.inom.sector7.nu/kernelconf
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-27 16:49 UTC by Patrik Kullman
Modified: 2003-02-04 19:42 UTC (History)
1 user (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 Patrik Kullman 2002-05-27 16:49:16 UTC
I get the following error when trying to compile linux-2.4.19-gentoo-r5 with
gcc-3.1-r4 on linux-2.4.19-gentoo-r5:

ld -m elf_i386 -T /usr/src/linux-2.4.19-gentoo-r5/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o
init/do_mounts.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o
fs/fs.o ipc/ipc.o \
         drivers/acpi/acpi.o drivers/char/char.o drivers/block/block.o
drivers/misc/misc.o drivers/net/net.o drivers/media/media.o
drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o
drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/sound/sounddrivers.o
drivers/pci/driver.o drivers/pnp/pnp.o drivers/video/video.o
drivers/message/i2o/i2o.o \
        net/network.o \
        /usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib/lib.a
/usr/src/linux-2.4.19-gentoo-r5/lib/lib.a
/usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
fs/fs.o: In function `dput':
fs/fs.o(.text+0x1461d): undefined reference to `atomic_dec_and_lock'
make: *** [vmlinux] Error 1

I've put my .config on the URL.
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2002-05-28 13:57:30 UTC
Are you doing the following? 
 
cd /usr/src/linux 
cp .config /tmp 
make mrproper 
cp /tmp/.config . 
make menuconfig 
make dep 
make clean 
make bzImage modules modules_install 
Comment 2 Matthew Kennedy (RETIRED) gentoo-dev 2002-05-28 14:16:47 UTC
I don't believe you have a problem compiling a kernel with gcc3.1. I think    
it's more likely your config is wrong.   
   
$ cd /tmp   
$ cp -a /usr/src/linux* .   
(linux --> linux-2.4.19-gentoo-r5)  
$ cd linux   
$ wget http://www.inom.sector7.nu/kernelconf   
$ mv kernelconf /tmp   
$ make mrproper   
$ cp /tmp/kernelconf .config   
$ make menuconfig   
(then exit and save)   
$ make dep   
$ make clean   
$ make bzImage 
... 
ld -m elf_i386 -T /tmp/linux-2.4.19-gentoo-r5/arch/i386/vmlinux.lds -e stext 
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o 
init/version.o init/do_mounts.o \ 
        --start-group \ 
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o 
fs/fs.o ipc/ipc.o \ 
         drivers/acpi/acpi.o drivers/char/char.o drivers/block/block.o 
drivers/misc/misc.o drivers/net/net.o drivers/media/media.o 
drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o 
drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/sound/sounddrivers.o 
drivers/pci/driver.o drivers/video/video.o drivers/message/i2o/i2o.o \ 
        net/network.o \ 
        /tmp/linux-2.4.19-gentoo-r5/arch/i386/lib/lib.a 
/tmp/linux-2.4.19-gentoo-r5/lib/lib.a 
/tmp/linux-2.4.19-gentoo-r5/arch/i386/lib/lib.a \ 
        --end-group \ 
        -o vmlinux 
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] 
\)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map 
make[1]: Entering directory `/tmp/linux-2.4.19-gentoo-r5/arch/i386/boot' 
gcc -E -D__KERNEL__ -I/tmp/linux-2.4.19-gentoo-r5/include -D__BIG_KERNEL__ 
-traditional -DSVGA_MODE=NORMAL_VGA  bootsect.S -o bbootsect.s 
as -o bbootsect.o bbootsect.s 
bbootsect.s: Assembler messages: 
bbootsect.s:256: Warning: indirect lcall without `*' 
ld -m elf_i386 -Ttext 0x0 -s --oformat binary bbootsect.o -o bbootsect 
gcc -E -D__KERNEL__ -I/tmp/linux-2.4.19-gentoo-r5/include -D__BIG_KERNEL__ 
-D__ASSEMBLY__ -traditional -DSVGA_MODE=NORMAL_VGA  setup.S -o bsetup.s 
as -o bsetup.o bsetup.s 
bsetup.s: Assembler messages: 
bsetup.s:1156: Warning: value 0x37ffffff truncated to 0x37ffffff 
bsetup.s:1546: Warning: indirect lcall without `*' 
ld -m elf_i386 -Ttext 0x0 -s --oformat binary -e begtext -o bsetup bsetup.o 
make[2]: Entering directory 
`/tmp/linux-2.4.19-gentoo-r5/arch/i386/boot/compressed' 
tmppiggy=_tmp_$$piggy; \ 
rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk; \ 
objcopy -O binary -R .note -R .comment -S /tmp/linux-2.4.19-gentoo-r5/vmlinux 
$tmppiggy; \ 
gzip -f -9 < $tmppiggy > $tmppiggy.gz; \ 
echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) 
input_data = .; *(.data) input_data_end = .; }}" > $tmppiggy.lnk; \ 
ld -m elf_i386 -r -o piggy.o -b binary $tmppiggy.gz -b elf32-i386 -T 
$tmppiggy.lnk; \ 
rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk 
gcc -D__ASSEMBLY__ -D__KERNEL__ -I/tmp/linux-2.4.19-gentoo-r5/include 
-traditional -c head.S 
gcc -D__KERNEL__ -I/tmp/linux-2.4.19-gentoo-r5/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon  
-DKBUILD_BASENAME=misc -c misc.c 
ld -m elf_i386 -Ttext 0x100000 -e startup_32 -o bvmlinux head.o misc.o piggy.o 
make[2]: Leaving directory 
`/tmp/linux-2.4.19-gentoo-r5/arch/i386/boot/compressed' 
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o tools/build 
tools/build.c -I/tmp/linux-2.4.19-gentoo-r5/include 
objcopy -O binary -R .note -R .comment -S compressed/bvmlinux 
compressed/bvmlinux.out 
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage 
Root device is (3, 3) 
Boot sector 512 bytes. 
Setup is 4792 bytes. 
System is 1340 kB 
warning: kernel is too big for standalone boot from floppy 
make[1]: Leaving directory `/tmp/linux-2.4.19-gentoo-r5/arch/i386/boot' 
$ gcc --version |head -1 
gcc (GCC) 3.1 
 
As you can see, your kernel config builds fine for me.