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

Bug#422372: /usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init': undefined reference to `__init_array_end'



Dieter Hametner a écrit :
> Hi
> 
> Am Samstag, 5. Mai 2007 schrieb Aurelien Jarno:
>> Dieter Hametner a écrit :
>>> Package: libc6-dev
>>> Version: 2.5-5
>>> Severity: important
>>>
>>> When linking my project I get following error message since upgrade
>>> from libc6-dev_2.5-4 to libc6-dev_2.5-5:
>>>
>> What is you version of binutils? Upgrading it to the unstable version
>> should fix the problem.
> 
> My version of binutils:
> $ dpkg -l 'binutils'
> ii  binutils                     2.17cvs20070426-4
> 
>>> g++ -fPIC -g tntnet-config --libs -Wl,--whole-archive -shared -o

The bug is most probably due to -Wl,--whole-archive.

Quoting ld.1:

  Two notes when using this option from gcc: First, gcc doesn’t
  know about this option, so you have to use
  -Wl,-whole-archive. Second, don’t forget to use -Wl,-no-whole-archive
  after your list of archives, because gcc will add its own list of
  archives to your link and you may not want this flag to affect those
  as well.

I guess there is a missing -Wl,-no-whole-archive at the end of the g++
command. Could you please try?

Cheers,
Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply to: