tursodatabase / tursodatabase/libsql

can't build the library

Open
#2,072 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

I'm getting panic at the first compile of the library, not sure where to start debugging

cargo new libsqltest
cd libsqltest
cargo add libsql --features encryption
cargo check

results in output

warning: libsql-ffi@0.9.7: CC_var_name=CC_x86_64_unknown_linux_gnu
error: failed to run custom build command for `libsql-ffi v0.9.7`

Caused by:
  process didn't exit successfully: `/home/othi/Repos/private/testlibsql/target/debug/build/libsql-ffi-7d010902f6049eb4/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=bundled/src/sqlite3.c
  cargo:rerun-if-changed=/home/othi/Repos/private/testlibsql/target/debug/build/libsql-ffi-5178382ffec95b96/out/sqlite3mc/libsqlite3mc_static.a
  cargo:lib_dir=/home/othi/Repos/private/testlibsql/target/debug/build/libsql-ffi-5178382ffec95b96/out
  cargo:warning=CC_var_name=CC_x86_64_unknown_linux_gnu
  Running `cmake` with options: -DCMAKE_BUILD_TYPE=Release -DSQLITE3MC_STATIC=ON -DCODEC_TYPE=AES256 -DSQLITE3MC_BUILD_SHELL=OFF -DSQLITE_SHELL_IS_UTF8=OFF -DSQLITE_USER_AUTHENTICATION=OFF -DSQLITE_SECURE_DELETE=OFF -DSQLITE_ENABLE_COLUMN_METADATA=ON -DSQLITE_USE_URI=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON

  --- stderr
  [/home/othi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsql-ffi-0.9.7/build.rs:441:9] format!("{BUNDLED_DIR}/SQLite3MultipleCiphers") = "bundled/SQLite3MultipleCiphers"

  thread 'main' panicked at /home/othi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsql-ffi-0.9.7/build.rs:539:33:
  called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with cargo new, cargo add libsql --features encryption, and cargo check. Start in libsql-ffi's build.rs, especially the paths around lines 441 and 539, and inspect the CMake invocation for the bundled SQLite3MultipleCiphers build. Done means the encryption-enabled library completes its first build without the custom build command panicking.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, rust, sqlite
Domain
build-system, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.