Version: SVN (using Devel) OS: other the proxymodeltestsuite fails to build on DragonFly, but seems to be a platform-independent problem: [ 40%] Building CXX object kdeui/tests/proxymodeltestsuite/CMakeFiles/proxymodeltestsuite.dir/proxymodeltestsuite_automoc.o ./build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:41: warning: type attributes are honored only at type definition /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:41: error: use of enum 'Persistence' without previous declaration /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:42: error: expected unqualified-id before '{' token /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:47: warning: type attributes are honored only at type definition /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodel.testsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:47: error: use of enum 'SourceModel' without previous declaration /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:48: error: expected unqualified-id before '{' token /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:130: error: 'Persistence' has not been declared /build/KDE/Dashboards/kdelibs/build dir-DragonFly-CMake-2.8.2-gcc-4.1/kdeui/tests/proxymodeltestsuite/../../../../src dir/kdeui/tests/proxymodeltestsuite/proxymodeltest.h:131: error: 'SourceModel' has not been declared gmake[2]: *** [kdeui/tests/proxymodeltestsuite/CMakeFiles/proxymodeltestsuite.dir/proxymodeltestsuite_automoc.o] Error 1 gmake[1]: *** [kdeui/tests/proxymodeltestsuite/CMakeFiles/proxymodeltestsuite.dir/all] Error 2 Reproducible: Always
CC'ing Stephen Kelly, the author of the tests.
By the way, is DragonFly still on gcc 4.1? IIRC, Qt (and consequently KDE) officially support gcc from version 4.2 on.
We also have gcc 4.4 in base, but it's not (yet) the default system compiler.
It seems this works fine with gcc44. Isn't there a way to check for the gcc version without messing up other compilers when doing the cmake configuration?
I thought there was a check in place already, but apparently FindKDE4Internal.cmake in kdelibs/cmake/modules only checks for the gcc version internally to set some compiler flags. It is possible to patch it locally to only compile those checks in case gcc > 4.1, but I think a cleaner approach would be to either export the gcc version in FindKDE4Internal.cmake or try to make the tests compile on gcc 4.1 -- I'll mail the kde-buildsystem mailing list about the former, and we can hope Steve can help on the latter.
I have no idea why it doesn't build with that compiler. Are the EXPORT macros in front of the enums the problem? What happens if you remove them?
Please retry with a KF6 version, thanks!