Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: build fails with libblacklist
On Thu, Dec 31, 2015 at 11:30:12PM +0900, Rin Okuyama wrote:
> Building release fails with libblacklist:
Same here.
> % ./build.sh -U -j16 tools release
> ...
> --- libblacklist.so.0.0 ---
> # build lib/libblacklist.so.0.0
> rm -f libblacklist.so.0.0
> /var/build/tools/bin/x86_64--netbsd-gcc -Wl,-x -shared -Wl,-soname,libblacklist.so.0 -Wl,--warn-shared-textrel -Wl,-Map=libblacklist.so.0.map --sysroot=/var/build/dest/amd64 -o libblacklist.so.0.0 -Wl,-rpath,/lib -L=/lib -Wl,--whole-archive libblacklist_pic.a -Wl,--no-whole-archive -lpthread
> /var/build/tools/lib/gcc/x86_64--netbsd/4.8.5/../../../../x86_64--netbsd/bin/ld: cannot find -lpthread
> collect2: error: ld returned 1 exit status
> *** [libblacklist.so.0.0] Error code 1
> nbmake[7]: stopped in /var/build/src/external/bsd/blacklist/lib
>
> The attached patch fixes this problem.
I haven't tried it but it guess will work around the problem. But I don't
think it is the correct fix.
> (But why the absence of libpthread cannot be detected by DPADD macro?)
The problem is that "LIBPTHREAD" is documented in "bsd.README" but is
not set to anything as far as I can tell:
tron@lyssa:/usr/src/external/bsd/blacklist/lib>cvs diff -u
cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/blacklist/lib/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 30 Dec 2015 17:57:20 -0000 1.5
+++ Makefile 1 Jan 2016 12:25:37 -0000
@@ -16,3 +16,8 @@
MLINKS+=libblacklist.3 blacklist_sa_r.3
.include <bsd.lib.mk>
+
+print-stuff:
+ @echo "1:${DPADD}"
+ @echo "2:${LIBPTHREAD}"
+
tron@lyssa:/usr/src/external/bsd/blacklist/lib>make print-stuff
1: /usr/src/external/bsd/blacklist/lib/shlib_version
2:
I'm still investigating why it is not set. The problem is however not
specific to "external/bsd/blacklist". This variable isn't set anywhere
as far as I can tell:
tron@lyssa:/usr/src/external/gpl3/gcc/lib/libtsan>cvs diff -u
cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/lib/libtsan/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 7 Jan 2015 03:49:13 -0000 1.2
+++ Makefile 1 Jan 2016 12:27:12 -0000
@@ -65,3 +65,7 @@
DPADD+= ${LIBSTDCXX} ${LIBPTHREAD}
.include <bsd.lib.mk>
+
+print-stuff:
+ @echo "1:${DPADD}"
+ @echo "2:${LIBPTHREAD}"
tron@lyssa:/usr/src/external/gpl3/gcc/lib/libtsan>make print-stuff
1: /usr/src/external/gpl3/gcc/lib/libtsan/shlib_version
2:
This library is just the only place where this causes a build problem
due to the ordering.
Kind regards
--
Matthias Scheler https://zhadum.org.uk/
Home |
Main Index |
Thread Index |
Old Index