Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1713140 - Failed to build on ppc64le: multiple definition of `__fixdfdi'
Summary: Failed to build on ppc64le: multiple definition of `__fixdfdi'
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rust-toolset
Version: 8.1
Hardware: ppc64le
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Josh Stone
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 1713090
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-23 00:36 UTC by Josh Stone
Modified: 2019-05-24 17:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1713090
Environment:
Last Closed: 2019-05-24 17:03:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
build.log (299.59 KB, text/plain)
2019-05-23 00:39 UTC, Josh Stone
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github rust-lang rust issues 61063 0 None open Failed to build rpm-ostree on ppc64le: multiple definition of `__fixdfdi' 2020-07-29 22:30:17 UTC

Description Josh Stone 2019-05-23 00:36:30 UTC
+++ This bug was initially created as a clone of Bug #1713090 +++

Description of problem:

Trying to build Rust code on ppc64le in Koji 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
```

Ref: https://kojipkgs.fedoraproject.org//work/tasks/4168/34984168/build.log
(Also added as attachment in case the above gets pruned).

Version-Release number of selected component (if applicable):

gcc-9.1.1-1.fc30.ppc64le
rust-1.34.2-1.fc30.ppc64le

How reproducible:

Always

Steps to Reproduce:
1. Try to build rpm-ostree in Koji on ppc64le

Actual results:

Build failure

Expected results:

No failure

Additional info:

Filed this against rust, though it might be a gcc issue.

I don't *think* this is an issue in rpm-ostree and is instead likely a regression in the buildroot itself. I actually hit this around two/three weeks ago too, but only on rawhide and not on f30. Unfortunately, it seems like the rawhide build logs have already been pruned, but the f30 one (which succeeded) had:

gcc-9.0.1-0.10.fc30.ppc64le
rust-1.34.0-1.fc30.ppc64le

Ref: https://kojipkgs.fedoraproject.org//packages/rpm-ostree/2019.3.5.g0da9f997/2.fc30/data/logs/ppc64le/root.log

So the most obvious difference here is the gcc-9.0 -> gcc-9.1 bump.

--- Additional comment from Josh Stone on 2019-05-22 17:03:55 PDT ---

A few data points...

I can reproduce this on f29, which has older gcc and llvm, so that probably rules those out.

rust-1.34.2-1.fc29.ppc64le
llvm-libs-7.0.1-4.fc29.ppc64le
gcc-8.3.1-2.fc29.ppc64le
binutils-2.31.1-24.fc29.ppc64le

I have a beta build of 1.35 (release tomorrow!) and that also fails:
https://koji.fedoraproject.org/koji/taskinfo?taskID=34876444
rust-1.35.0-0.1.beta.7.fc29.ppc64le

However, any of these work:
rust-1.34.1-1.fc29.ppc64le
rust-1.34.0-1.fc29.ppc64le
rust-1.33.0-1.fc29.ppc64le

1.34.1 vs 1.34.2 is really strange, because the *only* difference is the destabilization of Error::type_id. This should make *zero* difference to codegen.

I can also reproduce this with upstream rustc, from the current nightly back to 1.32.0 -- but then it works with upstream 1.31.1!

Note, upstream ppc64 cargo is broken before 1.35, so I replaced that with our /usr/bin/cargo in each case.
(ref: https://github.com/rust-lang/rust/pull/58986)

Anyway, it's really baffling that the apparent regression point is different between fedora and upstream.

Comment 1 Josh Stone 2019-05-23 00:39:07 UTC
Created attachment 1572207 [details]
build.log

Comment 3 Josh Stone 2019-05-24 17:03:02 UTC
I identified a packaging workaround in Fedora bug 1713090.

Since the problematic packages haven't been released, I'll just include the fix in the pending rebase for RHEL8.


Note You need to log in before you can comment on or make changes to this bug.