Bug 183239

Summary: KDELibs fails to build when limit of inlining is increased
Product: [Unmaintained] kdelibs Reporter: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: faure
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kdelibs-4.2.0-fix_undefined_references.patch

Description Arfrever Frehtes Taifersar Arahesis 2009-02-04 23:42:12 UTC
Version:            (using KDE 4.2.0)
Compiler:          GCC 4.3.3 
OS:                Linux
Installed from:    Gentoo Packages

KDELibs fails to build when CXXFLAGS contains -finline-limit=1800.
Current source code assumes that some functions marked with 'inline' word aren't actually inlined.

findLibraryInternal is defined in kdecore/util/kpluginloader.cpp with 'inline' keyword, but is also referenced in kdecore/util/klibrary.cpp with 'extern' keyword.

[ 21%] Building CXX object kdecore/CMakeFiles/kdecore.dir/io/klockfile_unix.o                                                                                
[ 21%] Building CXX object kdecore/CMakeFiles/kdecore.dir/util/kshell_unix.o                                                                                 
[ 21%] Building CXX object kdecore/CMakeFiles/kdecore.dir/util/kuser_unix.o                                                                                  
[ 21%] Building CXX object kdecore/CMakeFiles/kdecore.dir/util/kmacroexpander_unix.o                                                                         
[ 21%] Building C object kdecore/CMakeFiles/kdecore.dir/fakes.o                                                                                              
Linking CXX shared library ../lib/libkdecore.so
CMakeFiles/kdecore.dir/util/klibrary.o: In function `findLibrary(QString const&, KComponentData const&)':
klibrary.cpp:(.text+0x135): undefined reference to `findLibraryInternal(QString const&, KComponentData const&)'
CMakeFiles/kdecore.dir/util/klibrary.o: In function `KLibrary::KLibrary(QString const&, int, KComponentData const&, QObject*)':
klibrary.cpp:(.text+0x168): undefined reference to `findLibraryInternal(QString const&, KComponentData const&)'
CMakeFiles/kdecore.dir/util/klibrary.o: In function `KLibrary::KLibrary(QString const&, int, KComponentData const&, QObject*)':
klibrary.cpp:(.text+0x1f8): undefined reference to `findLibraryInternal(QString const&, KComponentData const&)'
CMakeFiles/kdecore.dir/util/klibrary.o: In function `KLibrary::KLibrary(QString const&, KComponentData const&, QObject*)':
klibrary.cpp:(.text+0x27d): undefined reference to `findLibraryInternal(QString const&, KComponentData const&)'
CMakeFiles/kdecore.dir/util/klibrary.o: In function `KLibrary::KLibrary(QString const&, KComponentData const&, QObject*)':
klibrary.cpp:(.text+0x2fd): undefined reference to `findLibraryInternal(QString const&, KComponentData const&)'
CMakeFiles/kdecore.dir/util/klibrary.o:klibrary.cpp:(.text+0x375): more undefined references to `findLibraryInternal(QString const&, KComponentData const&)'follow
collect2: ld returned 1 exit status
make[2]: *** [lib/libkdecore.so.5.2.0] Error 1
make[1]: *** [kdecore/CMakeFiles/kdecore.dir/all] Error 2
make: *** [all] Error 2
Comment 1 Arfrever Frehtes Taifersar Arahesis 2009-02-04 23:43:49 UTC
Created attachment 30972 [details]
kdelibs-4.2.0-fix_undefined_references.patch
Comment 2 David Faure 2009-09-17 01:00:19 UTC
I enabled that flag and got no errors.
Turns out that the "inline" was removed in r917835 because it broke ICC too.

Hmm, well, I wonder if my testing is correct though, since I have -fno-inline anyway? Do you know what effect -finline-limit has when using -fno-inline?