Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-14 Thread Matthias Klose
retitle 578831 collect2 does not handle static libraries forwarded 578831 http://bugs.debian.org/PR578831 tag 578831 + upstream thanks On 08.08.2010 13:40, Kirill Smelkov wrote: On Sun, Aug 08, 2010 at 12:24:58PM +0200, Steinar H. Gunderson wrote: OK, I think I've spotted the problem -- it

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-14 Thread Steinar H. Gunderson
forwarded 578831 http://gcc.gnu.org/PR41376 thanks On Sat, Aug 14, 2010 at 03:57:36PM +0200, Matthias Klose wrote: retitle 578831 collect2 does not handle static libraries forwarded 578831 http://bugs.debian.org/PR578831 tag 578831 + upstream thanks I assume that was the URL you meant (the

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-08-08 Thread Kirill Smelkov
On Sat, Aug 07, 2010 at 10:08:27PM +0200, Steinar H. Gunderson wrote: On Sat, Aug 07, 2010 at 09:46:31PM +0200, Matthias Klose wrote: fixed in binutils 2.20.1-13 (and in binutils from experimental). I'm afraid it's not: fugl:~/dev/tehintro ld -v GNU ld (GNU Binutils for Debian)

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-08-08 Thread Steinar H. Gunderson
On Sun, Aug 08, 2010 at 01:47:09PM +0400, Kirill Smelkov wrote: The fix Matthias reffered to, is that you no longer need to pass -pthread explicitly if your program does not use pthreads. Please try it out -- it should not complain about pthread_cancel. Well, my program uses pthreads, so it's

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-08 Thread Kirill Smelkov
On Sun, Aug 08, 2010 at 11:55:28AM +0200, Steinar H. Gunderson wrote: On Sun, Aug 08, 2010 at 01:47:09PM +0400, Kirill Smelkov wrote: The fix Matthias reffered to, is that you no longer need to pass -pthread explicitly if your program does not use pthreads. Please try it out -- it should

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-08 Thread Steinar H. Gunderson
On Sun, Aug 08, 2010 at 02:20:38PM +0400, Kirill Smelkov wrote: Just a note - if your program uses pthread you should pass -pthread explicitly, even if some other library you link to uses pthread, because with -Wl,-no-add-needed (which is the default in Fedora, and may be some time in Debian

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-08 Thread Steinar H. Gunderson
On Sun, Aug 08, 2010 at 12:24:58PM +0200, Steinar H. Gunderson wrote: Though I may suggest to try latest upstream binutils and gcc-4.5 to see whether it works there, and if not, try harder to still disentangle the testcase. I'll give probably give it a shot, eventually. OK, I think I've

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-08 Thread Steinar H. Gunderson
On Sun, Aug 08, 2010 at 12:46:54PM +0200, Steinar H. Gunderson wrote: OK, I think I've spotted the problem -- it doesn't like that .a files reference variables in .o files. Actually, .a files are not recompiled for LTO at all. If I stick everything in .a files and link, linking is very fast; if

Bug#578831: link failure with LTO: ???invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition???

2010-08-08 Thread Kirill Smelkov
On Sun, Aug 08, 2010 at 12:24:58PM +0200, Steinar H. Gunderson wrote: On Sun, Aug 08, 2010 at 02:20:38PM +0400, Kirill Smelkov wrote: No thanks, I can't afford NDA for myself. I wouldn't require an NDA to be signed -- it would be on honor code. :-) (It's not a commercial product, but I

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-08-07 Thread Steinar H. Gunderson
reopen 578831 thanks On Sat, Aug 07, 2010 at 09:46:31PM +0200, Matthias Klose wrote: fixed in binutils 2.20.1-13 (and in binutils from experimental). I'm afraid it's not: fugl:~/dev/tehintro ld -v GNU ld (GNU Binutils for Debian) 2.20.51-system.20100710 fugl:~/dev/tehintro make Generating

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-06-22 Thread Matthias Klose
On 28.04.2010 10:37, Vincent Danjean wrote: On 27/04/2010 01:26, Matthias Klose wrote: On 23.04.2010 10:22, Steinar H. Gunderson wrote: On Fri, Apr 23, 2010 at 08:41:53AM +0200, Vincent Danjean wrote: Please, look at #577961. It seems to me that this is the same bug (and now, I think the bug

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-06-22 Thread Steinar H. Gunderson
On Tue, Jun 22, 2010 at 02:53:24PM +0200, Matthias Klose wrote: please recheck with the current g++-4.5 in experimental. -lpthread shouldn't be used directly, but pass -pthread to both CXXFLAGS and LDFLAGS. Pretty much no change. With CXXFLAGS including -pthread and LDFLAGS including -pthread

Bug#577961: Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-28 Thread Vincent Danjean
On 27/04/2010 01:26, Matthias Klose wrote: On 23.04.2010 10:22, Steinar H. Gunderson wrote: On Fri, Apr 23, 2010 at 08:41:53AM +0200, Vincent Danjean wrote: Please, look at #577961. It seems to me that this is the same bug (and now, I think the bug belong to gcc-4.5) OK, adding -lpthread

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-27 Thread Steinar H. Gunderson
On Tue, Apr 27, 2010 at 01:26:00AM +0200, Matthias Klose wrote: please make sure that *all* flags (except preprocessor flags) passed to cc1 are also passed to lto1. For common build systems, this does mean passing $(CFLAGS) to the link command. OK. This made no change at all to the undefined

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-26 Thread Matthias Klose
On 23.04.2010 10:22, Steinar H. Gunderson wrote: On Fri, Apr 23, 2010 at 08:41:53AM +0200, Vincent Danjean wrote: Please, look at #577961. It seems to me that this is the same bug (and now, I think the bug belong to gcc-4.5) OK, adding -lpthread makes the error go away. please make sure

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-23 Thread Vincent Danjean
On 23/04/2010 00:54, Steinar H. Gunderson wrote: On Fri, Apr 23, 2010 at 12:19:41AM +0200, Steinar H. Gunderson wrote: 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. :-) ) Actually that's wrong -- I

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-23 Thread Steinar H. Gunderson
On Fri, Apr 23, 2010 at 08:41:53AM +0200, Vincent Danjean wrote: Please, look at #577961. It seems to me that this is the same bug (and now, I think the bug belong to gcc-4.5) OK, adding -lpthread makes the error go away. Now let me try adding -fwhole-program to the link (which is the point of

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-22 Thread Steinar H. Gunderson
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

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”

2010-04-22 Thread Steinar H. Gunderson
On Fri, Apr 23, 2010 at 12:19:41AM +0200, Steinar H. Gunderson wrote: 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. :-) ) Actually that's wrong -- I did a full recompile, and now it fails even without