Bug 41025 - v4.3.3, 4.4.1, etc -ftracer sometimes fails by "is already defined"
Summary: v4.3.3, 4.4.1, etc -ftracer sometimes fails by "is already defined"
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2009-08-10 12:35 UTC by Dzianis Kahanovich
Modified: 2013-11-10 08:15 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu-gcc, x86_64-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:

linux-2.6.31 deconfig x86_64 error (16.34 KB, text/plain)
2009-09-21 13:12 UTC, Dzianis Kahanovich

Note You need to log in before you can comment on or make changes to this bug.
Description Dzianis Kahanovich 2009-08-10 12:35:38 UTC
-ftracer on various gcc versions sometimes gives "is already defined" error on build. Was on glibc (x86_*) & linux kernel (x86_64), but now git-kernel build good and I not going deep. Only glibc 2.10.1 log tail:
i686-pc-linux-gnu-gcc ../sysdeps/unix/sysv/linux/dl-execstack.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -pipe -Wstrict-prototypes -mpreferred-stack-boundary=2  -fPIC -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES    -I../include -I/var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl/elf -I/var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED -DNOT_IN_libc=1 -DIS_IN_rtld=1     -pipe -fomit-frame-pointer -ftracer -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -o /var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-execstack.os -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-execstack.os.dt -MT /var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-execstack.os 
../sysdeps/unix/sysv/linux/dl-execstack.c: Assembler messages:
../sysdeps/unix/sysv/linux/dl-execstack.c:163: Error: symbol `__i686.get_pc_thunk.cx' is already defined
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.10.1/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-execstack.os] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.10.1/work/glibc-2.10.1/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.10.1/work/glibc-2.10.1'
make: *** [all] Error 2
Comment 1 Andrew Pinski 2009-09-20 22:10:42 UTC
Can you provide the preprocessed source?
Comment 2 Dzianis Kahanovich 2009-09-21 13:08:32 UTC
(In reply to comment #1)
> Can you provide the preprocessed source?

Yes. After make/error:
(gentoo flavored, sorry)

New info: it happened on -O2 or -O3, and never on -Os".

Also I found how to get same on linux kernel x86_64: "make defconfig", but remove "optimize for size" (CONFIG_CC_OPTIMIZE_FOR_SIZE) and add -ftracer. My working config do not produce this. Next I attaching Makefile. You will need only "make defconfig && make all" on x86_64 for vanilla 2.6.31 kernel (IMHO simpler then glibc).
Comment 3 Dzianis Kahanovich 2009-09-21 13:12:23 UTC
Created attachment 18623 [details]
linux-2.6.31 deconfig x86_64 error
Comment 4 Andrew Pinski 2013-11-10 08:15:42 UTC
No preprocessed source in 4 years so closing.