SQLite User Forum

The ”autoconf” tarball pkgconf flags are insufficient to link on RHEL platforms
Login

The "autoconf" tarball pkgconf flags are insufficient to link on RHEL platforms

(1) By flavorjones on 2025-07-04 17:09:33 [source]

When building and installing from the v3.50.2 autoconf tarball, the installed sqlite3.pc file is not providing the full set of necessary flags on RHEL-derived platforms (specifically Rocky Linux, as reported by a user at https://github.com/sparklemotion/sqlite3-ruby/issues/634).

Before the 3.48.0 autosetup change, the installed sqlite3.pc file would emit the following on Rocky Linux:

$ pkg-config --libs --static path/to/sqlite3.pc
-L/path/to/sqlite3/3.47.2/lib -lsqlite3 -lz -lm -ldl -lpthread

However, as of 3.48.0, it emits:

$ pkg-config --libs --static path/to/sqlite3.pc
-L/path/to/sqlite3/3.50.2/lib -lsqlite3 -lm -lz

Using these flags results in linker failures, for example: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'.

I'm the maintainer of the downstream sqlite3 Ruby library, and I'm finding it tricky to figure out how to correctly link against the built sqlite3 across a wide variety of platforms. Specifically, the missing -ldl is problematic since libdl.so does not exist on some platforms (e.g., Musl Linux) and so the installer can't simply blindly add it to the link line.

For now, I'll figure out a workaround downstream; but I'm wondering if the SQLite maintainers are planning to restore any of the previous autoconf behaviors in the "autoconf" distribution of SQLite?

Thanks much,

-mike

(2) By Stephan Beal (stephan) on 2025-07-04 17:31:19 in reply to 1 [link] [source]

However, as of 3.48.0, it emits:

FWIW, sqlite3.pc, since late last year, only includes -lm, -lz, and the ICU-related flags, and your post is the first which has reported that as insufficient.

The libdl and pthread flags are, as of src:64f5f14322, propagated though to sqlite3.pc.

For now, I'll figure out a workaround downstream; but I'm wondering if the SQLite maintainers are planning to restore any of the previous autoconf behaviors in the "autoconf" distribution of SQLite?

We have no plans to actively port any lost features back into the new build process (if they're features we need, they were long-since ported over) and only ever consider doing so in response to reports like yours.

(3) By flavorjones on 2025-07-04 17:44:17 in reply to 2 [link] [source]

The libdl and pthread flags are, as of src:64f5f14322, propagated though to sqlite3.pc

Fabulous, thank you so much for the quick response. 🙇

(4) By flavorjones on 2025-07-04 18:08:42 in reply to 2 [link] [source]

Just confirming that the change in src:64f5f14322 fixes the described issue. Thank you again!

(5) By Stephan Beal (stephan) on 2025-07-04 18:39:28 in reply to 4 [link] [source]

Just confirming that the change in src:64f5f14322 fixes the described issue.

Thank you for the confirmation. That change will go into 3.51 and the as-yet-hypothetical 3.50.3.