--nextPart1510191.SxAGopCgTH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 07 December 2009, Alexander Neundorf wrote: > Hi, > > kdelibs currently does not build on Solaris with the Sun Studio > compiler if the tests are enabled: > http://my.cdash.org/viewBuildError.php?buildid=3D40434 > > This is the error: > [ 31%] Building CXX object > kdecore/tests/CMakeFiles/kjobtest.dir/kjobtest.o > > "/.../srcdir/kdecore/tests/kjobtest.cpp", line 96: Error: Could not > find a match for QTest::qCompare(KJob*, TestJob*, const > char[45], const char[4], const char[65], int) needed in > KJobTest::testProgressTracking(). > > > Any idea what's wrong here ? Excerpt of http://doc.trolltech.com/4.5/qtest.html#QCOMPARE: QCOMPARE is very strict on the data types. Both actual and expected have=20 to be of the same type, otherwise the test won't compile. This=20 prohibits unspecified behavior from being introduced; that is behavior=20 that usually occurs when the compiler implicitly casts the argument. Apparently, the Sun Studio compiler is stricter than gcc and does not=20 cast TestJob* to KJob*, but regards them as different (which they are). Changing QCOMPARE( processed_spy.at( 0 ).at( 0 ).value(), job ); to QCOMPARE( processed_spy.at( 0 ).at( 0 ).value(),=20 static_cast( job ) ); should help. Regards, Ingo --nextPart1510191.SxAGopCgTH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAksdfOIACgkQGnR+RTDgudjcFgCgm964ESWVp868TpwqKbWtdHHq GvcAn2b6qvt1QWaE4RPctaCzROPC1RYU =BTqm -----END PGP SIGNATURE----- --nextPart1510191.SxAGopCgTH--