tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Doubling performance of pkgsrc/mk



On Thu, Nov 24, 2022 at 09:14:10AM +0000, David Brownlee wrote:
> On Thu, 24 Nov 2022 at 08:21, Jonathan Perkin <jperkin%mnx.io@localhost> wrote:
> >
> > * On 2022-11-24 at 03:04 GMT, Takahiro Kambe wrote:
> >
> > >Is this error related to it?
> > >
> > >% cd /usr/pkgsrc/lang/php-sqlite3
> > >% make
> > >checking whether to enable the SQLite3 extension... yes, shared
> > >checking for sqlite3 > 3.7.4... no
> > >configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
> >
> > It feels unlikely, but possibly?  Did it build fine before I committed
> > my changes?  What does config.log say about the search for sqlite3?
> 
> There is something up with sqlite3 in pkgsrc HEAD - devel/nss fails
> for me with the below. Let me try to bisect
> 
> David
> 
> ld: ../../../dist/NetBSD9.3_STABLE_64_OPT.OBJ/lib/libsoftokn.a(sdb.o): in functi
> on `s_open':
> sdb.c:(.text+0x2eb1): undefined reference to `sqlite3_mprintf'
> ld: sdb.c:(.text+0x2edf): undefined reference to `sqlite3_mprintf'
> ld: sdb.c:(.text+0x2fe8): undefined reference to `sqlite3_free'
> ld: sdb.c:(.text+0x2ff5): undefined reference to `sqlite3_free'
> gmake[3]: *** [../../coreconf/rules.mk:165:
> NetBSD9.3_STABLE_64_OPT.OBJ/bltest] Error 1


Interestingly my old nss-3.85 installation shows

$ ldd /usr/pkg/lib/nss/libnssdbm3.so
/usr/pkg/lib/nss/libnssdbm3.so:
...     
        -lsqlite3.1 => /usr/lib/libsqlite3.so.1
...

which means it used the system sqlite which is

$ cat /usr/lib/pkgconfig/sqlite3.pc
Name: SQLite
Description: SQL database engine
Version: 3.26.0
Libs: -lsqlite3
Libs.private: -lm

I am guessing this is picked up somehow by "gyp" because of
MAKE_ENV+=      NSS_USE_SYSTEM_SQLITE=1


This doesn't seem to be what is intended:

devel/sqlite3 has no builtin.mk, and

# more /usr/pkgsrc/devel/nss/patches/patch-mn
$NetBSD: patch-mn,v 1.3 2015/05/05 21:42:19 ryoon Exp $

Make sure we link correctly with sqlite3 from pkgsrc.
...
+       `pkg-config --libs-only-L sqlite3` \
+       `pkg-config --libs-only-l sqlite3` \


outside of the build:
# pkg-config --libs-only-L sqlite3
-L/usr/pkg/lib 


yet

# ls pkgsrc/devel/nss/work.x86_64/.buildlink/
.buildlink_nspr_done         .buildlink_sqlite3_done      bin                          lib
.buildlink_pthread_done      .buildlink_zlib_done         include
# ls pkgsrc/devel/nss/work.x86_64/.buildlink/lib/pkgconfig/
nspr.pc zlib.pc

there is no sqlite3.pc in .buildlink for pkg-config to find?


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index