Multiple definition of ... during linking of libc.a

Jean Charles Mammana mammana@gostai.com
Thu Aug 26 15:27:00 GMT 2010


Here, my config file for crosstool 1.8.1 for the same toolchain.
You need to download the linux-2.6.27.47.tar.gz tarball separately.

Please, help. I stuck on this problem for two day :(


Jean Charles Mammana a écrit :
> Hi all,
> I'm trying to make a toolchain for ARM using crosstool-ng-1.8.0 on 
> Ubuntu 10.04.
> At the end of building libc, I have some linker errors :
>
> [ALL  ]    arm-gostai-linux-gnueabi-gcc     -nostdlib -nostartfiles 
> -static -o 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/elf/sln    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/csu/crt1.o 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/csu/crti.o 
> `arm-gostai-linux-gnueabi-gcc     --print-file-name=crtbegin.o` 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/elf/sln.o  
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a 
> -lgcc -lgcc_eh   
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a 
> `arm-gostai-linux-gnueabi-gcc     --print-file-name=crtend.o` 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/csu/crtn.o 
>
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o): 
> In function `_dl_important_hwcaps':
> [ALL  ]    dl-sysdep.c:(.text+0x4): multiple definition of 
> `_dl_important_hwcaps'
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-support.o):dl-support.c:(.text+0x298): 
> first defined here
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/gcc-core-shared/lib/gcc/arm-gostai-linux-gnueabi/4.2.2/../../../../arm-gostai-linux-gnueabi/bin/ld: 
> Warning: size of symbol `_dl_important_hwcaps' changed from 40 in 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-support.o) 
> to 1572 in 
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o) 
>
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o):(.data.rel.ro+0x4): 
> multiple definition of `__libc_stack_end'
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-support.o):(.data.rel.ro+0x0): 
> first defined here
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o):(.data.rel.ro+0x0): 
> multiple definition of `__libc_enable_secure'
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(enbl-secure.o):(.data.rel.ro+0x0): 
> first defined here
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(init-first.o):(.data+0x0): 
> multiple definition of `__libc_multiple_libcs'
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o):(.bss+0x0): 
> first defined here
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o): 
> In function `_dl_important_hwcaps':
> [ALL  ]    dl-sysdep.c:(.text+0x600): undefined reference to 
> `_dl_hwcap_mask'
> [ALL  ]    
> /home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/libc.a(dl-sysdep.o): 
> In function `_dl_sysdep_start':
> [ALL  ]    dl-sysdep.c:(.text+0xb24): undefined reference to `_dl_argc'
> [ALL  ]    dl-sysdep.c:(.text+0xb3c): undefined reference to 
> `_dl_fpu_control'
> [ALL  ]    collect2: ld returned 1 exit status
> [ERROR]    make[3]: *** 
> [/home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc/elf/sln] 
> Error 1
> [ALL  ]    make[3]: Leaving directory 
> `/home/gostai/crosstool-ng-1.8.0/toolchain/targets/src/glibc-2.7/elf'
> [ERROR]    make[2]: *** [elf/others] Error 2
> [ALL  ]    make[2]: Leaving directory 
> `/home/gostai/crosstool-ng-1.8.0/toolchain/targets/src/glibc-2.7'
> [ERROR]    make[1]: *** [all] Error 2
> [ALL  ]    make[1]: Leaving directory 
> `/home/gostai/crosstool-ng-1.8.0/toolchain/targets/arm-gostai-linux-gnueabi/build/build-libc' 
>
> [ERROR]    Build failed in step 'Installing C library'
> [ERROR]    Error happened in 
> '/home/gostai/crosstool-ng-1.8.0/crosstool-ng-1.8.0-install/lib/ct-ng-1.8.0/scripts/functions' 
> in function 'CT_DoExecLog' (line unknown, sorry)
> [ERROR]          called from 
> '/home/gostai/crosstool-ng-1.8.0/crosstool-ng-1.8.0-install/lib/ct-ng-1.8.0/scripts/build/libc/glibc.sh' 
> at line # 496 in function 'do_libc'
> [ERROR]          called from 
> '/home/gostai/crosstool-ng-1.8.0/crosstool-ng-1.8.0-install/lib/ct-ng-1.8.0/scripts/crosstool-NG.sh' 
> at line # 586 in function 'main'
> [ERROR]    Look at 
> '/home/gostai/x-tools/arm-gostai-linux-gnueabi/build.log' for more 
> info on this error.
> [ERROR]  (elapsed: 25:17.44)
>
>
> The complete build.log is in attachement.
>
> I do not know how to solve this problem.
>
> Thanks.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100826/660a17c6/attachment.ksh>
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq


More information about the crossgcc mailing list