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

cargo check panics #3

Closed
kenz-gelsoft opened this issue Apr 11, 2023 · 5 comments
Closed

cargo check panics #3

kenz-gelsoft opened this issue Apr 11, 2023 · 5 comments

Comments

@kenz-gelsoft
Copy link
Owner

checking whether the C++ compiler supports -fno-aligned-new... yes
checking for llvm_profdata... /bin/llvm-profdata
checking for rustc... /bin/rustc
checking for cargo... /bin/cargo
checking rustc version... 1.67.0
checking cargo version... 
DEBUG: Executing: `/bin/cargo --version --verbose`
DEBUG: The command returned non-zero exit status 101.
DEBUG: Its error output was:
DEBUG: | thread 'main' panicked at 'unexpected error from isatty: 0', /root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/rustix-0.36.3/src/backend/libc/termios/syscalls.rs:141:20
DEBUG: | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ERROR: Command `/bin/cargo --version --verbose` failed with exit status 101.
~/src/firefox-102.9.0/obj-x86_64-unknown-haiku> 
@kenz-gelsoft
Copy link
Owner Author

it suceeds on tty

~/src/firefox-102.9.0/obj-x86_64-unknown-haiku> cargo --version --verbose
cargo 1.67.0 (8ecd4f20a 2023-01-10)
release: 1.67.0
commit-hash: 8ecd4f20a9efb626975ac18a016d480dc7183d9b
commit-date: 2023-01-10
host: x86_64-unknown-haiku
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.85.0 (sys:0.4.59+curl-7.86.0 system ssl:OpenSSL/1.1.1t)
os: Unknown [unknown bitness]

@kenz-gelsoft
Copy link
Owner Author

checking whether the C++ compiler supports -fno-aligned-new... yes
checking for llvm_profdata... /bin/llvm-profdata
checking for rustc... /bin/rustc
checking for cargo... /bin/cargo
checking rustc version... 1.67.0
checking cargo version... 
DEBUG: Executing: `/bin/cargo --version --verbose`
DEBUG: The command returned non-zero exit status 101.
DEBUG: Its error output was:
DEBUG: | thread 'main' panicked at 'unexpected error from isatty: 0', /root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/rustix-0.36.3/src/backend/libc/termios/syscalls.rs:141:20
DEBUG: | stack backtrace:
DEBUG: |    0: rust_begin_unwind
DEBUG: |    1: core::panicking::panic_fmt
DEBUG: |    2: rustix::backend::termios::syscalls::isatty
DEBUG: |    3: <env_logger::fmt::writer::Builder>::build
DEBUG: |    4: <env_logger::Builder>::build
DEBUG: |    5: <env_logger::Builder>::try_init
DEBUG: |    6: env_logger::init_from_env::<&str>
DEBUG: |    7: cargo::main
DEBUG: | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
ERROR: Command `/bin/cargo --version --verbose` failed with exit status 101.

@kenz-gelsoft
Copy link
Owner Author

kenz-gelsoft commented Apr 11, 2023

built cargo from source

