[PR #584] [MERGED] github: enable armv7 musl build #838

Closed
opened 2026-02-27 09:09:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/584
Author: @martadinata666
Created: 5/16/2023
Status: Merged
Merged: 8/28/2023
Merged by: @nitnelave

Base: mainHead: static-armv7


📝 Commits (10+)

  • fbccc16 static-armv7
  • 1ad97d2 Update docker-build-static.yml
  • 6b18ef6 Update docker-build-static.yml
  • f1b5af5 Update docker-build-static.yml
  • 45b4cf3 Test using GNU linker
  • ddf28f1 Update docker-build-static.yml
  • e8e7470 Update Dockerfile.ci.debian
  • 98233d2 Update Dockerfile.ci.alpine
  • 8eb7a88 Update docs little bit, update path for artifact release
  • f895a41 armv7 target already in dev image

📊 Changes

3 files changed (+17 additions, -20 deletions)

View changed files

📝 .github/workflows/Dockerfile.ci.alpine (+3 -3)
📝 .github/workflows/Dockerfile.ci.debian (+3 -3)
📝 .github/workflows/docker-build-static.yml (+11 -14)

📄 Description

Building with gnu compiler

  • Can remove musl-gcc from development image?
  • Build armv7? Success
  • Set image to alpine only? Keep all
  • Some cleanup

Issue after change

  • Some sqlite3 missing? Incompabily linking with gnu gcc. (use musl-gcc)
  • musl-cross armv7l need more older musl stackoverflow thread, this is rust issue, confirmed with rust nightly 1.71 (musl lib upgraded to 1.2.3)
  • Due sqlite3, can't remove musl compiler (sqlite3 blackmagic)
  = note: LC_ALL="C" PATH="/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/self-contained:/opt/aarch64-linux-musl-cross/:/opt/aarch64-linux-musl-cross/bin/:/opt/x86_64-linux-musl-cross/:/opt/x86_64-linux-musl-cross/bin/:/home/debian/cargo/bin/:/home/debian/.local/bin:/home/debian/.local/lib:/home/debian/.local/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "aarch64-linux-gnu-gcc" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtbegin.o" "/tmp/rustc4DNVbh/symbols.o" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps/lldap-300f097551b88f0c.lldap.86dd67ed-cgu.15.rcgu.o" "-Wl,--as-needed" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps" "-L" "/home/debian/lldap/target/release/deps" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/zstd-sys-51a13d8dea6e6574/out" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/ring-42cf3d826bbfb071/out" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/libsqlite3-sys-5bf0fb41028630c4/out" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/tmp/rustc4DNVbh/libzstd_sys-9914a45dfbaea2c1.rlib" "/tmp/rustc4DNVbh/liblibsqlite3_sys-4958aa93929c55a2.rlib" "/tmp/rustc4DNVbh/libring-41f3d2a6f4566385.rlib" "-lunwind" "-lc" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-50d8ea67cf3a12a5.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps/lldap-300f097551b88f0c" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtend.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o"
  = note: /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/rustc4DNVbh/liblibsqlite3_sys-4958aa93929c55a2.rlib(sqlite3.o):(.data.rel.aSyscall+0xb0): undefined reference to `fcntl64'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `lldap` due to previous error

Waiting for this

debian@6ed2ef4f8fdf:~/lldap$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.71.0-nightly (e77366b57 2023-05-16)

   Compiling actix-web-httpauth v0.8.0
   Compiling tracing-actix-web v0.7.2
   Compiling sqlx v0.6.2
   Compiling sea-query-binder v0.3.0
   Compiling sea-orm v0.11.0
   Compiling lldap v0.5.0-alpha (/home/debian/lldap/server)
    Finished release [optimized] target(s) in 7m 59s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v2.2.1
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
debian@6ed2ef4f8fdf:~/lldap$ CC_armv7_unknown_linux_musleabihf=armv7l-linux-musleabihf-gcc CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=armv7l-linux-musleabihf-gcc CARGO_BUILD_TARGET=armv7-unknown-linux-musleabihf cargo build --release -p lldap
debian@6ed2ef4f8fdf:~/lldap$ file ./target/armv7-unknown-linux-musleabihf/release/lldap
./target/armv7-unknown-linux-musleabihf/release/lldap: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/584 **Author:** [@martadinata666](https://github.com/martadinata666) **Created:** 5/16/2023 **Status:** ✅ Merged **Merged:** 8/28/2023 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `static-armv7` --- ### 📝 Commits (10+) - [`fbccc16`](https://github.com/lldap/lldap/commit/fbccc16644b480b84a331ac4d9a8ed633621b602) static-armv7 - [`1ad97d2`](https://github.com/lldap/lldap/commit/1ad97d2cb321c2fa0538bb02ec6a43c3f284114c) Update docker-build-static.yml - [`6b18ef6`](https://github.com/lldap/lldap/commit/6b18ef61aa0ce9fa5a37f196c291d0cbaf74ccff) Update docker-build-static.yml - [`f1b5af5`](https://github.com/lldap/lldap/commit/f1b5af55eaee1872566d50cce2ec7950b7b89080) Update docker-build-static.yml - [`45b4cf3`](https://github.com/lldap/lldap/commit/45b4cf3c33c81dd3ac3c8f8b1141ab6c9b0bfc96) Test using GNU linker - [`ddf28f1`](https://github.com/lldap/lldap/commit/ddf28f1130ed9f2ef9a37c9b7a49e62006b51d26) Update docker-build-static.yml - [`e8e7470`](https://github.com/lldap/lldap/commit/e8e7470add2f1d127d662f1f3b5dd4cde6942286) Update Dockerfile.ci.debian - [`98233d2`](https://github.com/lldap/lldap/commit/98233d27203388b924d5c3e54b6fa39ab2a484de) Update Dockerfile.ci.alpine - [`8eb7a88`](https://github.com/lldap/lldap/commit/8eb7a889faecbf15abd86ee7b2bd97ad1e643443) Update docs little bit, update path for artifact release - [`f895a41`](https://github.com/lldap/lldap/commit/f895a41ef6c0a77f1705513c86baebe45cf6a2ef) armv7 target already in dev image ### 📊 Changes **3 files changed** (+17 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/Dockerfile.ci.alpine` (+3 -3) 📝 `.github/workflows/Dockerfile.ci.debian` (+3 -3) 📝 `.github/workflows/docker-build-static.yml` (+11 -14) </details> ### 📄 Description ~~Building with gnu compiler~~ * [x] ~~Can remove musl-gcc from development image?~~ * [x] Build armv7? Success * [x] ~~Set image to alpine only?~~ Keep all * [x] Some cleanup Issue after change * [x] Some sqlite3 missing? Incompabily linking with gnu gcc. (use musl-gcc) * [x] ~~musl-cross armv7l need more older musl [stackoverflow thread](https://stackoverflow.com/questions/61934997/undefined-reference-to-stat-time64-when-cross-compiling-rust-project-on-mu),~~ this is rust issue, confirmed with rust nightly 1.71 (musl lib upgraded to 1.2.3) * [x] Due sqlite3, can't remove musl compiler (sqlite3 blackmagic) ``` = note: LC_ALL="C" PATH="/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/self-contained:/opt/aarch64-linux-musl-cross/:/opt/aarch64-linux-musl-cross/bin/:/opt/x86_64-linux-musl-cross/:/opt/x86_64-linux-musl-cross/bin/:/home/debian/cargo/bin/:/home/debian/.local/bin:/home/debian/.local/lib:/home/debian/.local/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "aarch64-linux-gnu-gcc" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtbegin.o" "/tmp/rustc4DNVbh/symbols.o" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps/lldap-300f097551b88f0c.lldap.86dd67ed-cgu.15.rcgu.o" "-Wl,--as-needed" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps" "-L" "/home/debian/lldap/target/release/deps" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/zstd-sys-51a13d8dea6e6574/out" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/ring-42cf3d826bbfb071/out" "-L" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/build/libsqlite3-sys-5bf0fb41028630c4/out" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/tmp/rustc4DNVbh/libzstd_sys-9914a45dfbaea2c1.rlib" "/tmp/rustc4DNVbh/liblibsqlite3_sys-4958aa93929c55a2.rlib" "/tmp/rustc4DNVbh/libring-41f3d2a6f4566385.rlib" "-lunwind" "-lc" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-50d8ea67cf3a12a5.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/debian/lldap/target/aarch64-unknown-linux-musl/release/deps/lldap-300f097551b88f0c" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtend.o" "/home/debian/rustup/toolchains/1.69.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o" = note: /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/rustc4DNVbh/liblibsqlite3_sys-4958aa93929c55a2.rlib(sqlite3.o):(.data.rel.aSyscall+0xb0): undefined reference to `fcntl64' collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname) error: could not compile `lldap` due to previous error ``` Waiting for this * https://blog.rust-lang.org/2023/05/09/Updating-musl-targets.html * [x] 1.71 on nightly, wait on stable, waiting for dev image updated ``` debian@6ed2ef4f8fdf:~/lldap$ rustup default nightly info: using existing install for 'nightly-x86_64-unknown-linux-gnu' info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu' nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.71.0-nightly (e77366b57 2023-05-16) ``` ``` Compiling actix-web-httpauth v0.8.0 Compiling tracing-actix-web v0.7.2 Compiling sqlx v0.6.2 Compiling sea-query-binder v0.3.0 Compiling sea-orm v0.11.0 Compiling lldap v0.5.0-alpha (/home/debian/lldap/server) Finished release [optimized] target(s) in 7m 59s warning: the following packages contain code that will be rejected by a future version of Rust: nom v2.2.1 note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` debian@6ed2ef4f8fdf:~/lldap$ CC_armv7_unknown_linux_musleabihf=armv7l-linux-musleabihf-gcc CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=armv7l-linux-musleabihf-gcc CARGO_BUILD_TARGET=armv7-unknown-linux-musleabihf cargo build --release -p lldap ``` ``` debian@6ed2ef4f8fdf:~/lldap$ file ./target/armv7-unknown-linux-musleabihf/release/lldap ./target/armv7-unknown-linux-musleabihf/release/lldap: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:09:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#838
No description provided.