SQLite User Forum

v3.48.0 pkg-config --static is not emitting correct libraries
Login

v3.48.0 pkg-config --static is not emitting correct libraries

(1) By flavorjones on 2025-01-15 16:58:48 [link] [source]

When building and installing from the v3.48.0 autoconf tarball, the installed sqlite3.pc file is incorrectly resolving the private/static libraries.

# v3.47.2
$ pkg-config sqlite3/3.47.2/lib/pkgconfig/sqlite3.pc --libs --static
-L/path/to/sqlite3/3.47.2/lib -lsqlite3 -lz -lm

# v3.48.0
$ pkg-config sqlite3/3.48.0/lib/pkgconfig/sqlite3.pc --libs --static
-L/path/to/sqlite3/3.48.0/lib -lsqlite3 @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@

You should be able to reproduce this by downloading the 3.48.0 autoconf tarball and running "./configure" with no arguments. When I do that, the contents of the file are what you might expect from looking at the output above:

# Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: SQLite
Description: SQL database engine
Version: 3.48.0
Libs: -L${libdir} -lsqlite3
Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@
Cflags: -I${includedir}

This does not reproduce when I run "./configure" in the source tree.

(2) By Stephan Beal (stephan) on 2025-01-15 17:10:48 in reply to 1 [source]

When building and installing from the v3.48.0 autoconf tarball, ...

This is caused by a change in how sqlite3.pc is generated. It's not yet clear to me how we can fix the autoconf tarball, as we don't actually use autoconf anymore, but we will look into this very soon.

(3) By Stephan Beal (stephan) on 2025-01-16 12:18:33 in reply to 1 [link] [source]

This does not reproduce when I run "./configure" in the source tree.

That one now uses a completely different build system.

@LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@

A quick-fix for that is now in the trunk and will apply to future autoconf bundles. "Soonish" we hope to replace the innards of that bundle with the new configure/build system, though.

Thank you for the report!

(4) By flavorjones on 2025-01-16 19:30:38 in reply to 3 [link] [source]

Thank you!