Created attachment 56038 [details] patch that fixes the build Version: unspecified (using KDE 4.5.5) OS: Linux lokalize 4.5.4 fails to build Reproducible: Always Steps to Reproduce: 1. tar jxvf kdesdk-4.5.5.tar.bz2 2. cd kdesdk-4.5.5 3. mkdir build 4. cd build 5. cmake -DKDE4_ENABLE_FINAL=ON .. 6. make lokalize Actual Results: In file included from kdesdk-4.5.5/build/lokalize/src/lokalize_final_cpp.cpp:38: kdesdk-4.5.5/lokalize/src/tm/jobs.cpp: In function "void initDb(QSqlDatabase&)": kdesdk-4.5.5/lokalize/src/tm/jobs.cpp:647: fel: redefinition of "void initDb(QSqlDatabase&)" kdesdk-4.5.4/lokalize/src/project/projectmodel.cpp:1236: fel: "void initDb(QSqlDatabase&)" definierades tidigare här
i wonder what is your distro (environment). the problem is that it uses 'default' symbol visibility by default
(In reply to comment #1) > i wonder what is your distro (environment). > > the problem is that it uses 'default' symbol visibility by default This has nothing to do with linking (and therefore nothing to do with symbol visibility). It fails already at compilation because a function is defined with the same signature as one that was already defined. The previously attached patch fixes it by manually inlining one of them (since it was used only in that one place). It might also work to put the functions in different namespaces.
This bug only refers to -DKDE4_ENABLE_FINAL=ON build mode, where all source files of one directory are concatenated and built in one compiler run. So, in this case Eric is right and it is not a linker or visibility but compilation problem.
latest version of Lokalize doesn't contain several static initDb functions anymore