Update SQLite to version 3.50.1 and ensure Unikraft compatibility#10
Update SQLite to version 3.50.1 and ensure Unikraft compatibility#10abhinavkumar1203 wants to merge 5 commits intounikraft:stagingfrom
Conversation
craciunoiuc
left a comment
There was a problem hiding this comment.
Some initial comments from my side
| name := "sqlite" | ||
| description := "A C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine." | ||
| name := "libsqlite" | ||
| description := "A C-language library that implements a small, fast, self-contained SQL database engine" |
There was a problem hiding this comment.
Why remove some of the adjectives describing it? 😅
| LIBSQLITE_FLAGS = -D_HAVE_SQLITE_CONFIG_H \ | ||
| -DSQLITE_OMIT_LOAD_EXTENSION \ | ||
| -DSQLITE_OMIT_LOCALTIME \ | ||
| -DSQLITE_OS_UNIX=0 \ | ||
| -DSQLITE_OS_OTHER=1 \ | ||
| -DSQLITE_THREADSAFE=0 |
There was a problem hiding this comment.
I'll have to try this out and I'll report back if ok
| LIBSQLITE_SRCS-y += $(LIBSQLITE_SRC)/sqlite3.c | ||
| LIBSQLITE_OBJS-y := $(LIBSQLITE_SRCS-y:.c=.o) | ||
| $(eval $(call addlibobjs,libsqlite,$(LIBSQLITE_OBJS-y))) | ||
| $(eval $(call addlib_s,libsqlite,$(CONFIG_LIBSQLITE))) |
There was a problem hiding this comment.
I think this should be placed up top? I'm looking at Nginx https://github.com/unikraft/lib-nginx/blob/staging/Makefile.uk#L37-L40
There was a problem hiding this comment.
Moved the addlibobjs and addlib_s logic up top for consistency with other Unikraft libraries
There was a problem hiding this comment.
but they are in the same place?
craciunoiuc
left a comment
There was a problem hiding this comment.
Left some more comments, looks like you didn't commit some stuff? Also please test it and try running a simple query inside it
| imply LIBUKMMAP | ||
| select LIBPOSIX_SYSINFO | ||
| depends on HAVE_LIBC | ||
| select LIBPTHREAD_EMBEDDED |
There was a problem hiding this comment.
These need to sit inside the menuconfig option. Did kraft menuconfig even work?
| name := "sqlite" | ||
| description := "A C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine." | ||
| name := "libsqlite" | ||
| description := "A C-language library that implements a small, fast, self-contained SQL database engine" |
| LIBSQLITE_URL = https://www.sqlite.org/2025/$(LIBSQLITE_BASENAME).zip | ||
| LIBSQLITE_PATCHDIR = $(LIBSQLITE_BASE)/patches | ||
| LIBSQLITE_SRC = $(LIBSQLITE_ORIGIN)/$(LIBSQLITE_BASENAME) |
There was a problem hiding this comment.
I say either align all, or align none in these cases
| LIBSQLITE_SRCS-y += $(LIBSQLITE_SRC)/sqlite3.c | ||
| LIBSQLITE_OBJS-y := $(LIBSQLITE_SRCS-y:.c=.o) | ||
| $(eval $(call addlibobjs,libsqlite,$(LIBSQLITE_OBJS-y))) | ||
| $(eval $(call addlib_s,libsqlite,$(CONFIG_LIBSQLITE))) |
There was a problem hiding this comment.
but they are in the same place?

This PR updates the lib-sqlite Unikraft library to SQLite version 3.50.1
Major changes:
Upgraded source to SQLite 3.50.1
Updated SHA256 hash accordingly for upstream zip
Patch 0001 disables
math.husage to ensure compatibility with Unikraft nolibc/libcPatch 0002 stubs out unsupported POSIX syscalls (
close,access,getcwd,ftruncate,read,pread)Added wrapper header
sqlite_syswrap.hand sourcesqlite_syswrap.cNotes
Initially targeted 3.45.3 when latest release was unavailable
Version 3.50.1 became stable after work had started — now upgraded
math.hdependency removed and syscalls stubbed via patchesTested with
app-helloworldonqemu-x86_64.