pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: "ld: cannot find -lnbcompat" building cwrappers
On Sun, Mar 17, 2024 at 04:40:19PM -0500, John D. Baker wrote:
> On two machines (so far) running 10.0_RC6/amd64, I am unable to
> build "pkgtools/cwrappers". I complains:
>
> [...]
> # link cwrappers-20220403/as-wrapper
> gcc -Wl,-zrelro -Wl,-R/usr/pkg/lib -pie -shared-libgcc -Wl,--warn-shared-textrel -Wl,-z,relro -o as-wrapper alloc.o cleanup-cc.o common.o reorder-cc.o generic-transform-cc.o normalise-cc.o as-wrapper.o normalise-as.o -Wl,-rpath-link,/lib -L=/lib -lnbcompat
> ld: cannot find -lnbcompat
> *** [as-wrapper] Error code 1
>
> make: stopped in /tmp/pkgsrc/pkgtools/cwrappers/work/cwrappers-20220403
> 1 error
>
> make: stopped in /tmp/pkgsrc/pkgtools/cwrappers/work/cwrappers-20220403
> *** Error code 2
>
> Stop.
> make[1]: stopped in /x/pkgsrc/pkgtools/cwrappers
> *** Error code 1
>
> Stop.
> make: stopped in /x/pkgsrc/pkgtools/cwrappers
>
>
> Earlier in the build output, it claims to build "libnbcompat":
>
> [...]
> ===> Configuring for cwrappers-20220403
> => Configuring and building libnbcompat
> [...]
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating nbcompat/config.h
> /usr/bin/awk -f nbcompat.awk nbcompat/config.h > nbcompat/nbconfig.h
> gcc -DHAVE_NBCOMPAT_H=1 -I/tmp/pkgsrc/pkgtools/cwrappers/work/libnbcompat -I. -I. -O2 -DHAVE_CONFIG_H -c glob.c
> ar cr libnbcompat.a glob.o
> ranlib libnbcompat.a
> [...]
>
> Is "glob.o" the only thing needed for "cwrappers" libnbcompat.a?
> It was placed here during the build of "cwrappers":
>
> -rw-rw-r-- 1 sysop wheel 8594 Mar 17 16:17 /tmp/pkgsrc/pkgtools/cwrappers/work/libnbcompat/libnbcompat.a
>
> What's odd is the second machine I tried to build it on previously
> succeeded building "cwrappers". Now it fails just like the one I first
> saw fail.
I see this too, and when I back out the attached change, it works again.
I've revert the change, since this breaks cwrappers on NetBSD.
cc nia@ FYI
Thomas
--- Begin Message ---
Module Name: pkgsrc
Committed By: nia
Date: Sun Mar 17 13:40:14 UTC 2024
Modified Files:
pkgsrc/pkgtools/libnbcompat: inplace.mk
Log Message:
libnbcompat: When linking with an "in-place" copy of libnbcompat in each
piece of software that needs to pull functions from it, prevent libtool
from detecting -lnbcompat in the command line arguments then declaring
it as a dependency in the resulting libtool archive.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/pkgtools/libnbcompat/inplace.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/libnbcompat/inplace.mk
diff -u pkgsrc/pkgtools/libnbcompat/inplace.mk:1.15 pkgsrc/pkgtools/libnbcompat/inplace.mk:1.16
--- pkgsrc/pkgtools/libnbcompat/inplace.mk:1.15 Tue Jun 27 09:30:58 2023
+++ pkgsrc/pkgtools/libnbcompat/inplace.mk Sun Mar 17 13:40:14 2024
@@ -1,4 +1,4 @@
-# $NetBSD: inplace.mk,v 1.15 2023/06/27 09:30:58 riastradh Exp $
+# $NetBSD: inplace.mk,v 1.16 2024/03/17 13:40:14 nia Exp $
#
# This file should not be included directly. Use USE_FEATURES instead.
#
@@ -14,8 +14,7 @@ LIBNBCOMPAT_FILESDIR= ${.CURDIR}/../../p
LIBNBCOMPAT_SRCDIR= ${WRKDIR}/libnbcompat
CPPFLAGS.nbcompat= -DHAVE_NBCOMPAT_H=1 -I${LIBNBCOMPAT_SRCDIR}
-LDFLAGS.nbcompat= -L${LIBNBCOMPAT_SRCDIR}
-LDADD.nbcompat= -lnbcompat
+LDADD.nbcompat= ${LIBNBCOMPAT_SRCDIR}/libnbcompat.a
.if !empty(LIBNBCOMPAT_USE_PIC:M[Yy][Ee][Ss])
LIBNBCOMPAT_PICDIR= ${WRKDIR}/libnbcompat_pic
--- End Message ---
Home |
Main Index |
Thread Index |
Old Index