/bin/sh ../../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -I../../inc -I../../src/lib -I/usr/include/librevenge-0.0 -DNDEBUG -O0 -g -fvisibility=hidden -DLIBE_BOOK_VISIBILITY -Wall -Wextra -pedantic -Wshadow -Wunused-variable -Weffc++ -L../../src/lib -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o test EBOOKBitStreamTest.o EBOOKMemoryStreamTest.o IMPLZSSStreamTest.o PDXLZ77StreamTest.o test.o ../../src/lib/libe-book-internal.la -lcppunit -licui18n -licuuc -licudata -lrevenge-0.0 -lz libtool: link: x86_64-pc-linux-gnu-g++ -I../../inc -I../../src/lib -I/usr/include/librevenge-0.0 -DNDEBUG -O0 -g -fvisibility=hidden -DLIBE_BOOK_VISIBILITY -Wall -Wextra -pedantic -Wshadow -Wunused-variable -Weffc++ -Wl,-O1 -Wl,--hash-style=gnu -o test EBOOKBitStreamTest.o EBOOKMemoryStreamTest.o IMPLZSSStreamTest.o PDXLZ77StreamTest.o test.o -L../../src/lib -Wl,--as-needed ../../src/lib/.libs/libe-book-internal.a -lcppunit -licui18n -licuuc -licudata -lrevenge-0.0 -lz PDXLZ77StreamTest.o: In function `test::PDXLZ77StreamTest::testRead()': /var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src/test/PDXLZ77StreamTest.cpp:33: undefined reference to `librevenge::RVNGStringStream::RVNGStringStream(unsigned char const*, unsigned int)' /var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src/test/PDXLZ77StreamTest.cpp:33: undefined reference to `librevenge::RVNGStringStream::~RVNGStringStream()' /var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src/test/PDXLZ77StreamTest.cpp:33: undefined reference to `librevenge::RVNGStringStream::~RVNGStringStream()' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:652: test] Error 1 make[3]: Leaving directory '/var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src/test' make[2]: *** [Makefile:941: check-am] Error 2 make[2]: Leaving directory '/var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src/test' make[1]: *** [Makefile:397: check-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/app-text/libebook-0.1.2-r1/work/libe-book-0.1.2/src' make: *** [Makefile:504: check-recursive] Error 1 * ERROR: app-text/libebook-0.1.2-r1::gentoo failed (test phase): * Make check failed. See above for details. * * Call stack: * ebuild.sh, line 115: Called src_test * environment, line 1733: Called default * phase-functions.sh, line 807: Called default_src_test * phase-functions.sh, line 836: Called __eapi0_src_test * phase-helpers.sh, line 763: Called die * The specific snippet of code: * $emake_cmd ${internal_opts} check || \ * die "Make check failed. See above for details." Clearly, '-lrevenge-stream-0.0' is missing from the linking of 'test'. Looking at 'src/test/Makefile.am'[0], it has the proper 'test_LDADD = ... $(REVENGE_STREAM_LIBS)'. Looking further at 'configure.ac'[1], this can be found: AS_IF([test "x$with_tools" = "xyes"],[ PKG_CHECK_MODULES([REVENGE_GENERATORS],[ librevenge-generators-0.0 ]) PKG_CHECK_MODULES([REVENGE_STREAM],[ librevenge-stream-0.0 ]) ]) So, '$REVENGE_STREAM_LIBS' will not be populated with 'USE=-tools'. Since librevenge is not split up in Gentoo, this can easily be amended by making this block non-conditional. The ebuild already calls 'eautoreconf'. A full fix would split the conditional block and also consider '$enable_tests' for 'REVENGE_STREAM'. 0: https://sourceforge.net/p/libebook/code/ci/libe-book-0.1.2/tree/src/test/Makefile.am 1: https://sourceforge.net/p/libebook/code/ci/libe-book-0.1.2/tree/configure.ac
I can confirm this.
Created attachment 456770 [details, diff] 0001-Check-for-librevenge-stream-if-tests-are-enabled.patch I submitted this patch upstream[0], it can be applied in the ebuild without changes. https://sourceforge.net/p/libebook/tickets/3/
(In reply to eroen from comment #2) > Created attachment 456770 [details, diff] [details, diff] > 0001-Check-for-librevenge-stream-if-tests-are-enabled.patch > > I submitted this patch upstream[0], it can be applied in the ebuild without > changes. > > https://sourceforge.net/p/libebook/tickets/3/ This patch has been applied in upstream master: https://sourceforge.net/p/libebook/code/ci/2a30bbd1f5
Thanks eroen for the patch, this is fixed in commit a06c43e79621adb834e423ac7ae95ed4095a4562