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

Failed to build rpm-ostree on ppc64le: multiple definition of `__fixdfdi' #61063

Open
cuviper opened this issue May 23, 2019 · 1 comment
Open
Labels
A-intrinsics Area: intrinsics C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@cuviper
Copy link
Member

cuviper commented May 23, 2019

ref: https://bugzilla.redhat.com/show_bug.cgi?id=1713090

Trying to build rpm-ostree on Fedora ppc64le now gives:

libtool: link: gcc -shared  -fPIC -DPIC  src/lib/.libs/librpmostree_1_la-rpmostree.o src/lib/.libs/librpmostree_1_la-rpmostree-db.o src/lib/.libs/librpmostree_1_la-rpmostree-package.o  -Wl,--whole-archive ./.libs/librpmostreepriv.a -Wl,--no-whole-archive  -L/builddir/build/BUILD/rpm-ostree-2019.4/libdnf-build/libdnf -ldnf -ljson-glib-1.0 -lostree-1 -lsystemd -lpolkit-gobject-1 -lrpm -lrpmio -lrepo -lsolv -larchive -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcap /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -pthread -O2 -g -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -Wl,-rpath=/usr/lib64/rpm-ostree -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--push-state -Wl,--no-as-needed -Wl,-ldl -Wl,-lm -Wl,--pop-state   -pthread -Wl,-soname -Wl,librpmostree-1.so.1 -o .libs/librpmostree-1.so.1.0.0
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__fixdfdi':
BUILDSTDERR: (.text+0x510): multiple definition of `__fixdfdi'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__fixdfdi+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__fixsfdi':
BUILDSTDERR: (.text+0x5c0): multiple definition of `__fixsfdi'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__fixsfdi+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__fixunsdfsi':
BUILDSTDERR: (.text+0x680): multiple definition of `__fixunsdfsi'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__fixunsdfsi+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__fixunssfsi':
BUILDSTDERR: (.text+0x6e0): multiple definition of `__fixunssfsi'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__fixunssfsi+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__floatdidf':
BUILDSTDERR: (.text+0x800): multiple definition of `__floatdidf'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__floatdidf+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__floatundidf':
BUILDSTDERR: (.text+0x840): multiple definition of `__floatundidf'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__floatundidf+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__floatdisf':
BUILDSTDERR: (.text+0x880): multiple definition of `__floatdisf'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__floatdisf+0x0): first defined here
BUILDSTDERR: /usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/9/libgcc.a(ppc64-fp.o): in function `__floatundisf':
BUILDSTDERR: (.text+0x900): multiple definition of `__floatundisf'; /builddir/build/BUILD/rpm-ostree-2019.4/target/release/librpmostree_rust.a(compiler_builtins-cae9ea46cd4dabd1.compiler_builtins.qr7h34vq-cgu.0.rcgu.o):(.text.__floatundisf+0x0): first defined here
BUILDSTDERR: collect2: error: ld returned 1 exit status

We reproduced this with Fedora 29 (with LLVM 7) as well as Fedora 30 and 31 (LLVM 8). It fails consistently with 1.34.2, but strangely it succeeds with 1.34.1. There were no packaging changes between those, apart from the version update for the CVE fix.

I also reproduced this with official Rust builds, from 1.36.0-nightly (37ff5d388 2019-05-22) all the way back to 1.32.0. However, it builds fine with 1.31.1!
(For releases before 1.35, lacking #58986, I used Fedora's cargo to avoid that SIGILL.)

I find it especially strange that the regression point is inconsistent...

@cuviper cuviper added the O-PowerPC Target: PowerPC processors label May 23, 2019
@cuviper
Copy link
Member Author

cuviper commented May 23, 2019

It fails consistently with 1.34.2, but strangely it succeeds with 1.34.1. There were no packaging changes between those, apart from the version update for the CVE fix.

I missed something -- I actually added --set rust.codegen-units-std=1 in that build too.

In the official builds, this option was added and enabled in commit b8f977a of #55264, which made it to release in 1.32.0. So this appears to be the important factor in the regression.

cc @michaelwoerister @Mark-Simulacrum from that PR.

@cuviper cuviper added A-intrinsics Area: intrinsics C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels May 24, 2019
Centril added a commit to Centril/rust that referenced this issue Apr 7, 2020
…nits, r=alexcrichton

Keep codegen units unmerged when building compiler builtins

Make it possible to control how mono items are partitioned into code generation
units, when compiling the compiler builtins, by retaining the original partitioning.

Helps with rust-lang#48625, rust-lang#61063, rust-lang#67960, rust-lang#70489.

r? @alexcrichton
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 7, 2020
…nits, r=alexcrichton

Keep codegen units unmerged when building compiler builtins

Make it possible to control how mono items are partitioned into code generation
units, when compiling the compiler builtins, by retaining the original partitioning.

Helps with rust-lang#48625, rust-lang#61063, rust-lang#67960, rust-lang#70489.

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intrinsics Area: intrinsics C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant