[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#339389: glibc: FTBFS on amd64: sem_trywait.S:59: Error: symbol `sem_trywait' is already defined



Package: glibc
Version: 2.3.5-8
Severity: important
Tags: patch

Hi,

glibc is failing to build on amd64 with the following error:
gcc ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S -c  -I../include -I. -I/build/buildd/glibc-2.3.5/build-tree/amd64-libc/nptl -I.. -I../libio  -I/build/buildd/glibc-2.3.5/build-tree/amd64-libc -I../sysdeps/x86_64/elf -I../libidn/sysdeps/unix -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -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 -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.0.3/include -isystem /build/buildd/glibc-2.3.5/debian/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1 -DIS_IN_libpthread=1    -DASSEMBLER -g -Wa,--noexecstack  -o /build/buildd/glibc-2.3.5/build-tree/amd64-libc/nptl/sem_trywait.o -MD -MP -MF /build/buildd/glibc-2.3.5/build-tree/amd64-libc/nptl/sem_trywait.o.dt -MT /build/buildd/glibc-2.3.5/build-tree/amd64-libc/nptl/sem_trywait.o
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Assembler messages:
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S:59: Error: symbol `sem_trywait' is already defined
make[3]: *** [/build/buildd/glibc-2.3.5/build-tree/amd64-libc/nptl/sem_trywait.o] Error 1
make[3]: Leaving directory `/build/buildd/glibc-2.3.5/build-tree/glibc-2.3.5/np
tl'

I believe the attached patch should fix it.  It now does
the same as on i386, and have the real symbol named
__new_sem_trywait, and add the weak alias as sem_trywait.

With the attached patch it builds, and seems to work fine.


Kurt

--- nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S.old	2005-11-15 23:09:31.000000000 +0100
+++ nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S	2005-11-15 23:10:09.000000000 +0100
@@ -29,10 +29,10 @@
 
 	.text
 
-	.globl	sem_trywait
-	.type	sem_trywait,@function
+	.globl	__new_sem_trywait
+	.type	__new_sem_trywait,@function
 	.align	16
-sem_trywait:
+__new_sem_trywait:
 	movl	(%rdi), %eax
 2:	testl	%eax, %eax
 	jz	1f

Reply to: