[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'



Hello Aurelien

Am Samstag, 5. Mai 2007 schrieb Aurelien Jarno:
> [...]
> > >>> When linking my project I get following error message since upgrade 
> >>> from libc6-dev_2.5-4 to libc6-dev_2.5-5:
> [...]
> >>> 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?

Wow! I wouldn't have looked at this. I added -Wl,-no-whole-archive at the end 
of the archives list passed to the linker:

g++ -fPIC -g `tntnet-config --libs` -shared -o libvdr-live.so  live.o thread.o 
tntconfig.o setup.o i18n.o timers.o tools.o recordings.o tasks.o status.o 
epg_events.o epgsearch.o grab.o -Wl,--whole-archive pages/libpages.a 
css/libcss.a images/libimages.a 
javascript/libjavascript.a -Wl,--no-whole-archive httpd/libhttpd.a -lssl

Thanks this fixes the linking problem.

But it does not explain why the problem appeared after the upgrade. It should 
have been wrong on my side even before the update.

>
> Cheers,
> Aurelien

Thanks again for your kind help.

Greetings
Dieter Hametner

-- 
Dieter Hametner
mailto: dh+debian@mittelstation.de



Reply to: