Compiling failed with gcc -B option on Ubuntu 18.04 update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
High
|
Canonical Foundations Team | ||
gcc-7 (Ubuntu) |
Fix Released
|
High
|
Canonical Foundations Team | ||
Bionic |
Fix Released
|
High
|
Canonical Foundations Team |
Bug Description
--Problem Description--
Compiling failed with -B on Ubuntu 18.04 updated kernel. The gcc -B option does not recognize the custom ld script..
---Issue observed---
# gcc -m64 -B ./obj64 -L../obj64 -o obj64/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_
/usr/bin/
/usr/bin/
collect2: error: ld returned 1 exit status
---Env details---
Hardware: Tuleta
DD revision: 2,1
Operating Env.: Power KVM/BML
Host OS version:
# uname -a
Linux lep8d 4.15.0-20-generic #16-Ubuntu SMP Wed Apr 4 13:57:51 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
----Additional Info-----
Note:
It was working on 18 04 till "4.15.0-15-generic" kernel and does not work on gcc built with ld on any update after 4.15.0-15 kernel.
From doc:
For each subprogram to be run, the compiler driver first tries the
'-B' prefix, if any.
Reproducible : 100%
---Steps to Reproduce---
1. git clone https:/
2. apt install libpthread-
3. Apply the patches specific to power.
patch -p1 < ppc.patch
ppc.patch : https:/
4. Run make and make check.
make BUILDTYPE=
(and/or)
4.cd tests;
gcc -m64 -B ./obj64 -L../obj64 -o obj64/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_
/usr/bin/
/usr/bin/
collect2: error: ld returned 1 exit status
---Expected---
Compilation to succeed.
== Comment: #1 - William J. Schmidt <email address hidden> - 2018-05-07 11:10:59 ==
Ubuntu is aware and has fixed this in their 18.10 code base, with backport to 18.04 coming. I've asked Segher to run down a little more information for you.
== Comment: #3 - Segher Boessenkool <email address hidden> - 2018-05-07 11:23:27 ==
This is fixed here:
https:/
so should be available pretty soon.
tags: | added: architecture-ppc64le bugnameltc-167514 severity-high targetmilestone-inin1804 |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → gcc-defaults (Ubuntu) |
Changed in ubuntu-power-systems: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
tags: | added: triage-g |
Changed in ubuntu-power-systems: | |
status: | Triaged → In Progress |
Changed in ubuntu-power-systems: | |
status: | In Progress → Incomplete |
Changed in gcc-7 (Ubuntu): | |
assignee: | Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Foundations Team (canonical-foundations) |
Changed in gcc-7 (Ubuntu Bionic): | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in gcc-7 (Ubuntu): | |
importance: | Undecided → High |
Changed in gcc-7 (Ubuntu Bionic): | |
importance: | Undecided → High |
tags: | added: id-5b342312b9323847933adb99 |
Changed in ubuntu-power-systems: | |
status: | Incomplete → In Progress |
Changed in gcc-7 (Ubuntu Bionic): | |
milestone: | none → ubuntu-18.04.1 |
Changed in gcc-7 (Ubuntu): | |
milestone: | none → ubuntu-18.04.1 |
Changed in gcc-7 (Ubuntu Bionic): | |
milestone: | ubuntu-18.04.1 → bionic-updates |
Changed in ubuntu-power-systems: | |
status: | In Progress → Fix Released |
fixed in cosmic, fix waiting in the ubuntu- toolchain- r/ppa for bionic