Red Hat Bugzilla – Bug 187142
g++ -frepo not working
Last modified: 2007-11-30 17:11:28 EST
Description of problem:
g++ with "-frepo" does not appear to generate automatic template instantiations
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. g++ -frepo -c frepo.cc
2. g++ -frepo frepo.o -o frepo
frepo.o: In function `main':frepo.cc:(.text+0x18): undefined reference to
collect2: ld returned 1 exit status
Successful linking; template constructor should have been generated automatically.
Test case compiles and links without -frepo.
Compilation with "-frepo -DREDUNDANT" fails (as expected).
I have this problem on all FC5 machines I've tried (both fresh installations and
updates from FC4).
Created attachment 126921 [details]
Forgot to mention: this worked with FC4.
I had some more time to play with this. I installed binutils-184.108.40.206.2.2-2.1
(from FC4 updates) with "rpm -Uvh --oldpackage --nodeps" and the test case does
compile and link successfully, so I've changed this to a binutils bug. (Oops!)
Except for the fact that binutils-220.127.116.11.6-4 is the relevant component, the
information above (including the procedure for reproducing the problem) remains
*** Bug 187323 has been marked as a duplicate of this bug. ***
I have tried replaced the ld program in FC5 with the version from "vanilla"
$ ld --version
GNU ld version 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
and that has fixed my problem (#187323) too.