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.

After fully updating the tree and dependencies, I still see a link error on Alma8 when using internal LLVM. There's a -Wl,-rpath pointing to ${PREFIX}/lib, but no -L for some reason:

Running `/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`
error: linking with `cc` failed: exit status: 1

...

  = note: /usr/bin/ld: cannot find -lz
          collect2: error: ld returned 1 exit status



Home | Main Index | Thread Index | Old Index