Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603098 - app-text/libebook-0.1.2-r1[-tools] fails tests - PDXLZ77StreamTest.cpp:33: undefined reference to `librevenge::RVNGStringStream::RVNGStringStream(unsigned char const*, unsigned int)'
Summary: app-text/libebook-0.1.2-r1[-tools] fails tests - PDXLZ77StreamTest.cpp:33: un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: PATCH, TESTFAILURE
Depends on:
Blocks:
 
Reported: 2016-12-19 13:59 UTC by eroen
Modified: 2016-12-30 01:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-Check-for-librevenge-stream-if-tests-are-enabled.patch (0001-Check-for-librevenge-stream-if-tests-are-enabled.patch,784 bytes, patch)
2016-12-19 19:12 UTC, eroen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2016-12-19 13:59:43 UTC
/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
Comment 1 Paolo Pedroni 2016-12-19 14:42:10 UTC
I can confirm this.
Comment 2 eroen 2016-12-19 19:12:47 UTC
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/
Comment 3 eroen 2016-12-28 14:55:06 UTC
(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
Comment 4 Andreas Sturmlechner gentoo-dev 2016-12-30 01:25:20 UTC
Thanks eroen for the patch, this is fixed in commit a06c43e79621adb834e423ac7ae95ed4095a4562