Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”
Severity: normal
Package: gcc-4.5
Version: 4.5.0-1
Hi,
I'm trying to link a project with g++-4.5 and LTO:
$ g++-4.5 -flto -fno-exceptions -Wl,--gc-sections -lGL -lGLU -L/usr/X11R6/lib -lXext -lX11 -lfreetype -lz -o parser script/parser.o common/common.a texgen/texgen.a meshgen/meshgen.a texgen/texturescript.o meshgen/meshscript.o
/usr/bin/ld: Ñ: invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition
/lib/libpthread.so.0: could not read symbols: Bad value
collect2: ld returned 1 exit status
It works with no errors if I remove -flto. (There's lots of other chaos if I
throw -frepo into the mix, but I'll keep that for a later bug. :-) )
Unfortunately these sources are private, so I cannot post them to the bug.
I'd be happy providing a tarball to the GCC Debian maintainers or upstream,
though, provided that they are not made public.
/* Steinar */
--
Chief, Tech:Server
http://www.sesse.net/
Reply to: