Open jsteelz opened 2 years ago
Hello ! I had the same error until I define OPENSSL_ROOT_DIR
in ~/.zshrc. But then, I have the following error :
CMake Error at CMakeLists.txt:188 (math):
math cannot parse the expression: "1.4.9-release+1": syntax error,
unexpected exp_NUMBER, expecting end of file (4).
-- Found OpenSSL: /opt/homebrew/opt/openssl@3/lib/libcrypto.dylib (found version "3.0.5")
-- Configuring incomplete, errors occurred!
See also "/Users/arthur/Workspace/dashboard-api/node_modules/node-duckdb/duckdb/build/release/CMakeFiles/CMakeOutput.log".
See also "/Users/arthur/Workspace/dashboard-api/node_modules/node-duckdb/duckdb/build/release/CMakeFiles/CMakeError.log".
make: *** [release] Error 1
error Command failed with exit code 2.
CMakeError.log
contains following error :
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
Build flags:
Id flags:
The output was:
1
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Build flags:
Id flags:
The output was:
1
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@jsteelz Did you manage to fix the problem ?
There are two issues with OpenSSL and (node-)duckdb @jsteelz:
OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@1.1/1.1.1s
(or whatever path your openssl@1.1 was installed)@alannelucq, I hope your having fun in your new gig!
The problem you mentioned is caused by CMake which, for some reason, is looking for .git
to figure find the latest tag to figure the version it is currently at. This is directly from the DuckDB CMake AFAICT and this version is only parsed, nothing useful is made from it.
As .git
folders are not preserved when uploading to NPM, the only .git
CMake can find is the one of your project. This mean that using a format of version including words (like beta, release or others) will break the build as CMake can't parse it.
The only way I've found to work around this is to either:
While we could make a case that both of these problems stem from the duckdb
repository, I would like to point out that the SSL build is optional, however this option seem to be lost (please correct me if I'm wrong) in node-duckdb
which forces all of us to install a deprecated SSL version and hack around.
It would be great to bring the ability to control the build flags of duckdb
, or at least the SSL one since it's a niche feature (accessing files directly through HTTPS) which involve installing a very old and insecure version of OpenSSL.
Using yarn to install node-duckdb fails with the following error message:
To Reproduce
in an empty directory on an ARM mac (with yarn) yarn init with whatever yarn add node-duckdb - crash occurs