SQLite Forum

non-threadsafe build broken on sqlite-autoconf-3340000
Login

non-threadsafe build broken on sqlite-autoconf-3340000

(1) By anonymous on 2020-12-11 14:04:48 [source]

Hi,

as reported on the FreeBSD bugs tracker, building with threads disabled fails to link due to a missing reference to pthread_create().

We're building sqlite-autoconf-3340000.tar.gz.

Note that configure.ac:13338 adds -DSQLITE_THREADSAFE=1 to CFLAGS if enable_threadsafe is not no, but it doesn't adds -DSQLITE_THREADSAFE=0 otherwise.

Setting -DSQLITE_THREADSAFE=0 explicitely fixes the build.

Here's the patch I have committed to the FreeBSD ports tree.

I don't know how amalgamation works, but src/configure.ac from the fossil repo looks good:

if test "$enable_threadsafe" = "no"; then
  SQLITE_THREADSAFE=0
  AC_MSG_RESULT([no])
else
  SQLITE_THREADSAFE=1
  AC_MSG_RESULT([yes])
fi
AC_SUBST(SQLITE_THREADSAFE)

Thanks