Hello, libreoffice-4.1.0.4 fails to compile due to failed unit test despite USE="-test": diff.cxx:267:Assertion Test name: SdFiltersTest::testDocumentLayout double equality assertion failed - Expected: nan - Actual : nan - Delta : 1e-08 - Reference: /var/tmp/portage/app-office/libreoffice-4.1.0.4/work/libreoffice-4 .1.0.4/sd/qa/unit/data/xml/shapes-test_page0.xml - Node: type
Created attachment 357202 [details] build.log.xz
Created attachment 357204 [details] environment
Created attachment 357208 [details] emerge --info
That's no fun at all. After offending test disable it fails on another one: [build CUT] sc_ucalc Value: 8 43formel: =A1+B1 3 expected height 6001 actual 6001 expected width 2001 actual 2001 expected left 6000 actual 6000 expected right 3000 actual 3000 expected new height 8002 actual 8001 expected new width 3002 3001 expected startrow 3 actual 3 expected startcol 6 actual 6 expected endrow 8 actual 8 expected endcol 7 actual 7 ucalc.cxx:1094:Assertion Test name: (anonymous namespace)::Test::testCellFunctions equality assertion failed - Expected: -7 - Actual : 0 - =IFERROR(A6;-7) Failures !!! Run: 64 Failure total: 1 Failures: 1 Errors: 0 Error: a unit test failed, please do one of: export DEBUGCPPUNIT=TRUE # for exception catching export GDBCPPUNITTRACE="gdb --args" # for interactive debugging export VALGRIND=memcheck # for memory checking and retry using: make CppunitTest_sc_ucalc There should be a way to disable all this tests altogether. While failing tests are not desired themselves, it is quite expected that for so sophisticated, large and thus buggy project like libreoffice some things will occasionally fail here and there.
This bug contains multiple issues: 1) Libreoffice forces unit tests even with USE="-test". 2) Some unit tests fail. Default libreoffice's build target (in dmake system) is build and all tests, but it may be changed by changing Makefile target to build-nocheck. See attached patch for the fix. Works fine for me, disables all test and speeds up overall build time.
Created attachment 357284 [details, diff] libreoffice-4.1.0.4.ebuild.patch Disable all tests when test use flag is not set.
Yea not running tests is a good idea, but still those tests are valid, something is seriously broken in your system, so you can get for example wrong resutls on calc with this lo, is that something you really desire?
(In reply to Tomáš Chvátal from comment #7) > Yea not running tests is a good idea, but still those tests are valid, > something is seriously broken in your system, so you can get for example > wrong resutls on calc with this lo, is that something you really desire? I doubt that all test are correct. Result such as (see my first post): - Expected: nan - Actual : nan - Delta : 1e-08 can't be correct. NaN is NaN. I have an idea where this exact bug comes from, but this is a test bug, not a code bug: take one NaN float and another double and compare their in-memory representations, here you go. And I do not really care what calc results will be, because I do not use office for scientific computations. Yes, failing test are bad and in the ideal world all of them should be taken care of, but in the real life I do not always have time to handle compilation issues during world updates. Most complex packages fail tests here and there and this doesn't always mean a problem in the code itself. Take a look on glibc, on most systems some of tests will fail, we don't even have a test use flag for this package, but it have tests.
Fixed in 4.1.1.2, But still please take time to report this to upstream tracker at bugs.freedesktop.org.