Last modified: 2013-07-07 17:40:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50106, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48106 - Compilation of tests fail due to missing linker flag for cxxtools
Compilation of tests fail due to missing linker flag for cxxtools
Status: RESOLVED FIXED
Product: openZIM
Classification: Unclassified
zimlib (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Tommi Mäkitalo
: patch, patch-need-review
: 47577 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-05 15:29 UTC by Vasudeva Kamath
Modified: 2013-07-07 17:40 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch for fixing compilation issue (575 bytes, patch)
2013-05-05 15:31 UTC, Vasudeva Kamath
Details

Description Vasudeva Kamath 2013-05-05 15:29:28 UTC
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.
Comment 1 Vasudeva Kamath 2013-05-05 15:31:24 UTC
Created attachment 12263 [details]
Patch for fixing compilation issue
Comment 2 Kelson [Emmanuel Engelhart] 2013-05-21 10:39:21 UTC
I would prefer to remove the cxxtools dependency if --enable-unittest... or remove unit tests from the tarball.
Comment 3 Vasudeva Kamath 2013-05-21 10:59:20 UTC
Hi Kelson,

As discussed in IRC this build-dependency is introduced only if one runs configure with --enable-unittest. 

[with my Debian Hat on]
I would like to have the unit tests inside the package because it will be helpful to trap unforeseen bugs on various architecture. Debian builds the package for 12 different architecture and it will be really great to trap the bugs during build time.
Comment 4 Kelson [Emmanuel Engelhart] 2013-07-07 15:49:24 UTC
*** Bug 47577 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links