[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 Markus Trippelsdorf changed: What|Removed |Added Status|WAITING |RESOLVED CC||trippels at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #11 from Markus Trippelsdorf --- dup. *** This bug has been marked as a duplicate of bug 57703 ***
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 leif.walsh at gmail dot com changed: What|Removed |Added CC||leif.walsh at gmail dot com --- Comment #10 from leif.walsh at gmail dot com 2012-07-14 20:44:46 UTC --- I have this error too, with 4.7.1 and ld.gold. I've confirmed that all my objects are being compiled with fPIC, and even made it the first argument to g++ (someone suggested that). It only seems to be an issue for c++ symbols. I have a large codebase in c to which I'm trying to add a few c++11 features. The linker only complains about c++ (templated) functions.
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #7 from Vadim Markovtsev 2011-05-24 11:22:34 UTC --- Created attachment 24338 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24338 Objects which cause the error First 2 (of 4) binaries
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #8 from Vadim Markovtsev 2011-05-24 11:23:22 UTC --- Created attachment 24339 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24339 Objects which cause the error (2) Last 2 (of 4) binaries
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #9 from Vadim Markovtsev 2011-05-24 11:23:43 UTC --- Here they are
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 Ian Lance Taylor changed: What|Removed |Added CC||ian at airs dot com --- Comment #6 from Ian Lance Taylor 2011-05-12 19:36:23 UTC --- I believe that gold will issue these warnings in some cases that GNU ld will not, but as far as I know gold will never issue them for code which was in fact compiled with -fPIC. Can you get a copy of a failing ltransNN.ltrans.o and attach it here, or at least attach the output of readelf -r on the file?
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 Richard Guenther changed: What|Removed |Added CC||iant at google dot com --- Comment #5 from Richard Guenther 2011-05-12 08:51:25 UTC --- (In reply to comment #4) > I checked those errors with both binutils 2.21 release and 2.22 CVS (10th of > May). > > > gcc -### > Using built-in specs. > COLLECT_GCC=/???/x86_64-gcc-4.6.0/bin/gcc > COLLECT_LTO_WRAPPER=/???/x86_64-gcc-4.6.0/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper > Target: x86_64-unknown-linux-gnu > Configured with: ../configure --prefix=/???/x86_64-gcc-4.6.0 --enable-shared > --with-arch=native --enable-languages=c,c++ --enable-lto --enable-plugin > --enable-gold --enable-linker-build-id --disable-multilib --enable-ld=default > --with-plugin-ld=ld.gold > Thread model: posix > gcc version 4.6.0 (GCC) > > If you mean CC=gcc -flto -fuse-linker-plugin, I get the same errors. With "using GNU ld" I mean configuring with --with-plugin-ld=ld.bfd (or omitting that configure option). I'm CCing a gold expert, maybe he can shed some light on that error. I suppose all object files _are_ built with -fPIC (eventually LTO takes some symbols local by making them have hidden visibility - can that cause issues?).
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #4 from Vadim Markovtsev 2011-05-11 17:29:32 UTC --- I checked those errors with both binutils 2.21 release and 2.22 CVS (10th of May). gcc -### Using built-in specs. COLLECT_GCC=/???/x86_64-gcc-4.6.0/bin/gcc COLLECT_LTO_WRAPPER=/???/x86_64-gcc-4.6.0/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/???/x86_64-gcc-4.6.0 --enable-shared --with-arch=native --enable-languages=c,c++ --enable-lto --enable-plugin --enable-gold --enable-linker-build-id --disable-multilib --enable-ld=default --with-plugin-ld=ld.gold Thread model: posix gcc version 4.6.0 (GCC) If you mean CC=gcc -flto -fuse-linker-plugin, I get the same errors.
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #3 from Richard Guenther 2011-05-11 12:02:53 UTC --- Ok. The error seems to be gold-specific though - what binutils version are you using? Does the error persist if you use GNU ld (you need at least binutils 2.21 for that to support -fuse-linker-plugin)?
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 --- Comment #2 from Vadim Markovtsev 2011-05-11 11:43:03 UTC --- I ensured that. ffmpeg does not use cmake, just ordinary GNU make; no libtool is called at all down to the point where gcc fails (checked it with "make -n" and "configure --cc='gcc -v ...'"). fPIC is passed correctly to each CC and LD call, it is always in COLLECT_GCC_OPTIONS.
[Bug lto/48947] 4.6.0 fails to link ffmpeg with LTO and gold
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2011.05.10 12:06:14 Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther 2011-05-10 12:06:14 UTC --- Please make sure the ffmpeg makefiles properly pass compiler options, including -fPIC, to the gcc driver used at link time. It looks like it does not do so (especially using libtool or cmake may have issues here).