Skip to contentSkip to conversation

package/sqlite: revert upstream change causing build issue

PATCH Applied Thomas Petazzoni via buildroot 2 participants 3 messages Apr 13, 2025 – May 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sqlite: revert upstream change causing build issue

Upstream did a change in sqlite3.pc.in that does work with their default build system, but not with the autoconf-based amalgamation that we use. This issue has been reported and fixed upstream, but the fix is not yet in any new release.

For the time being, we just revert the upstream change. We don't do a direct revert ("git revert") as multiple upstream commits touched this very line, so we simply revert to what it was prior to the different changes, and to what the upstream fix ends up doing.

This issue is causing build issue for all packages that use sqlite's pkg-config file, in a static-linking configuration.

Fixes:

https://autobuild.buildroot.org/results/1824a76eee4a877a2f19c1fd19a710ef9f059168/

---
 ...vert-upstream-commits-causing-build-.patch | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch
package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch new file +48 -0
new file mode 100644
index 0000000000..f35c8b8ddd
@@ -0,0 +1,48 @@
+From f70123a40193c2056755117aa291582f42db5f35 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Sun, 13 Apr 2025 17:47:53 +0200
+Subject: [PATCH] sqlite3.pc.in: revert upstream commits causing build issues
+
+This reverts upstream commit a2d88f6a03c9ebde3d037b0e297f47216c685381
+and a number of following commits related to the same commit. The
+sqlite build system is indeed upstream not based on autoconf, but the
+project "generates" an "autoconf-based amalgamation":
+
+  https://www3.sqlite.org/src/dir?ci=tip&name=autoconf
+
+Unfortunately commit a2d88f6a03c9ebde3d037b0e297f47216c685381 broke
+the build with the autoconf amalgamation because while @LIBS@ gets
+replaced by the autoconf machinery, @LDFLAGS_*@ do not, causing build
+failures such as:
+
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_MATH@: No such file or directory
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_ZLIB@: No such file or directory
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_ICU@: No such file or directory
+
+This issue has been reported at
+https://sqlite.org/forum/info/e40b9b424a, and upstream says that the
+issue has been fixed in the amalgamation script by basically doing the
+same as what this commit does:
+
+  https://sqlite.org/src/info/fe47154799bfe
+
+Upstream: https://sqlite.org/forum/info/e40b9b424a
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ sqlite3.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sqlite3.pc.in b/sqlite3.pc.in
+index a9f941b1e4..3799671e61 100644
+--- a/sqlite3.pc.in
++++ b/sqlite3.pc.in
+@@ -9,5 +9,5 @@ Name: SQLite
+ Description: SQL database engine
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lsqlite3
+-Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@
++Libs.private: @LIBS@
+ Cflags: -I${includedir}
+-- 
+2.49.0
+
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 13 lines · Thomas Petazzoni via buildroot

Upstream did a change in sqlite3.pc.in that does work with their default build system, but not with the autoconf-based amalgamation that we use. This issue has been reported and fixed upstream, but the fix is not yet in any new release.

For the time being, we just revert the upstream change. We don't do a direct revert ("git revert") as multiple upstream commits touched this very line, so we simply revert to what it was prior to the different changes, and to what the upstream fix ends up doing.

This issue is causing build issue for all packages that use sqlite's pkg-config file, in a static-linking configuration.

Quoted 6 lines

Fixes:

https://autobuild.buildroot.org/results/1824a76eee4a877a2f19c1fd19a710ef9f059168/

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 10 lines · Thomas Petazzoni via buildroot

Upstream did a change in sqlite3.pc.in that does work with their default build system, but not with the autoconf-based amalgamation that we use. This issue has been reported and fixed upstream, but the fix is not yet in any new release.

For the time being, we just revert the upstream change. We don't do a direct revert ("git revert") as multiple upstream commits touched this very line, so we simply revert to what it was prior to the different changes, and to what the upstream fix ends up doing.

Quoted 8 lines

This issue is causing build issue for all packages that use sqlite's pkg-config file, in a static-linking configuration.

Fixes:

   https://autobuild.buildroot.org/results/1824a76eee4a877a2f19c1fd19a710ef9f059168/

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 49 lines
---
  ...vert-upstream-commits-causing-build-.patch | 48 +++++++++++++++++++
  1 file changed, 48 insertions(+)

create mode 100644 package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch

package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch new file +38 -0
new file mode 100644
index 0000000000..f35c8b8ddd
@@ -0,0 +1,48 @@
+From f70123a40193c2056755117aa291582f42db5f35 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Sun, 13 Apr 2025 17:47:53 +0200
+Subject: [PATCH] sqlite3.pc.in: revert upstream commits causing build issues
+
+This reverts upstream commit a2d88f6a03c9ebde3d037b0e297f47216c685381
+and a number of following commits related to the same commit. The
+sqlite build system is indeed upstream not based on autoconf, but the
+project "generates" an "autoconf-based amalgamation":
+
+  https://www3.sqlite.org/src/dir?ci=tip&name=autoconf
+
+Unfortunately commit a2d88f6a03c9ebde3d037b0e297f47216c685381 broke
+the build with the autoconf amalgamation because while @LIBS@ gets
+replaced by the autoconf machinery, @LDFLAGS_*@ do not, causing build
+failures such as:
+
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_MATH@: No such file or directory
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_ZLIB@: No such file or directory
+output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: cannot find @LDFLAGS_ICU@: No such file or directory
+
+This issue has been reported at
+https://sqlite.org/forum/info/e40b9b424a, and upstream says that the
+issue has been fixed in the amalgamation script by basically doing the
+same as what this commit does:
+
+  https://sqlite.org/src/info/fe47154799bfe
+
+Upstream: https://sqlite.org/forum/info/e40b9b424a
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ sqlite3.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sqlite3.pc.in b/sqlite3.pc.in
+index a9f941b1e4..3799671e61 100644
+--- a/sqlite3.pc.in
++++ b/sqlite3.pc.in

package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch line 48

Quoted 10 lines
package/sqlite/0001-sqlite3.pc.in-revert-upstream-commits-causing-build-.patch new file +10 -0
+@@ -9,5 +9,5 @@ Name: SQLite
+ Description: SQL database engine
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lsqlite3
+-Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@
++Libs.private: @LIBS@
+ Cflags: -I${includedir}
+--
+2.49.0
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot