Skip to contentSkip to conversation

package/sqlite: revert bump to 3.49.0 (branch yem/sqlite-revert)

PATCH Applied Yann E. MORIN 3 participants 7 messages Feb 19, 2025

lore
Share & tools
lore
#0 lore raw

cover package/sqlite: revert bump to 3.49.0 (branch yem/sqlite-revert)

Hello All!

There are a few regressions left in sqlite, that are not trivial to fix. As the next release is nearing due date, lets play it safe and just revert. There are details of the remaining issues in the last commit of the series, so they are not going to be repeated here.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Yann E. MORIN (4):
Revert "package/sqlite: fix build issue if C++ is not enabled since bump to 3.49.0" Revert "package/sqlite: fix configure options for readline/editline support" Revert "package/sqlite: fix build issue since bump to 3.49.0"
Revert "package/sqlite: bump version to 3.49.0"

 package/sqlite/sqlite.hash |  2 +-
 package/sqlite/sqlite.mk   | 96 ++++++++++++++++------------------------------
 2 files changed, 33 insertions(+), 65 deletions(-)

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

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

#1 lore raw

PATCH 1/4 Revert "package/sqlite: fix build issue if C++ is not enabled since bump to 3.49.0"

This reverts commit 8a1ae9e0b151063528e67b8b34a1229dc729df3c.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>
---
 package/sqlite/sqlite.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/sqlite/sqlite.mk +2 -5
index 8016ff1c4c..255ddc937b 100644
@@ -65,9 +65,7 @@ endif
 SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" LDFLAGS="$(SQLITE_LDFLAGS)"
 
 define SQLITE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_CONFIGURE_OPTS) \
-		$(if $(BR2_INSTALL_LIBSTDCPP),,CXX=false) \
-		$(SQLITE_CONF_ENV) ./configure \
+	(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
 		--prefix=/usr \
 		--host="$(GNU_TARGET_NAME)" \
 		--build="$(GNU_HOST_NAME)" \
@@ -89,8 +87,7 @@ define SQLITE_INSTALL_TARGET_CMDS
 endef
 
 define HOST_SQLITE_CONFIGURE_CMDS
-	(cd $(@D); $(HOST_CONFIGURE_OPTS) \
-		$(SQLITE_CONF_ENV) ./configure \
+	(cd $(@D); $(HOST_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
 		--prefix=/usr \
 		--host="$(GNU_HOST_NAME)" \
 		--build="$(GNU_HOST_NAME)" \
Signature · 6 lines
2.47.0

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

Re: [Buildroot] [PATCH 1/4] Revert "package/sqlite: fix build issue if C++ is not enabled since bump to 3.49.0"

Quoted 5 lines · Yann E. MORIN

This reverts commit 8a1ae9e0b151063528e67b8b34a1229dc729df3c.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>

I applied this series to master.

We will give another try to bump sqlite to 3.49.0 with more testing after the next release.

Thanks!

Best regards,

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

#3 lore raw

PATCH 2/4 Revert "package/sqlite: fix configure options for readline/editline support"

In reply to Yann E. MORIN

This reverts commit 004db1f5f3adaab7264b84e0896f9761cd9a2657.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>
---
 package/sqlite/sqlite.mk | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
package/sqlite/sqlite.mk +4 -7
index 255ddc937b..5a8b033ce0 100644
@@ -44,12 +44,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
 SQLITE_DEPENDENCIES += ncurses readline
-SQLITE_CFLAGS  += -DHAVE_READLINE=1
-SQLITE_LDFLAGS += -lreadline -lncurses
-else ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_LIBEDIT),yy)
-SQLITE_DEPENDENCIES += ncurses libedit
-SQLITE_CFLAGS  += -DHAVE_EDITLINE=1
-SQLITE_LDFLAGS += -ledit -lncurses
+else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
+SQLITE_DEPENDENCIES += libedit
+SQLITE_CONF_OPTS += --disable-readline --editline
 else
 SQLITE_CONF_OPTS += --disable-readline
 endif
@@ -62,7 +59,7 @@ ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),)
 SQLITE_CONF_OPTS += --disable-json
 endif
 
-SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" LDFLAGS="$(SQLITE_LDFLAGS)"
+SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
 
 define SQLITE_CONFIGURE_CMDS
 	(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
Signature · 6 lines
2.47.0

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

PATCH 3/4 Revert "package/sqlite: fix build issue since bump to 3.49.0"

In reply to Yann E. MORIN

This reverts commit a93680be30bc35f7d2465ef576035fb937ea1d64.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>
---
 package/sqlite/sqlite.mk | 82 ++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 54 deletions(-)
package/sqlite/sqlite.mk +28 -54
index 5a8b033ce0..a23f6e1d66 100644
@@ -21,6 +21,14 @@ ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA),y)
 SQLITE_CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA
 endif
 
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_JSON1
+endif
+
 ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y)
 SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY
 endif
@@ -42,64 +50,30 @@ else
 SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS))
 endif
 
+SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
+
+ifeq ($(BR2_STATIC_LIBS),y)
+SQLITE_CONF_OPTS += --enable-dynamic-extensions=no
+else
+SQLITE_CONF_OPTS += --disable-static-shell
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+SQLITE_CONF_OPTS += --enable-threadsafe
+else
+SQLITE_CONF_OPTS += --disable-threadsafe
+SQLITE_CFLAGS += -DSQLITE_THREADSAFE=0
+endif
+
 ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
 SQLITE_DEPENDENCIES += ncurses readline
+SQLITE_CONF_OPTS += --disable-editline --enable-readline
 else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
 SQLITE_DEPENDENCIES += libedit
-SQLITE_CONF_OPTS += --disable-readline --editline
+SQLITE_CONF_OPTS += --enable-editline --disable-readline
 else
-SQLITE_CONF_OPTS += --disable-readline
+SQLITE_CONF_OPTS += --disable-editline --disable-readline
 endif
 
-ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
-SQLITE_CONF_OPTS += --fts3
-endif
-
-ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),)
-SQLITE_CONF_OPTS += --disable-json
-endif
-
-SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
-
-define SQLITE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
-		--prefix=/usr \
-		--host="$(GNU_TARGET_NAME)" \
-		--build="$(GNU_HOST_NAME)" \
-		--sysroot="$(STAGING_DIR)" \
-		$(SQLITE_CONF_OPTS) \
-	)
-endef
-
-define SQLITE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define SQLITE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
-endef
-
-define SQLITE_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
-endef
-
-define HOST_SQLITE_CONFIGURE_CMDS
-	(cd $(@D); $(HOST_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
-		--prefix=/usr \
-		--host="$(GNU_HOST_NAME)" \
-		--build="$(GNU_HOST_NAME)" \
-		--sysroot="$(HOST_DIR)" \
-		$(SQLITE_CONF_OPTS) \
-	)
-endef
-
-define HOST_SQLITE_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define HOST_SQLITE_INSTALL_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) DESTDIR="$(HOST_DIR)" -C $(@D) install
-endef
-
-$(eval $(generic-package))
-$(eval $(host-generic-package))
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 6 lines
2.47.0

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

PATCH 4/4 Revert "package/sqlite: bump version to 3.49.0"

In reply to Yann E. MORIN

sqlite 3.49.0 has changed its buildsystem, causing a lot of breakage along the lines.

Although a few fixes have already been applied (and reverted in the previous commits), there are remaining pain-points that are not trivial to fix in a timely manner :

- the buildsystem forces an rpath to /usr/lib, and it is not obvious how to prevent that (excepyt with patching),

- there is an optional dependency to zlib that is not accounted for, neither in the target nor in the host variants; this causes issues when the build host has libz-devel (or similar) already installed, in whicxh case sqlite detets it and links with it; as it is missing an rpath to $(HOST_DIR)/lib, this causesw a build failure when another package pulls in zlib. See:
https://autobuild.buildroot.org/results/1a81cb7c88a41a03767a1a201ee0628468f60766/build-end.log
https://lore.kernel.org/buildroot/20250219195112.GA2631528@pevik/T/#mb7c7ac63902ed55623a5adf5d1db4a3f60db9fef

Fixing the second issue would seem easy enough, but zlib could depend on ccache (when that is enabled), and ccqche depends on sqlite, so that would be a circular dependency. And there is no option in sqlite's configure script to forcefully disable use of zlib...

A revert is the quickest solution to unbreak for the time being, as the next release is nearing due date. Another bump can be attempted later, that addresses all the remaining issues.

This reverts commit db85638cea3414ca0293cbbb2352e5b0b63a2579.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>
Cc Petr Vorel <[email protected]>
---
 package/sqlite/sqlite.hash | 2 +-
 package/sqlite/sqlite.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/sqlite/sqlite.hash +1 -1
