Skip to content

sqlite-preupdate-hook fails to build for aarch64-apple-ios-sim on sqlx 0.8.6 #4259

@polw1

Description

@polw1

I have found these related issues/pull requests

#4241
#4240
#4161
#3844
#3928

Description

sqlx 0.8.6 fails to build for aarch64-apple-ios-sim.

The failure happens inside libsqlite3-sys v0.30.1 — which is triggered by enabling the sqlite-preupdate-hook feature, since that feature.

The root cause appears to be the libsqlite3-sys version pinned by the sqlx 0.8.x line (= 0.30.1) rather than the feature itself.

In my tests, the same build succeeds once libsqlite3-sys is pushed to 0.35.0.

Reproduction steps

Create a new crate with:

[package]
name = "sqlx-ios-simulator-bug"
version = "0.1.0"
edition = "2024"

[dependencies]
sqlx = { version = "0.8.6", default-features = false, features = ["runtime-tokio", "sqlite", "sqlite-preupdate-hook"] }

Then run:

rustup target add aarch64-apple-ios-sim
cargo build --target aarch64-apple-ios-sim

Output:

error: failed to run custom build command for `libsqlite3-sys v0.30.1`

Caused by:
  process didn't exit successfully: `/private/tmp/sqlx-ios-simulator-bug/target/debug/build/libsqlite3-sys-55e105bdd58e8206/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING

  --- stderr

  thread 'main' (2638217) panicked at /Users/dev/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1/build.rs:620:33:
  could not run bindgen on header sqlite3/sqlite3.h
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

SQLx version

0.8.6

Enabled SQLx features

runtime-tokio, sqlite, sqlite-preupdate-hook

Database server and version

SQLite; no external database server involved. The failure happens during build in libsqlite3-sys/bindgen before runtime.

Operating system

macOS 26

Rust version

1.95

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions