Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#77373 - [cargo-c] Segmentation fault on fresh package install
Attached to Project:
Community Packages
Opened by quietvoid (quietvoid) - Friday, 03 February 2023, 21:13 GMT
Last edited by Daniel Bermond (Bermond) - Saturday, 04 February 2023, 17:51 GMT
Opened by quietvoid (quietvoid) - Friday, 03 February 2023, 21:13 GMT
Last edited by Daniel Bermond (Bermond) - Saturday, 04 February 2023, 17:51 GMT
|
DetailsDescription:
I'm getting a segmentation fault when running `cargo cbuild` in a project (for example, `rav1e`). This only happens on a fresh setup, for some reason. If I do `cargo install cargo-c` instead, the binary works fine. And then the Arch package also seemingly starts working. A backtrace points to something with libcrypto but I can't really enable debug symbols and still reproduce the problem. Additional info: * package version(s): 0.9.16-1 * link to upstream bug report, if any: This weirdly coincides with the Rustup 1.25.2 update: https://blog.rust-lang.org/2023/02/01/Rustup-1.25.2.html However installing the latest Rustup version doesn't fix the existing cargo-c package. Steps to reproduce: 1. Setup Docker image using "archlinux:base-devel" image 2. Install rustup and cargo-c with `pacman -S rustup cargo-c` 3. Install Rust toolchain, `rustup update stable` 4. Clone rav1e repo (https://github.com/xiph/rav1e), cd into it 5. Run `cargo cbuild` 6. It segfaults Example Dockerfile: ``` FROM archlinux:base-devel RUN pacman -Syu --noconfirm RUN pacman -S --noconfirm git curl openssl rustup cargo-c ``` |
This task depends upon
Closed by Daniel Bermond (Bermond)
Saturday, 04 February 2023, 17:51 GMT
Reason for closing: Fixed
Additional comments about closing: cargo-c 0.9.16-2
Saturday, 04 February 2023, 17:51 GMT
Reason for closing: Fixed
Additional comments about closing: cargo-c 0.9.16-2
Smaller bt with cargo-c debug symbols: https://0x0.st/oC1n.txt
Still the built package with makepkg fails, while cargo install doesn't.
I have a suspicion it might be caused by enabling --all-features, which could be enabling the vendored OpenSSL from Cargo and causing the problem?
I tried removing --all-features from the build and it works.
Made https://github.com/lu-zero/cargo-c/issues/309 for now.
The Arch package should probably not be using the vendored-openssl feature, so cargo-c should not be built with --all-features.