View Issue Details

IDProjectCategoryView StatusLast Update
0006419GNUnetbuild processpublic2020-07-02 20:21
ReporterbeberkingAssigned ToChristian Grothoff 
PrioritynormalSeveritymajorReproducibilityalways
Status feedbackResolutionopen 
Product Version0.12.2 
Target VersionFixed in Version 
Summary0006419: Fail to relink libgnunet_plugin_block_test.la with $DESTDIR
DescriptionSince --unresolved-symbols=report-all was introduced in 45deaaedad922fe114df9f5bb0e23fbec7c64f02, gnunet FTBFS when built with a $DESTDIR installation path prepended to the $PREFIX. It fails when installing and relinking libgnunet_plugin_block_test.la. Please find below the relevant log.

The issue is that $DESTDIR is not the final installation path, so libgnunetblock*.so are not yet where they are going to be installed, and cannot be found by the linker there. Libtool finds the first dependency (libgnunetblockgroup.so), but then cannot find the indirect dependency of libgnunetblockgroup.so against libgnunetblock.so.

I tried to add something around $(GN_LIBINTL) and -Wl,-rpath-link -Wl,${DESTDIR}$(libdir) in src/block/Makefile.am, without success.

Making install in block
make[4] : on entre dans le répertoire « /home/bbk/linux/gnunet/src/block »
make[5] : on entre dans le répertoire « /home/bbk/linux/gnunet/src/block »
 /usr/bin/mkdir -p '/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu'
 /bin/bash ../../libtool --mode=install /usr/bin/install -c libgnunetblock.la libgnunetblockgroup.la '/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu'
libtool: warning: relinking 'libgnunetblock.la'
libtool: install: (cd /home/bbk/linux/gnunet/src/block; /bin/bash "/home/bbk/linux/gnunet/libtool" --tag CC --mode=relink gcc -fno-strict-aliasing -Wall -g -O2 -fdebug-prefix-map=/home/bbk/linux/gnunet=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-address-of-packed-member -export-dynamic -no-undefined -version-info 0:0:0 -Wl,-z,relro -Wl,--unresolved-symbols=report-all -o libgnunetblock.la -rpath /usr/lib/x86_64-linux-gnu block.lo ../../src/util/libgnunetutil.la -lm -inst-prefix-dir /home/bbk/linux/gnunet/debian/tmp)
libtool: relink: gcc -shared -fPIC -DPIC .libs/block.o -L/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lgnunetutil -lm -g -O2 -fstack-protector-strong -Wl,-z -Wl,relro -Wl,--unresolved-symbols=report-all -Wl,-soname -Wl,libgnunetblock.so.0 -o .libs/libgnunetblock.so.0.0.0
libtool: install: /usr/bin/install -c .libs/libgnunetblock.so.0.0.0T /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblock.so.0.0.0
libtool: install: (cd /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libgnunetblock.so.0.0.0 libgnunetblock.so.0 || { rm -f libgnunetblock.so.0 && ln -s libgnunetblock.so.0.0.0 libgnunetblock.so.0; }; })
libtool: install: (cd /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libgnunetblock.so.0.0.0 libgnunetblock.so || { rm -f libgnunetblock.so && ln -s libgnunetblock.so.0.0.0 libgnunetblock.so; }; })
libtool: install: /usr/bin/install -c .libs/libgnunetblock.lai /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblock.la
libtool: warning: relinking 'libgnunetblockgroup.la'
libtool: install: (cd /home/bbk/linux/gnunet/src/block; /bin/bash "/home/bbk/linux/gnunet/libtool" --tag CC --mode=relink gcc -fno-strict-aliasing -Wall -g -O2 -fdebug-prefix-map=/home/bbk/linux/gnunet=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-address-of-packed-member -export-dynamic -no-undefined -version-info 0:0:0 -Wl,-z,relro -Wl,--unresolved-symbols=report-all -o libgnunetblockgroup.la -rpath /usr/lib/x86_64-linux-gnu bg_bf.lo libgnunetblock.la ../../src/util/libgnunetutil.la -lm -inst-prefix-dir /home/bbk/linux/gnunet/debian/tmp)
libtool: relink: gcc -shared -fPIC -DPIC .libs/bg_bf.o -L/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lgnunetblock -lgnunetutil -lm -g -O2 -fstack-protector-strong -Wl,-z -Wl,relro -Wl,--unresolved-symbols=report-all -Wl,-soname -Wl,libgnunetblockgroup.so.0 -o .libs/libgnunetblockgroup.so.0.0.0
libtool: install: /usr/bin/install -c .libs/libgnunetblockgroup.so.0.0.0T /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblockgroup.so.0.0.0
libtool: install: (cd /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libgnunetblockgroup.so.0.0.0 libgnunetblockgroup.so.0 || { rm -f libgnunetblockgroup.so.0 && ln -s libgnunetblockgroup.so.0.0.0 libgnunetblockgroup.so.0; }; })
libtool: install: (cd /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libgnunetblockgroup.so.0.0.0 libgnunetblockgroup.so || { rm -f libgnunetblockgroup.so && ln -s libgnunetblockgroup.so.0.0.0 libgnunetblockgroup.so; }; })
libtool: install: /usr/bin/install -c .libs/libgnunetblockgroup.lai /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblockgroup.la
libtool: warning: remember to run 'libtool --finish /usr/lib/x86_64-linux-gnu'
 /usr/bin/mkdir -p '/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/gnunet'
 /bin/bash ../../libtool --mode=install /usr/bin/install -c libgnunet_plugin_block_test.la '/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/gnunet'
