[Bug c++/62224] [4.9 Regression] Possible regression in gcc-4.9-20140820

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 3 09:26:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62224

--- Comment #14 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #13)
> (In reply to Chris Clayton from comment #12)
> > Sorry, you'll have to stick with me here while a figure out what that means.
> > 
> > I think you are saying that prior to r214208, the symbols definedMacros()
> > and headerPaths() were present but effectively no-ops. Post r214208 they now
> > "contain" operations including calls to ensureUpdated().
> > 
> > Given that the symbol for ensureUpdated() appears to be present in
> > libCppTools.so (along with the symbols for its two post-r214208 callers),
> > does that suggest a problem with the linker, which is /usr/bin/ld from the
> > latest version (2.24) of binutils?
> 
> No. This has nothing to do with libCppTools.so. As I wrote before the 
> build system of qt-creator must be changed to provide the missing symbol
> by simply adding cppmodelmanager.o to the libCppEditor.so link command.

Out of curiosity, I have downloaded and tried to build qt-creator-3.2.0.
The build failed exactly as you described in commment 0.

The fix is simple, just add  __attribute__ ((visibility ("default"))) to
CppModelManager::ensureUpdated() in src/plugins/cpptools/cppmodelmanager.cpp:

294  __attribute__ ((visibility ("default")))
295 void CppModelManager::ensureUpdated()
296 {

This will make _ZN8CppTools8Internal15CppModelManager13ensureUpdatedEv external
for libCppTools.so and everything is fine.



More information about the Gcc-bugs mailing list