Version: 2.0.0 (using KDE 4.5.4) OS: Linux k3b 2.0.0 fails to build Reproducible: Always Steps to Reproduce: 1. tar jxvf /usr/portage/distfiles/k3b-2.0.0.tar.bz2 2. cd k3b-2.0.0 3. mkdir build 4. cd build 5. cmake -DKDE4_ENABLE_FINAL=ON .. 6. make Actual Results: In file included from /home/work/programmering/k3b-2.0.0/build/libk3b/k3b_final_cpp.cpp:118: /home/work/programmering/k3b-2.0.0/libk3b/projects/mixedcd/k3bmixedjob.cpp: In function "QString createNonExistingFilesString(const QList<K3b::AudioFile*>&, int)": /home/work/programmering/k3b-2.0.0/libk3b/projects/mixedcd/k3bmixedjob.cpp:57: fel: redefinition of "QString createNonExistingFilesString(const QList<K3b::AudioFile*>&, int)" /home/work/programmering/k3b-2.0.0/libk3b/projects/audiocd/k3baudiojob.cpp:50: fel: "QString createNonExistingFilesString(const QList<K3b::AudioFile*>&, int)" definierades tidigare här
Created attachment 55267 [details] fix for the reported build error and some more (others remain)
Still fails with k3b 2.0.1.
Which compiler are you using? They are static functions so there should not show error here. The code duplication should be eliminated though.
Still fails with k3b 2.0.2. Compiler is g++ (Gentoo 4.7.3-r1 p1.4, pie-0.5.5) 4.7.3. Not that it matters though. Redefinition is forbidden by the language.
They are static functions, only exist in one cpp file. Am I leaving coding too long:) http://stackoverflow.com/questions/5319361/static-function-in-c
Problem is that they are in 2 cpp source files, which are both included in the autogenerated file build/src/k3b_bin_final_cpp.cpp.
Is the patch also required on master branch? I can compile for various openSUSE versions without any issues: https://pmbs.links2linux.de/package/show/Essentials/k3b
Simply don't compile with enable final, it's a gimnick to get 0.000000000001% speedup that breaks things.