tursodatabase / tursodatabase/libsql-js

MacOS build error

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
335
Forks
48
Avg merge
3d 2h
Merged PRs (30d)
3

Description

ProductName: macOS
ProductVersion: 15.3.2
BuildVersion: 24D81

Rust installed with brew:
~ brew info rust
==> rust: stable 1.85.0 (bottled), HEAD
Safe, concurrent, practical language
https://www.rust-lang.org/
Installed
/opt/homebrew/Cellar/rust/1.85.0 (3,582 files, 318.6MB) *
Poured from bottle using the formulae.brew.sh API on 2025-03-15 at 09:34:42
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/r/rust.rb
License: Apache-2.0 OR MIT
==> Dependencies
Required: libgit2@1.8 ✔, libssh2 ✔, llvm ✔, openssl@3 ✔, pkgconf ✔, zstd ✔
==> Requirements
Required: macOS >= 10.12 (or Linux) ✔


So when I call LIBSQL_JS_DEV=1 npm run build, I see error:

✗ LIBSQL_JS_DEV=1 npm run build

> libsql@0.5.0 build
> npx tsc && cargo build --message-format=json --release | npm exec neon dist -- --name libsql-js

   Compiling hyper v0.14.30
   Compiling libsql-ffi v0.5.0 (https://github.com/tursodatabase/libsql/?rev=e40c4319829e0805313fadcaa19034b89b7708ad#e40c4319)
   Compiling tower-http v0.4.4
   Compiling semver v1.0.23
   Compiling aes v0.8.4
   Compiling regex-automata v0.4.7
   Compiling regex-automata v0.1.10
   Compiling serde_json v1.0.128
warning: libsql-ffi@0.5.0: CC_var_name=CC_aarch64_apple_darwin
error: failed to run custom build command for `libsql-ffi v0.5.0 (https://github.com/tursodatabase/libsql/?rev=e40c4319829e0805313fadcaa19034b89b7708ad#e40c4319)`

Caused by:
  process didn't exit successfully: `/Users/devium/libsql-js/target/release/build/libsql-ffi-d1f4dc7dec539d2a/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-lib=framework=Security
  cargo:rerun-if-changed=bundled/src/sqlite3.c
  cargo:rerun-if-changed=/Users/devium/libsql-js/target/release/build/libsql-ffi-f74be81de95a4f8f/out/sqlite3mc/libsqlite3mc_static.a
  cargo:lib_dir=/Users/devium/libsql-js/target/release/build/libsql-ffi-f74be81de95a4f8f/out
  cargo:warning=CC_var_name=CC_aarch64_apple_darwin
  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

  thread 'main' panicked at /Users/devium/.cargo/git/checkouts/libsql-fdc89d7ae2201f5b/e40c431/libsql-ffi/build.rs:518: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...
error: No artifacts were generated for crate libsql-js

Contributor guide

No contributing guide indexed for this repository

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

Start by rerunning LIBSQL_JS_DEV=1 npm run build on the reported macOS and Rust setup. Inspect the referenced libsql-ffi build.rs around line 518 and the CMake invocation to identify the missing executable behind the NotFound error. Done means the build completes and generates artifacts for libsql-js.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, javascript, rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.