libtool: warning: relinking 'libgnunet_plugin_block_test.la'
libtool: install: (cd /home/bbk/linux/gnunet/src/block; /bin/bash "/home/bbk/linux/gnunet/libtool" --tag CC --mode=relink gcc -fno-strict-aliasing -Wall -g -O2 -fdebug-prefix-map=/home/bbk/linux/gnunet=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-address-of-packed-member -export-dynamic -avoid-version -module -no-undefined -Wl,-z,relro -Wl,--unresolved-symbols=report-all -o libgnunet_plugin_block_test.la -rpath /usr/lib/x86_64-linux-gnu/gnunet plugin_block_test.lo libgnunetblockgroup.la ../../src/util/libgnunetutil.la -lm -inst-prefix-dir /home/bbk/linux/gnunet/debian/tmp)
libtool: relink: gcc -shared -fPIC -DPIC .libs/plugin_block_test.o -L/home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lgnunetblockgroup -lgnunetutil -lm -g -O2 -fstack-protector-strong -Wl,-z -Wl,relro -Wl,--unresolved-symbols=report-all -Wl,-soname -Wl,libgnunet_plugin_block_test.so -o .libs/libgnunet_plugin_block_test.so
/usr/bin/ld: warning: libgnunetblock.so.0, needed by /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblockgroup.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /home/bbk/linux/gnunet/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetblockgroup.so: undefined reference to `GNUNET_BLOCK_mingle_hash'
collect2: error: ld returned 1 exit status
libtool: error: error: relink 'libgnunet_plugin_block_test.la' with the above command before installing it
make[5]: *** [Makefile:639: install-pluginLTLIBRARIES] Error 1
make[5] : on quitte le répertoire « /home/bbk/linux/gnunet/src/block »
make[4]: *** [Makefile:826: install-am] Error 2
make[4] : on quitte le répertoire « /home/bbk/linux/gnunet/src/block »
make[3]: *** [Makefile:573: install-recursive] Error 1
make[3] : on quitte le répertoire « /home/bbk/linux/gnunet/src »
make[2]: *** [Makefile:638: install-recursive] Error 1
make[2] : on quitte le répertoire « /home/bbk/linux/gnunet »
TagsNo tags attached.

Activities

Christian Grothoff

2020-07-02 20:21

manager   ~0016381

I've tried to fix this in Git 406e2ee88..789989239 by modifying the explicit dependencies in Makefile.am and also making the dependency on libgnunetblock more explicit.

However, as I didn't get a build failure before, I would appreciate your feedback as to whether this helped...

Issue History

Date Modified Username Field Change
2020-06-28 09:52 beberking New Issue
2020-07-02 20:21 Christian Grothoff Note Added: 0016381
2020-07-02 20:21 Christian Grothoff Assigned To => Christian Grothoff
2020-07-02 20:21 Christian Grothoff Status new => feedback