pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rust: use system libunwind



On 4/5/24 08:00, Jason Bacon wrote:
On 4/5/24 07:49, Tobias Nygren wrote:
On Fri, 5 Apr 2024 07:04:26 -0500
Jason Bacon <jtocino%gmx.com@localhost> wrote:

That's a painful solution, but I agree that it's probably the safest.
Here's a new patch proposal using bundled llvm and libunwind, with a
comment documenting what we know so far.

I'm happy with this. I will investigate how to patch the build scripts
when I have more time. The normal way of using RUSTFLAGS that we use in
other packages didn't have any effect.

-Tobias

OK, running test builds on Lubuntu 23 and Alma 8 now.  This will take
quite a while with the bundled LLVM, so I may not commit until tomorrow
even if it goes well.

Lubuntu 23 succeeded, but Alma 8 found another knot in the spaghetti. I won't have time to look into this today.

===

hdr" "-Wl,-z,noexecstack" "-L" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-3512c7d88804c4ea.so" "-shared" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,/home/bacon/Pkgsrc/pkg/lib"
  = note: /usr/bin/ld: cannot find -lz
          collect2: error: ld returned 1 exit status


Building [=======================> ] 322/324: rustc_driver
Did not run successfully: exit status: 1
error: could not compile `rustc_driver` (lib) due to previous error

Caused by:
LD_LIBRARY_PATH="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib:/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps:/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib:/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/bin/rustc" "--crate-name" "rustc_driver" "--edition=2021" "compiler/rustc_driver/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=80" "--crate-type" "dylib" "--emit=dep-info,link" "-C" "prefer-dynamic" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-Zunstable-options" "--check-cfg" "values(feature)" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=3512c7d88804c4ea" "-C" "extra-filename=-3512c7d88804c4ea" "--out-dir" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "--target" "x86_64-unknown-linux-gnu" "-L" "dependency=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps" "--extern" "rustc_driver_impl=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver_impl-8c029ffb752c03a0.rlib" "--cfg=bootstrap" "--cfg=windows_raw_dylib" "-Csymbol-mangling-version=v0" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(parallel_compiler)" "--check-cfg=values(no_btreemap_remove_entry)" "--check-cfg=values(crossbeam_loom)" "--check-cfg=values(span_locations)" "--check-cfg=values(rustix_use_libc)" "--check-cfg=values(emulate_second_only_system)" "--check-cfg=values(windows_raw_dylib)" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,/home/bacon/Pkgsrc/pkg/lib" "-Csplit-debuginfo=off" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-Z" "binary-dep-depinfo" "-L" "native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/psm-ba6ea6c3f780dd0c/out" "-L" "native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-b17e6cdb68ad4dfa/out" "-L" "native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/llvm/build/lib" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-sysroot" "-Ztls-model=initial-exec" "-Z" "force-unstable-if-unmarked"
-------------
process didn't exit successfully: `/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/bootstrap/debug/rustc --crate-name rustc_driver --edition=2021 compiler/rustc_driver/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=80 --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no -Zunstable-options --check-cfg 'values(feature)' --check-cfg 'names()' --check-cfg 'values()' -C metadata=3512c7d88804c4ea -C extra-filename=-3512c7d88804c4ea --out-dir /home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern rustc_driver_impl=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver_impl-8c029ffb752c03a0.rlib --cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' '--check-cfg=values(emulate_second_only_system)' '--check-cfg=values(windows_raw_dylib)' -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,/home/bacon/Pkgsrc/pkg/lib -Csplit-debuginfo=off -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Z binary-dep-depinfo -L native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/psm-ba6ea6c3f780dd0c/out -L native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-b17e6cdb68ad4dfa/out -L native=/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/llvm/build/lib` (exit status: 1) command did not execute successfully: cd "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false" CARGO_TARGET_DIR="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc" CC_x86_64_unknown_linux_gnu="cc" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_DEFAULT_CODEGEN_BACKEND="llvm" CFG_DISABLE_UNSTABLE_FEATURES="1" CFG_LIBDIR_RELATIVE="lib" CFG_RELEASE="1.75.0" CFG_RELEASE_CHANNEL="stable" CFG_VERSION="1.75.0 (82e1608df 2023-12-21) (built from a source tarball)" CFG_VER_DATE="2023-12-21" CFG_VER_HASH="82e1608dfa6e0b5569232559e3d385fea5a93112" CFLAGS_x86_64_unknown_linux_gnu="-O2 -ffunction-sections -fdata-sections -fPIC -m64 -O2 -I/home/bacon/Pkgsrc/pkg/include -I/usr/include -I/home/bacon/Pkgsrc/pkg/include/python3.11" CXXFLAGS_x86_64_unknown_linux_gnu="-O2 -ffunction-sections -fdata-sections -fPIC -m64 -O2 -I/home/bacon/Pkgsrc/pkg/include -I/usr/include -I/home/bacon/Pkgsrc/pkg/include/python3.11" CXX_x86_64_unknown_linux_gnu="c++" LIBC_CHECK_CFG="1" LLVM_CONFIG="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" LLVM_NDEBUG="1" LLVM_RUSTLLVM="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/native" RUSTC="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/tmp/extended-error-metadata" RUSTC_FORCE_UNSTABLE="1" RUSTC_HOST_FLAGS="--cfg=bootstrap -Zunstable-options --check-cfg=values(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings" RUSTC_REAL="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/bin/rustc" RUSTC_SNAPSHOT="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/lib" RUSTC_STAGE="0" RUSTC_SYSROOT="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/x86_64-unknown-linux-gnu/stage0-sysroot" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="1" RUSTDOC="/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(parallel_compiler) --check-cfg=values(no_btreemap_remove_entry) --check-cfg=values(crossbeam_loom) --check-cfg=values(span_locations) --check-cfg=values(rustix_use_libc) --check-cfg=values(emulate_second_only_system) --check-cfg=values(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.75.0\t(82e1608df\t2023-12-21)\t(built\tfrom\ta\tsource\ttarball) -Zcrate-attr=warn(rust_2018_idioms)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(parallel_compiler) --check-cfg=values(no_btreemap_remove_entry) --check-cfg=values(crossbeam_loom) --check-cfg=values(span_locations) --check-cfg=values(rustix_use_libc) --check-cfg=values(emulate_second_only_system) --check-cfg=values(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,/home/bacon/Pkgsrc/pkg/lib -Csplit-debuginfo=off -Zunstable-options -Wrustc::internal -Cprefer-dynamic" RUST_TEST_THREADS="2" WINAPI_NO_BUNDLED_LIBRARIES="1" __CARGO_DEFAULT_LIB_METADATA="bootstrap" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rust-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg=names,values,output,features" "-Zbinary-dep-depinfo" "-j" "2" "-v" "--frozen" "--features" "llvm max_level_info" "--manifest-path" "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
Traceback (most recent call last):
File "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/./x.py", line 50, in <module>
    bootstrap.main()
File "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/src/bootstrap/bootstrap.py", line 1145, in main
    bootstrap(args)
File "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/src/bootstrap/bootstrap.py", line 1121, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
File "/home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/src/bootstrap/bootstrap.py", line 187, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /home/bacon/Pkgsrc/pkgsrc/lang/rust/work/rustc-1.75.0-src/build/bootstrap/debug/bootstrap -v build --stage 2 -j 2
*** Error code 1

Stop.
bmake[1]: stopped in /home/bacon/Pkgsrc/pkgsrc/lang/rust
*** Error code 1



Home | Main Index | Thread Index | Old Index