~/src> git clone https://github.com/rust-lang/cargo.git
Cloning into 'cargo'...
remote: Enumerating objects: 109929, done.
remote: Counting objects: 100% (164/164), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 109929 (delta 118), reused 136 (delta 110), pack-reused 109765
Receiving objects: 100% (109929/109929), 41.09 MiB | 1.46 MiB/s, done.
Resolving deltas: 100% (78677/78677), done.
Updating files: 100% (1961/1961), done.
~/src> cd cargo/
~/src/cargo> ls
benches  build.rs  Cargo.toml  CHANGELOG.md  ci  clippy.toml  CODE_OF_CONDUCT.md  CONTRIBUTING.md  crates  deny.toml  LICENSE-APACHE  LICENSE-MIT  LICENSE-THIRD-PARTY  publish.py  README.md  src  tests  triagebot.toml
~/src/cargo> cargo build --release
   Compiling libz-sys v1.1.8
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcZTADDf/symbols.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.0.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.1.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.10.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.11.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.12.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.13.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.14.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.15.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.2.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.3.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.4.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.5.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.6.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.7.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.8.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.build_script_build.c6cc106a-cgu.9.rcgu.o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad.1ow7c7ao6uq5se59.rcgu.o" "-Wl,--as-needed" "-L" "/boot/home/src/cargo/target/release/deps" "-L" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib" "-Wl,-Bstatic" "/boot/home/src/cargo/target/release/deps/libcc-eb57309d83718898.rlib" "/boot/home/src/cargo/target/release/deps/libjobserver-ab371f31e9b36cb0.rlib" "/boot/home/src/cargo/target/release/deps/liblibc-ac784a27e6a27f56.rlib" "/boot/home/src/cargo/target/release/deps/libpkg_config-8a9ea6cca6647147.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libstd-0aff5d80c079b333.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libpanic_unwind-2efec475f190f90c.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libobject-b5f179159ab7a7dd.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libmemchr-e869f074999dc16d.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libaddr2line-035c8fbf92ccfb67.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libgimli-91fa919d3b485197.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/librustc_demangle-7a3465ff558803b7.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libstd_detect-70522e808ee5dd71.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libhashbrown-82e99ef4d4277d76.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libminiz_oxide-afbc8266a708051b.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libadler-8b4cbfa7d8882572.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/librustc_std_workspace_alloc-a687ac0e3a6bf9ac.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libunwind-a51a76decded7c01.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libcfg_if-bf204fa65400940c.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/liblibc-5294f1b1787137ed.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/liballoc-e5d31ad194447d5d.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/librustc_std_workspace_core-91fb84c08a5c97b2.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libcore-f633af8d11425ba7.rlib" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib/libcompiler_builtins-56c2fdd139c2de44.rlib" "-Wl,-Bdynamic" "-lbsd" "-lunix" "-lgcc_s" "-lroot" "-lnetwork" "-lbsd" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/boot/system/develop/tools/rust/lib/rustlib/x86_64-unknown-haiku/lib" "-o" "/boot/home/src/cargo/target/release/build/libz-sys-8d6bddf1b88e95ad/build_script_build-8d6bddf1b88e95ad" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find -lunix
          collect2: error: ld returned 1 exit status
          

error: could not compile `libz-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
~/src/cargo> 

failed

@kenz-gelsoft
Copy link
Owner Author

Worked around for now, will request rebuild cargo with newer dependencies

diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
index e64dc5d5ec..5c4021423d 100644
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -132,7 +132,16 @@ set_config(
 def cargo_info(cargo):
     if not cargo:
         return
-    out = check_cmd_output(cargo, "--version", "--verbose").splitlines()
+    out = """\
+cargo 1.67.0 (8ecd4f20a 2023-01-10)
+release: 1.67.0
+commit-hash: 8ecd4f20a9efb626975ac18a016d480dc7183d9b
+commit-date: 2023-01-10
+host: x86_64-unknown-haiku
+libgit2: 1.5.0 (sys:0.16.0 vendored)
+libcurl: 7.85.0 (sys:0.4.59+curl-7.86.0 system ssl:OpenSSL/1.1.1t)
+os: Unknown [unknown bitness]
+""".splitlines()#check_cmd_output(cargo, "--version", "--verbose").splitlines()
     info = dict((s.strip() for s in line.split(":", 1)) for line in out[1:])
     version = info.get("release")
     # Older versions of cargo didn't support --verbose, in which case, they

@kenz-gelsoft
Copy link
Owner Author

kenz-gelsoft commented Apr 21, 2023

work around is not required now with patched cargo.

#17 (comment)

checking for rustc... /bin/rustc
checking for cargo... /boot/home/bin/cargo
checking rustc version... 1.67.0
checking cargo version... 1.67.0
checking for rust host triplet... x86_64-unknown-haiku

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

No branches or pull requests

1 participant