[Bug 1769939] Re: Compiling failed with gcc -B option on Ubuntu 18.04 update

Andrew Cloke andrew.cloke at canonical.com
Thu Oct 4 07:05:49 UTC 2018


** Changed in: ubuntu-power-systems
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1769939

Title:
  Compiling failed with gcc -B option on Ubuntu 18.04 update

Status in The Ubuntu-power-systems project:
  Fix Released
Status in gcc-7 package in Ubuntu:
  Fix Released
Status in gcc-7 source package in Bionic:
  Fix Released

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_privutils -Wl,--hugetlbfs-align obj64/linkhuge_rw.o obj64/testutils.o
  /usr/bin/powerpc64le-linux-gnu-ld: unrecognized option '--hugetlbfs-align'
  /usr/bin/powerpc64le-linux-gnu-ld: use the --help option for usage information
  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://github.com/libhugetlbfs/libhugetlbfs.git
  2. apt install libpthread-stubs0-dev
  3. Apply the patches specific to power.
  patch -p1 < ppc.patch
  ppc.patch : https://bugzilla.linux.ibm.com/attachment.cgi?id=121185

  4. Run make and make check.
  make BUILDTYPE=NATIVEONLY
  (and/or)
  4.cd tests; 
  gcc -m64 -B ./obj64  -L../obj64 -o obj64/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils -Wl,--hugetlbfs-align obj64/linkhuge_rw.o obj64/testutils.o
  /usr/bin/powerpc64le-linux-gnu-ld: unrecognized option '--hugetlbfs-align'
  /usr/bin/powerpc64le-linux-gnu-ld: use the --help option for usage information
  collect2: error: ld returned 1 exit status

  ---Expected---
  Compilation to succeed.

  == Comment: #1 - William J. Schmidt <wschmidt at us.ibm.com> - 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 <segher.boessenkool at nl.ibm.com> - 2018-05-07 11:23:27 ==
  This is fixed here:

  https://anonscm.debian.org/viewvc/gcccvs?view=revision&revision=10188

  so should be available pretty soon.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1769939/+subscriptions



More information about the foundations-bugs mailing list