Open itviewer opened 1 year ago
Thanks for reporting the issue @itviewer. I was able to reproduce it on Ubuntu 22.04.1
For future reference, one can either:
sqlite3
package from apt
(I used the one in jammy-updates
repository), orsqlite3
locally using gcc
gcc -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTEE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DHAVE_USLEEP -DHAVE_READLINE -I. -Os shell.c sqlite3.c -lpthread -ldl -lm -lreadline -lncurses -o sqlite3
Output from nm
on the generated sqlite3
binary shows that sqlite3_limit()
symbol is actually defined:
@patrickdevivo @amenowanna let's try this out on couple more linux / ubuntu versions (MacOS builds works fine)
Hi,
The mergestat binary works with no issues. However, I am having the same error message undefined symbol: sqlite3_limit
The current configuration is: Docker ubuntu image running on a x86 mac mini venture 13.3.1 (a) Within a docker shell: cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
I have compiled sqilte3 using your command above and using source from the following zip https://www.sqlite.org/2023/sqlite-amalgamation-3420000.zip
running .version provides sqlite> .version SQLite 3.42.0 2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0 gcc-11.3.0
sqlite> .load ./libmergestat Error: ./libmergestat.so: undefined symbol: sqlite3_limit
Running your nm command root@617ebbf30e09:/data/sqlite# nm -C ./sqlite3 | grep sqlite3_limit 000000000002c8f2 T sqlite3_limit
Initially, I tried .load with the latest v0.6.1 version of libmergestat.so I tried previous versions until I found that v0.5.10 would load successfully.
I tested this version (v0.5.10) with both the compiled version as well as the base SQLite installed using apt and it loads.
ubuntu 22.04.2