3.50.00 build error with --disable-static-shell
(1) By Lonnie Abelbeck (abelbeck) on 2025-05-29 20:03:59 [source]
Previously sqlite-autoconf-3490100, with --disable-static-shell, cross-compiled and worked fine. Now with sqlite-autoconf-3500000, with --disable-static-shell, I see: undefined reference to symbol 'floor@@GLIBC_2.2.5' With --disable-static-shell, "build/sqlite-3500000/shell.c -L. -lsqlite3 -lz" is built separately. But starting with 3.49.02, shell.c now calls "floor()" which needs -lm sqlite-autoconf-3490200/shell.c:6724: if( (idxNum & 0x2000)!=0 && r==floor(r) ){ sqlite-autoconf-3490200/shell.c:6727: iMax = (sqlite3_int64)floor(r); I fixed the build problem with this patch: --- sqlite-3500000/Makefile.in.orig 2025-05-29 14:01:21.483771560 -0500 +++ sqlite-3500000/Makefile.in 2025-05-29 14:01:48.412516227 -0500 @@ -224,7 +224,7 @@ # ENABLE_STATIC_SHELL = @ENABLE_STATIC_SHELL@ sqlite3-shell-link-flags.1 = $(TOP)/sqlite3.c $(LDFLAGS.libsqlite3) -sqlite3-shell-link-flags.0 = -L. -lsqlite3 $(LDFLAGS.zlib) +sqlite3-shell-link-flags.0 = -L. -lsqlite3 $(LDFLAGS.zlib) $(LDFLAGS.math) sqlite3-shell-deps.1 = $(TOP)/sqlite3.c sqlite3-shell-deps.0 = $(libsqlite3.DLL) # This builds with: "build/sqlite-3500000/shell.c -L. -lsqlite3 -lz -lm" and works. Is this the proper fix?
(2.1) By Stephan Beal (stephan) on 2025-05-29 20:34:48 edited from 2.0 in reply to 1 [link] [source]
Is this the proper fix?
That is indeed, thank you very much for saving me the effort of tracking that down :).
That is now fixed on the trunk and the 3.49/3.50 branches.