Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary patches #4

Closed
wants to merge 1 commit into from

Conversation

direc85
Copy link
Collaborator

@direc85 direc85 commented Jun 18, 2024

Building Rust tested with patched LLVM 16. Still requires building Rust in Platform SDK chroot - build still hangs on x.py (iirc) with mb2 --target or Sailfish SDK sfdk build.

[SailfishOS-4.6.0.11EA-aarch64] whisperfish $ rustc --version --verbose   
rustc 1.75.0-nightly (82e1608df 2023-12-21) (built from a source tarball)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: i686-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 16.0.6

LLVM 16 seems to be fine here, but building Whisperfish fails:

     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/home/mersdk/.cargo/registry/src/index.crates.io-1cd66030c949c28d/lock_api-0.4.11 CARGO_PKG_AUTHORS='Amanieu d'\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=lock_api CARGO_PKG_README='' CARGO_PKG_REPOSITORY='https://github.com/Amanieu/parking_lot' CARGO_PKG_RUST_VERSION=1.49.0 CARGO_PKG_VERSION=0.4.11 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=11 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/matti/SFOS/whisperfish/target/release/deps:/usr/lib' rustc --crate-name build_script_build --edition=2018 /home/mersdk/.cargo/registry/src/index.crates.io-1cd66030c949c28d/lock_api-0.4.11/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=210 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=off --cfg 'feature="atomic_usize"' --cfg 'feature="default"' -C metadata=ed928debb5c64653 -C extra-filename=-ed928debb5c64653 --out-dir /home/matti/SFOS/whisperfish/target/release/build/lock_api-ed928debb5c64653 --target i686-unknown-linux-gnu -C linker=i686-unknown-linux-gnu-gcc -L dependency=/home/matti/SFOS/whisperfish/target/release/deps --extern autocfg=/home/matti/SFOS/whisperfish/target/release/deps/libautocfg-8b75980738c6014e.rlib --cap-lints warn`
error: linking with `i686-unknown-linux-gnu-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/bin:/opt/cross/bin/:/home/mersdk/.mb2/wrappers/whisperfish:/home/mersdk/.mb2/user-wrappers/whisperfish:/usr/local/bin:/bin:/usr/bin" VSLANG="1033" "i686-unknown-linux-gnu-gcc" "-m32" "/home/matti/SFOS/whisperfish/.tmp/rustc7XEAfq/symbols.o" "/home/matti/SFOS/whisperfish/target/release/build/lock_api-ed928debb5c64653/build_script_build-ed928debb5c64653.build_script_build.8762868c606a712a-cgu.0.rcgu.o" "/home/matti/SFOS/whisperfish/target/release/build/lock_api-ed928debb5c64653/build_script_build-ed928debb5c64653.3fs5u63r3z9ee7p7.rcgu.o" "-Wl,--as-needed" "-L" "/home/matti/SFOS/whisperfish/target/release/deps" "-L" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/matti/SFOS/whisperfish/target/release/deps/libautocfg-8b75980738c6014e.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-c007fe971ec9fa45.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libpanic_unwind-c970a419c5fb2257.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libobject-cdb433d94e361c81.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libmemchr-c38c6fb0b635db28.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libaddr2line-5380f775bf94517b.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libgimli-72c7ecf93e2df1a7.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/librustc_demangle-726d98f6d47fcb8b.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libstd_detect-54227e1d164a9562.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libhashbrown-63b50559e08bc911.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/librustc_std_workspace_alloc-400c39d4913e6b01.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libminiz_oxide-001243b3a0933aac.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libadler-e267b8dbee33a529.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libunwind-f57aa4b841d99932.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libcfg_if-312528a27f51c229.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/liblibc-72c73fa2836e7533.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/liballoc-227f99bd3086a5dc.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/librustc_std_workspace_core-d220d53f92ed4bf8.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-9fb215fa5b50ff91.rlib" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib/libcompiler_builtins-593628d088c3eb8e.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/matti/SailfishOS/mersdk/targets/SailfishOS-4.6.0.11EA-aarch64.default/usr/lib/rustlib/i686-unknown-linux-gnu/lib" "-o" "/home/matti/SFOS/whisperfish/target/release/build/lock_api-ed928debb5c64653/build_script_build-ed928debb5c64653" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/matti/SFOS/whisperfish/target/release/deps/libautocfg-8b75980738c6014e.rlib(autocfg-8b75980738c6014e.autocfg.882a0f75077c050b-cgu.0.rcgu.o): in function `std::fs::metadata':
          /home/matti/SFOS/rust/BUILD/rustc-1.75.0-src/library/std/src/fs.rs:1916: undefined reference to `std::sys::unix::fs::stat'
          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 `lock_api` (build script) due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/home/mersdk/.cargo/registry/src/index.crates.io-1cd66030c949c28d/lock_api-0.4.11 CARGO_PKG_AUTHORS='Amanieu d'\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=lock_api CARGO_PKG_README='' CARGO_PKG_REPOSITORY='https://github.com/Amanieu/parking_lot' CARGO_PKG_RUST_VERSION=1.49.0 CARGO_PKG_VERSION=0.4.11 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=11 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/matti/SFOS/whisperfish/target/release/deps:/usr/lib' rustc --crate-name build_script_build --edition=2018 /home/mersdk/.cargo/registry/src/index.crates.io-1cd66030c949c28d/lock_api-0.4.11/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=210 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=off --cfg 'feature="atomic_usize"' --cfg 'feature="default"' -C metadata=ed928debb5c64653 -C extra-filename=-ed928debb5c64653 --out-dir /home/matti/SFOS/whisperfish/target/release/build/lock_api-ed928debb5c64653 --target i686-unknown-linux-gnu -C linker=i686-unknown-linux-gnu-gcc -L dependency=/home/matti/SFOS/whisperfish/target/release/deps --extern autocfg=/home/matti/SFOS/whisperfish/target/release/deps/libautocfg-8b75980738c6014e.rlib --cap-lints warn` (exit status: 1)
error: Bad exit status from /var/tmp/rpm-tmp.J3YQ7u (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.J3YQ7u (%build)

Pushing this here anyway so others can see where I'm currently stuck at.

@direc85
Copy link
Collaborator Author

direc85 commented Jun 25, 2024

Superseded by sailfishos#23

@direc85 direc85 closed this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant