https://bugzilla.wikimedia.org/show_bug.cgi?id=48106
Web browser: --- Bug ID: 48106 Summary: Compilation of tests fail due to missing linker flag for cxxtools Product: openZIM Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: zimlib Assignee: wikibugs-l@lists.wikimedia.org Reporter: kamathvasu...@gmail.com Classification: Unclassified Mobile Platform: --- While enabling unit test with --enable-unittest option make test fails with following error. make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/tmp/buildd/zimlib-1.0/include' Making all in test make[2]: Entering directory `/tmp/buildd/zimlib-1.0/test' g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o cluster.o cluster.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o dirent.o dirent.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o header.o header.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o main.o main.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o template.o template.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o zint.o zint.cpp g++ -DHAVE_CONFIG_H -I. -I../src -I../include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -c -o lzmastream.o lzmastream.cpp /bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -lcxxtools-unit -Wl,-z,relro -o zimlib-test cluster.o dirent.o header.o main.o template.o zint.o lzmastream.o ../src/libzim.la libtool: link: g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-long-long -Wall -pedantic -Wl,-z -Wl,relro -o .libs/zimlib-test cluster.o dirent.o header.o main.o template.o zint.o lzmastream.o -lcxxtools-unit ../src/.libs/libzim.so /usr/bin/ld: main.o: undefined reference to symbol '_Z17log_init_cxxtoolsv' /usr/bin/ld: note: '_Z17log_init_cxxtoolsv' is defined in DSO /usr/lib/libcxxtools.so.8 so try adding it to the linker command line /usr/lib/libcxxtools.so.8: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[2]: *** [zimlib-test] Error 1 make[2]: Leaving directory `/tmp/buildd/zimlib-1.0/test' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/buildd/zimlib-1.0' make: *** [debian/stamp-makefile-build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 This was due to a missing linker flag -lcxxtools. I've fixed this by patching test/Makefile.am. I will attach the patch here please consider merging it in upstream. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l