* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
@ 2011-07-26 9:25 ` rguenth at gcc dot gnu.org
2011-07-26 9:32 ` xunxun1982 at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-26 9:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-26 09:25:00 UTC ---
It sounds like a linker bug. Please try without fancy linker options like
--as-needed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
2011-07-26 9:25 ` [Bug lto/49844] " rguenth at gcc dot gnu.org
@ 2011-07-26 9:32 ` xunxun1982 at gmail dot com
2011-07-27 17:23 ` xunxun1982 at gmail dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-07-26 9:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #2 from PcX <xunxun1982 at gmail dot com> 2011-07-26 09:32:14 UTC ---
(In reply to comment #1)
> It sounds like a linker bug. Please try without fancy linker options like
> --as-needed.
I remove "-Wl,-O1 -Wl,--sort-common -Wl,--as-needed", and it also has the
problem.
ps: other linker option like "-Wl,--enable-auto-image-base
-Wl,--add-stdcall-alias -Wl,--enable-auto-import" is Code::Blocks's default
option.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
2011-07-26 9:25 ` [Bug lto/49844] " rguenth at gcc dot gnu.org
2011-07-26 9:32 ` xunxun1982 at gmail dot com
@ 2011-07-27 17:23 ` xunxun1982 at gmail dot com
2011-08-18 19:03 ` matt at use dot net
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-07-27 17:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #3 from PcX <xunxun1982 at gmail dot com> 2011-07-27 17:22:39 UTC ---
I found that if I add the option "-flto-partition=none", the problem will
disappear.
As is :
---------------------------------------------------------------------------------
g++.exe -shared -Wl,--out-implib=devel\libwxpropgrid.a -Wl,--dll
-Lbase\tinyxml -LE:\MyPack\3rdLib\GUI\wxWidgets-2.8.12\lib\gcc_dll
.objs\sdk\wxpropgrid\src\editors.o .objs\sdk\wxpropgrid\src\extras.o
.objs\sdk\wxpropgrid\src\manager.o .objs\sdk\wxpropgrid\src\odcombo.o
.objs\sdk\wxpropgrid\src\propgrid.o .objs\sdk\wxpropgrid\src\props.o
.objs\sdk\wxpropgrid\src\xh_propgrid.o .objs\sdk\wxpropgrid\src\advprops.o -o
devel\wxpropgrid.dll -mthreads -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -s
-flto -fuse-linker-plugin -Wl,--allow-multiple-definition
-Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import
-lwxmsw28u -flto-partition=none
Creating library file: devel\libwxpropgrid.a
---------------------------------------------------------------------------------
Why?
Does the "-flto-partition=balanced" have some problems?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (2 preceding siblings ...)
2011-07-27 17:23 ` xunxun1982 at gmail dot com
@ 2011-08-18 19:03 ` matt at use dot net
2011-08-18 21:40 ` xunxun1982 at gmail dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: matt at use dot net @ 2011-08-18 19:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
Matt Hargett <matt at use dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matt at use dot net
--- Comment #4 from Matt Hargett <matt at use dot net> 2011-08-18 19:01:29 UTC ---
When building scummvm with gcc 4.6.1, I had a bunch of multiple definition
linker errors that also went away when adding -flto-partition=none . Here are
the errors I had before said workaround:
$ gcc --version
gcc-4.6.real (Ubuntu/Linaro 4.6.1-7ubuntu1) 4.6.1
$ CFLAGS="-Ofast -flto" CXXFLAGS="-Ofast -flto" LDFLAGS="-flto=8
-fuse-linker-plugin -fwhole-program" ./configure
[...]
$ make -j9
[...]
LINK scummvm
cup_player_he.o (symbol from plugin): warning: memset used with constant zero
length parameter; this could be due to transposed parameters
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x1afa0): multiple definition of
`_ZTVN5Scumm9ScummFileE.local.7841'
/tmp/ccMxgdJj.ltrans0.ltrans.o:(.rodata+0xc320): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x1b080): multiple definition of
`_ZTTN5Scumm9ScummFileE.local.7842'
/tmp/ccMxgdJj.ltrans0.ltrans.o:(.rodata+0xc2a0): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x23780): multiple definition of
`_ZTVN6Common16MemoryReadStreamE.local.9080'
/tmp/ccMxgdJj.ltrans5.ltrans.o:(.rodata+0x6440): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x23840): multiple definition of
`_ZTTN6Common16MemoryReadStreamE.local.9093'
/tmp/ccMxgdJj.ltrans5.ltrans.o:(.rodata+0x6400): first defined here
collect2: ld returned 1 exit status
make: *** [scummvm] Error 1
Let me know if you want a tarball of this source tree attached; downloading the
latest scummvm source tarball should give the same results.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (3 preceding siblings ...)
2011-08-18 19:03 ` matt at use dot net
@ 2011-08-18 21:40 ` xunxun1982 at gmail dot com
2011-08-21 15:33 ` xunxun1982 at gmail dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-08-18 21:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #5 from PcX <xunxun1982 at gmail dot com> 2011-08-18 20:24:00 UTC ---
(In reply to comment #4)
I also report to binutils bugzilla:
http://sourceware.org/bugzilla/show_bug.cgi?id=13031
But no one reply. :(
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (4 preceding siblings ...)
2011-08-18 21:40 ` xunxun1982 at gmail dot com
@ 2011-08-21 15:33 ` xunxun1982 at gmail dot com
2012-05-07 12:45 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-08-21 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #6 from PcX <xunxun1982 at gmail dot com> 2011-08-21 15:28:43 UTC ---
I update to gcc 4.6.2 (20110819) and binutils 2.21.53.20110820, and it also has
the problem.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (5 preceding siblings ...)
2011-08-21 15:33 ` xunxun1982 at gmail dot com
@ 2012-05-07 12:45 ` rguenth at gcc dot gnu.org
2012-05-07 13:46 ` xunxun1982 at gmail dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07 12:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-05-07
Ever Confirmed|0 |1
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 12:40:08 UTC ---
Can you see if GCC 4.7.0 improves the situation?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (6 preceding siblings ...)
2012-05-07 12:45 ` rguenth at gcc dot gnu.org
@ 2012-05-07 13:46 ` xunxun1982 at gmail dot com
2012-05-07 13:47 ` xunxun1982 at gmail dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2012-05-07 13:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #8 from xunxun <xunxun1982 at gmail dot com> 2012-05-07 13:44:47 UTC ---
GCC4.7 also has the problem now:
-----------------------------------------------------------------------------
g++.exe -shared -Wl,--out-implib=devel\libwxpropgrid.a -Wl,--dll
-Lbase\tinyxml -LF:\MyProject\GUI\wxWidgets\WX_2_8_BRANCH\lib\gcc_dll
.objs\sdk\wxpropgrid\src\editors.o .objs\sdk\wxpropgrid\src\extras.o
.objs\sdk\wxpropgrid\src\manager.o .objs\sdk\wxpropgrid\src\odcombo.o
.objs\sdk\wxpropgrid\src\propgrid.o .objs\sdk\wxpropgrid\src\props.o
.objs\sdk\wxpropgrid\src\xh_propgrid.o .objs\sdk\wxpropgrid\src\advprops.o -o
devel\wxpropgrid.dll -flto -fuse-linker-plugin -Wl,--enable-auto-image-base
-Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined -lwxmsw28u
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x68): undefined
reference to `__imp___ZTV18wxDataObjectSimple.local.891'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x94): undefined
reference to `__imp___ZTV18wxDataObjectSimple.local.891'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x127): undefined
reference to `__imp___ZTV18wxBitmapButtonBase.local.890'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x21b): undefined
reference to `__imp___ZTV18wxBitmapButtonBase.local.890'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x332): undefined
reference to `__imp___ZTV16wxStaticTextBase.local.886'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x35e): undefined
reference to `__imp___ZTV16wxStaticTextBase.local.886'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x466): undefined
reference to `__imp___ZTV15wxStaticBoxBase.local.885'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x492): undefined
reference to `__imp___ZTV15wxStaticBoxBase.local.885'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x4c2): undefined
reference to `__imp___ZTV15wxDirDialogBase.local.896'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x596): undefined
reference to `__imp___ZTV15wxDirDialogBase.local.896'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x820): undefined
reference to `__imp___ZTV16wxSpinButtonBase.local.883'
F:\Temp\ccUseSDa.ltrans5.ltrans.o:ccUseSDa.ltrans5.o:(.text+0x84c): undefined
reference to `__imp___ZTV16wxSpinButtonBase.local.883'
-----------------------------------------------------------------------------
If you need me provide more information, I will do.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (7 preceding siblings ...)
2012-05-07 13:46 ` xunxun1982 at gmail dot com
@ 2012-05-07 13:47 ` xunxun1982 at gmail dot com
2012-05-07 13:58 ` rguenth at gcc dot gnu.org
2012-05-07 14:07 ` xunxun1982 at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2012-05-07 13:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #9 from xunxun <xunxun1982 at gmail dot com> 2012-05-07 13:46:30 UTC ---
Also add -flto-partition=none to linker option can solve the issue.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (8 preceding siblings ...)
2012-05-07 13:47 ` xunxun1982 at gmail dot com
@ 2012-05-07 13:58 ` rguenth at gcc dot gnu.org
2012-05-07 14:07 ` xunxun1982 at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07 13:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 13:55:27 UTC ---
These are all references to virtual tables taken local. Maybe Honza has an
idea,
but unfortunately we all have no access to a windows environment to check for
specialities there.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
2011-07-25 16:01 [Bug lto/49844] New: Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors xunxun1982 at gmail dot com
` (9 preceding siblings ...)
2012-05-07 13:58 ` rguenth at gcc dot gnu.org
@ 2012-05-07 14:07 ` xunxun1982 at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: xunxun1982 at gmail dot com @ 2012-05-07 14:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #11 from xunxun <xunxun1982 at gmail dot com> 2012-05-07 13:59:49 UTC ---
Also add -flto-partition=none to linker option can solve the issue.(In reply to
comment #10)
> These are all references to virtual tables taken local. Maybe Honza has an
> idea,
> but unfortunately we all have no access to a windows environment to check for
> specialities there.
As the thread http://forums.codeblocks.org/index.php/topic,16210.0.html said,
Linux also has the problem.
^ permalink raw reply [flat|nested] 12+ messages in thread