From 68fb4c13bafdd9b4da3234e7aed0109c0374910c Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sat, 9 Oct 2021 12:06:37 +0200 Subject: [PATCH] Unbundle sqlite3 and link it instead To run the cross compiled binary on Debian, do patchelf --set-interpreter /lib/ld-linux-armhf.so.3 raspi-oled --- Cargo.lock | 1 - Cargo.toml | 2 +- shell.nix | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 03ab4e0..884bc34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,7 +240,6 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" dependencies = [ - "cc", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index 6b7bf5d..269e1f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ ssd1306 = "0.6.0" libc = "0.2.98" gpio-cdev = "0.4" dht-hal = "0.0.1" -rusqlite = { version = "0.25.3", features = ["bundled"] } +rusqlite = "0.25.3" [profile.release] codegen-units = 1 diff --git a/shell.nix b/shell.nix index eb954d4..64848ff 100644 --- a/shell.nix +++ b/shell.nix @@ -2,6 +2,8 @@ with (import {}); mkShell { nativeBuildInputs = [ pkgsCross.muslpi.stdenv.cc + pkgsCross.muslpi.sqlite ]; CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER = "${pkgsCross.muslpi.stdenv.cc}/bin/armv6l-unknown-linux-musleabihf-ld"; + #TARGET_CC = "${pkgsCross.muslpi.stdenv.cc}/bin/armv6l-unknown-linux-musleabihf-cc"; }