sqlite-lines
sqlite-lines copied to clipboard
make sqljs error: INLINING_LIMIT` expects `bool` but got `int`
I tried running make sqljs
on macOS (x86) - after first running brew install emscripten
I got this error:
sqlite-lines % make sqljs
emcc -O2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_JSON1 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE -DSQLITE_LINES_DATE="\"2022-08-03T18:13:44Z-0700\"" -DSQLITE_LINES_VERSION="\"v0.1.1\"" -DSQLITE_LINES_SOURCE="\"cfd99ea3b3fa21471f34d9571049ef0b5c0b61d2\"" -DSQLITE_LINES_DISABLE_FILESYSTEM -DSQLITE_EXTRA_INIT=core_init --memory-init-file 0 -s RESERVED_FUNCTION_POINTERS=64 -s ALLOW_TABLE_GROWTH=1 -s EXPORTED_FUNCTIONS=@wasm/exported_functions.json -s EXPORTED_RUNTIME_METHODS=@wasm/exported_runtime_methods.json -s SINGLE_FILE=0 -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 -s LLD_REPORT_UNDEFINED -s INLINING_LIMIT=10 -s ASSERTIONS=1 -O1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 \
-I./sqlite -I./ sqlite-lines.c dist/sqlite3-extra.c \
--pre-js wasm/api.js \
-o dist/sqljs.js
shared:INFO: (Emscripten: Running sanity checks)
emcc: error: setting `INLINING_LIMIT` expects `bool` but got `int`
make: *** [dist/sqljs.js] Error 1
Can you run emcc --version
?
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5-git
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The release action also pins to 3.1.5, though I don't remember why... emcc isn't very fun to work with
% emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.17-git
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I thought I'd try installing that specific 3.1.5 version, but there's a hilarious decade-long StackOverflow thread which documents every historic method for installing previous versions of software and at what point Homebrew deprecated it: https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
So I'll have to figure out how to install Emscripten outside of Homebrew.
@simonw this process worked for me:
-
git clone https://github.com/emscripten-core/emsdk.git && cd emsdk
-
./emsdk install 3.1.5
- that ran and succeeded and installed the tools to
./upstream/emscripten/
and./node
- that ran and succeeded and installed the tools to
-
source ./emsdk_env.sh
- this adds the directories above to the path
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5 (d33328b22db1aa62a51c50731e9645951a2038bc)
then the sqlite-lines
build succeeded
Looking into the actual error a bit, INLINING_LIMIT is a boolean because all it does is turn on -fno-inline-functions
; so presumably changing 50
to 1
here and 10
to 1
here would get things compiling with recent emscriptens