index ddec2637b8..5b933fba8f 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  4d8bfa0b55e36951f6e5a9fb8c99f3b58990ab785c57b4f84f37d163a0672759  sqlite-autoconf-3490000.tar.gz
+sha256  ac992f7fca3989de7ed1fe99c16363f848794c8c32a158dafd4eb927a2e02fd5  sqlite-autoconf-3480000.tar.gz
 sha256  66e056b6e8687f32af30d5187611b98b12a8f46f07aaf62f43585f276e8f0ac9  tea/license.terms
package/sqlite/sqlite.mk +2 -2
index a23f6e1d66..c8f12a427a 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-SQLITE_VERSION = 3.49.0
-SQLITE_TAR_VERSION = 3490000
+SQLITE_VERSION = 3.48.0
+SQLITE_TAR_VERSION = 3480000
 SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_TAR_VERSION).tar.gz
 SQLITE_SITE = https://www.sqlite.org/2025
 SQLITE_LICENSE = blessing
Signature · 6 lines
2.47.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Acked-by Romain Naour on v1 4/4
#6 lore raw

Re: [Buildroot] [PATCH 4/4] Revert "package/sqlite: bump version to 3.49.0"

Hello Yann,

Le 19/02/2025 à 23:10, Yann E. MORIN a écrit :

Quoted 28 lines

sqlite 3.49.0 has changed its buildsystem, causing a lot of breakage along the lines.

Although a few fixes have already been applied (and reverted in the previous commits), there are remaining pain-points that are not trivial to fix in a timely manner :

- the buildsystem forces an rpath to /usr/lib, and it is not obvious how to prevent that (excepyt with patching),

- there is an optional dependency to zlib that is not accounted for, neither in the target nor in the host variants; this causes issues when the build host has libz-devel (or similar) already installed, in whicxh case sqlite detets it and links with it; as it is missing an rpath to $(HOST_DIR)/lib, this causesw a build failure when another package pulls in zlib. See:
https://autobuild.buildroot.org/results/1a81cb7c88a41a03767a1a201ee0628468f60766/build-end.log
https://lore.kernel.org/buildroot/20250219195112.GA2631528@pevik/T/#mb7c7ac63902ed55623a5adf5d1db4a3f60db9fef

Fixing the second issue would seem easy enough, but zlib could depend on ccache (when that is enabled), and ccqche depends on sqlite, so that would be a circular dependency. And there is no option in sqlite's configure script to forcefully disable use of zlib...

A revert is the quickest solution to unbreak for the time being, as the next release is nearing due date. Another bump can be attempted later, that addresses all the remaining issues.

Quoted 6 lines

This reverts commit db85638cea3414ca0293cbbb2352e5b0b63a2579.

Cc Scott Fan <[email protected]>
Cc Romain Naour <[email protected]>
Cc Petr Vorel <[email protected]>

I'm agree with the revert proposal. We are close to -rc1 and we still find issues following the last version bump.

I'll wait for Julien's feedback.

Best regards,
Romain

Quoted 19 lines
---
 package/sqlite/sqlite.hash | 2 +-
 package/sqlite/sqlite.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/sqlite/sqlite.hash +1 -1
index ddec2637b8..5b933fba8f 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  4d8bfa0b55e36951f6e5a9fb8c99f3b58990ab785c57b4f84f37d163a0672759  sqlite-autoconf-3490000.tar.gz
+sha256  ac992f7fca3989de7ed1fe99c16363f848794c8c32a158dafd4eb927a2e02fd5  sqlite-autoconf-3480000.tar.gz
 sha256  66e056b6e8687f32af30d5187611b98b12a8f46f07aaf62f43585f276e8f0ac9  tea/license.terms
package/sqlite/sqlite.mk +0 -0
index a23f6e1d66..c8f12a427a 100644

package/sqlite/sqlite.mk line 11

Quoted 10 lines
package/sqlite/sqlite.mk +2 -2
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-SQLITE_VERSION = 3.49.0
-SQLITE_TAR_VERSION = 3490000
+SQLITE_VERSION = 3.48.0
+SQLITE_TAR_VERSION = 3480000
 SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_TAR_VERSION).tar.gz
 SQLITE_SITE = https://www.sqlite.org/2025
 SQLITE_LICENSE = blessing

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