Description
Hi, I'm a Homebrew maintainer, trying to build librsvg on macOS with the latest rust. The issue encountered is reported at librsvg (https://gitlab.gnome.org/GNOME/librsvg/-/issues/787) but my investigation makes me think it's a compiler-builtins issue.
The issue in short is this: a static library file, created by cargo
in this way:
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='/opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config' \
CARGO_TARGET_DIR=/private/tmp/librsvg-20211127-15889-8ebs99/librsvg-2.50.7/target \
cargo --locked build --release \
&& cd /private/tmp/librsvg-20211127-15889-8ebs99/librsvg-2.50.7 && /bin/sh ./libtool --silent --tag=CC --mode=link clang -g -O2 -o librsvg_c_api.la _rsvg_dummy.lo && mv /private/tmp/librsvg-20211127-15889-8ebs99/librsvg-2.50.7/target/release/librsvg_c_api.a .libs/librsvg_c_api.a
The librsvg_c_api.a
file that is produced contains many times the same object file (lse.o
), which I think comes from this project, because of:
Line 510 in ec8b848
This, in turn, leads to build failure at the next step, because a static library is supposed to have object files with unique names (libtool enforces that).
I'm not a Rust user myself, just trying to help debug this issue and move forward so we can ship this new version. So I hope my deductions are valid…