-
-
Notifications
You must be signed in to change notification settings - Fork 203
Bump SQLite to 3.49.1.0
#667
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
Conversation
SQLite changed from autoconf to autosetup which appears to have some minor differences. First, we had to use
|
It can't find the C++ compiler, likely because it isn't looking for It's a common pattern for us to export It is also possible |
Thanks for the hints, I can poke at that. Some of the macOS builds fail with
but some of the other macOs builds succeed
presumably a race condition, I guess I'll try 1e59526 |
Setting
|
For quick reference, here's the compiler code from sqlite's autosetup show
|
CC_FOR_BUILD should likely be host compiler and CC should likely be target compiler. There's also a CROSS you may need to set if cross-compiling is enabled. It's never semantically correct for the host and target compiler to come from the same PBS variable. |
Yeah that's what I tried first and it failed to find I think |
The static musl build of sqlite is failing with
we are setting
and our musl libc is built with
I think the problem is really that we're building a shared sqlite? Is |
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --prefix /tools/deps --disable-shared" | ||
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --prefix=/tools/deps --disable-shared" |
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.
This is a syntax difference between autosetup and autoconf
|
||
make -j ${NUM_CPUS} | ||
make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out | ||
make -j ${NUM_CPUS} libsqlite3.a |
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.
make
implies make all
which includes the shared library despite --disable-shared
cpython-unix/build.cross.Dockerfile
Outdated
g++-aarch64-linux-gnu \ | ||
g++-arm-linux-gnueabi \ | ||
g++-arm-linux-gnueabihf \ | ||
g++-mips-linux-gnu \ | ||
g++-mips64el-linux-gnuabi64 \ | ||
g++-mipsel-linux-gnu \ | ||
g++-powerpc64le-linux-gnu \ | ||
g++-s390x-linux-gnu \ |
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.
We need a C++ compiler for this build now.
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.
See #667 (comment)
|
||
if [ "${TARGET_TRIPLE}" = "aarch64-apple-ios" ]; then | ||
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no" | ||
elif [ "${TARGET_TRIPLE}" = "x86_64-apple-ios" ]; then | ||
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no" | ||
fi | ||
|
||
CFLAGS="${EXTRA_TARGET_CFLAGS} -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS3_TOKENIZER -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS} | ||
CC_FOR_BUILD="${HOST_CC}" CFLAGS="${EXTRA_TARGET_CFLAGS} -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS3_TOKENIZER -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS} |
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.
The autosetup script use CC_FOR_BUILD
instead of HOST_CC
.
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.
Not an actual concern but -fPIC
for the preprocessor (CPPFLAGS
) seems unneeded, I wonder why we were doing this.
What exactly in SQLite needs C++? If they introduced a hard dependency on C++, I'd be shocked. It feels like a build system bug or use issue if C++ is actually required. |
I'm not sure. I can look into that. I guess this could be relevant
Since we set |
Good call! |
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.
TIL about autosetup, interesting.
|
||
if [ "${TARGET_TRIPLE}" = "aarch64-apple-ios" ]; then | ||
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no" | ||
elif [ "${TARGET_TRIPLE}" = "x86_64-apple-ios" ]; then | ||
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no" | ||
fi | ||
|
||
CFLAGS="${EXTRA_TARGET_CFLAGS} -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS3_TOKENIZER -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS} | ||
CC_FOR_BUILD="${HOST_CC}" CFLAGS="${EXTRA_TARGET_CFLAGS} -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS3_TOKENIZER -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS} |
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.
Not an actual concern but -fPIC
for the preprocessor (CPPFLAGS
) seems unneeded, I wonder why we were doing this.
A uv-provided python 3.12 install (specifically Claude wrote me a script to check the installation configuration, and it appears that the Is it possible that this change removed that option somehow?
|
Previously we only had |
They did change the build system though so it's possible some default changed. I'll look into enabling it. |
Hmm I'm not sure. I've tried running my setup script on two fresh VMs now and it failed to find the fts5 extension on both of them. I'm falling back to the system python now using |
#694 looks to do the trick |
Closes #666