Bug 255922 - proxymodeltestsuite fails to build (on DragonFly)
Summary: proxymodeltestsuite fails to build (on DragonFly)
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: SVN
Platform: Unlisted Binaries Other
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 22:54 UTC by Alex Hornung
Modified: 2010-11-04 16:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Hornung 2010-11-02 22:54:09 UTC
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
Comment 1 Raphael Kubo da Costa 2010-11-03 02:06:57 UTC
CC'ing Stephen Kelly, the author of the tests.
Comment 2 Raphael Kubo da Costa 2010-11-03 02:08:01 UTC
By the way, is DragonFly still on gcc 4.1? IIRC, Qt (and consequently KDE) officially support gcc from version 4.2 on.
Comment 3 Alex Hornung 2010-11-03 07:36:07 UTC
We also have gcc 4.4 in base, but it's not (yet) the default system compiler.
Comment 4 Alex Hornung 2010-11-03 09:20:47 UTC
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?
Comment 5 Raphael Kubo da Costa 2010-11-03 13:02:23 UTC
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.
Comment 6 Stephen Kelly 2010-11-04 16:39:25 UTC
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?