Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515934 - Mir build fails on ppc64 when LTO is enabled
Summary: Mir build fails on ppc64 when LTO is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2017-11-21 16:20 UTC by Neal Gompa
Modified: 2019-02-02 03:34 UTC (History)
7 users (show)

Fixed In Version: binutils-2.31.1-17.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-02 03:34:45 UTC


Attachments (Terms of Use)
build.log (deleted)
2017-11-21 16:22 UTC, Dan Horák
no flags Details

Description Neal Gompa 2017-11-21 16:20:04 UTC
Description of problem:
When attempting to build Mir 0.28.1 with LTO enabled in the build, it fails to link, failing the build.

Disabling LTO fixes the build.

Version-Release number of selected component (if applicable):
2.29.1-4.fc28

How reproducible:
Always

Steps to Reproduce:
1. Grab a SRPM for mir
2. Run "mock -r fedora-rawhide-ppc64 --with lto </path/to/mir.src.rpm>"

Actual results:
Fails the build because LTO fails

Expected results:
Build succeeds and packages are built

Additional info:

Koji task with the failed build and its logs: https://koji.fedoraproject.org/koji/taskinfo?taskID=23270960

Comment 1 Dan Horák 2017-11-21 16:22:43 UTC
Created attachment 1356850 [details]
build.log

Comment 2 Dan Horák 2017-11-21 16:24:27 UTC
The error looks like 

...
make[2]: Entering directory '/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu'
[ 98%] Linking CXX executable ../../bin/miral-kiosk.bin
cd /builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/examples/miral-kiosk && /usr/bin/cmake -E cmake_link_script CMakeFiles/miral-kiosk.dir/link.txt --verbose=1
/usr/bin/c++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -pthread -g -std=c++14 -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC -Wno-psabi -flto -ffat-lto-objects  -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--as-needed -Wl,--no-undefined -rdynamic CMakeFiles/miral-kiosk.dir/kiosk_main.cpp.o CMakeFiles/miral-kiosk.dir/kiosk_window_manager.cpp.o CMakeFiles/miral-kiosk.dir/sw_splash.cpp.o  -o ../../bin/miral-kiosk.bin ../../lib/libmiral.so.2 ../../lib/libmirclient.so.9 -lxkbcommon ../../lib/libmirprotobuf.so.3 -lprotobuf-lite ../../lib/libmircookie.so.2 -lnettle ../../lib/libmircommon.so.7 ../../src/capnproto/libmircapnproto.a /usr/lib64/libcapnp.so.0.6.1 /usr/lib64/libkj.so.0.6.1 ../../lib/libmircore.so.1 -lboost_date_time -lboost_program_options -lboost_filesystem -ldl -lboost_system -Wl,-rpath-link,/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib 
make[2]: Leaving directory '/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK10.lto_priv.900'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK8.lto_priv.1719'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK0.lto_priv.1954'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK14.lto_priv.1778'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK13.lto_priv.1777'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK6.lto_priv.1598'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK1.lto_priv.1731'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK6.lto_priv.1724'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK10.lto_priv.1774'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK5.lto_priv.1433'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK4.lto_priv.1000'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK0.lto_priv.996'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK4.lto_priv.1535'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK9.lto_priv.1770'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK7.lto_priv.1879'
/builddir/build/BUILD/mir-0.28.1/ppc64-redhat-linux-gnu/lib/libmirserver.so.45: undefined reference to `LTHUNK5.lto_priv.1533'
collect2: error: ld returned 1 exit status

Comment 3 Nick Clifton 2018-01-04 16:33:59 UTC
Hi Dan,

  I just tried to reproduce this using a mir-0.29.0-1 source rpm on
  a ppc64le system with binutils-2.29.1-9.fc28.ppc64 and the problem
  did not appear.

  I suspect that the bug may have been fixed with the 2.29.1-8 release
  of the binutils rpm, which disabled the use of relro by default for
  PPC64.  (Since this had been reported as causing problems for other
  packages).  Therefore please could you try building mir again, with
  LTO enabled, and let me know if the problem has been fixed ?

Cheers
  Nick

Comment 4 Nick Clifton 2018-01-04 16:34:42 UTC
Oops, sorry Neal - I meant to address comment #3 to you...

Comment 5 Neal Gompa 2018-01-05 19:24:19 UTC
Nick,

It works fine with ppc64le. It's ppc64be that's a problem (that is, the big endian variant!).

Could you try again with ppc64*be*?

Comment 6 Nick Clifton 2018-01-08 16:56:03 UTC
(In reply to Neal Gompa from comment #5)

Hi Neal,

> It works fine with ppc64le. It's ppc64be that's a problem (that is, the big
> endian variant!).
> 
> Could you try again with ppc64*be*?

That works too. :-)  I really think that this problem might be fixed.

Cheers
  Nick

Comment 7 Fedora End Of Life 2018-02-20 15:37:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 8 Fedora Update System 2019-01-30 12:46:16 UTC
binutils-2.31.1-17.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ba3cbcfd20

Comment 9 Fedora Update System 2019-01-31 02:30:10 UTC
binutils-2.31.1-17.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ba3cbcfd20

Comment 10 Fedora Update System 2019-02-02 03:34:45 UTC
binutils-2.31.1-17.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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