-
Notifications
You must be signed in to change notification settings - Fork 9
Update SQLite to version 3.50.1 and ensure Unikraft compatibility #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
craciunoiuc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove some of the adjectives describing it? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks the same to me
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the addlibobjs and addlib_s logic up top for consistency with other Unikraft libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but they are in the same place?
craciunoiuc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks the same to me
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but they are in the same place?
craciunoiuc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong click sorry

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.