[Bug 1824721] Re: g++-8 in disco is broken with libstdc++6 from gcc9 and libstdc++fs

Launchpad Bug Tracker 1824721 at bugs.launchpad.net
Wed May 1 19:17:15 UTC 2019


This bug was fixed in the package gcc-8 - 8.3.0-7ubuntu1

---------------
gcc-8 (8.3.0-7ubuntu1) eoan; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.
    - Don't built common libraries now build from GCC 9.

gcc-8 (8.3.0-7) unstable; urgency=medium

  * Update to SVN 20190428 (r270630) from the gcc-8-branch.
    - Fix PR target/89877 (ARC), PR target/84369 (PPC),
      PR tree-optimization/85762, PR tree-optimization/87008,
      PR tree-optimization/85459, PR target/87532 (PPC),
      PR target/87532 (PPC), PR ipa/89693, PR middle-end/88587,
      PR tree-optimization/90018, PR target/90024 (ARM),
      PR target/89945 (ARM), PR fortran/87352, PR fortran/89981,
      PR fortran/89904, PR libgfortran/79540, PR fortran/87127,
      PR rtl-optimization/87979, PR rtl-optimization/84032.
  * Fix PR c++/90050, always link with libstdc++fs.a. LP: #1824721.
  * Fix PR bootstrap/87338 on ia64 (James Clarke). Closes: #927976.

 -- Matthias Klose <doko at ubuntu.com>  Sun, 28 Apr 2019 09:51:11 +0200

** Changed in: gcc-8 (Ubuntu)
       Status: Triaged => Fix Released

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

Title:
  g++-8 in disco is broken with libstdc++6 from gcc9 and libstdc++fs

Status in gcc:
  Invalid
Status in gcc-8 package in Ubuntu:
  Fix Released

Bug description:
  There is a significant incompatibility here which leaves the default
  C++ compiler broken with C++17 std::filesystem usage.  Unfortunately,
  there isn't an obvious workaround since there's only one libstdc++6
  package, and it's using the non-default and unreleased GCC9 version of
  libstdc++, making it impossible to use the compatible GCC8 version of
  the library.

  % cat testpath.cpp
  #include <filesystem>

  int main()
  {
    std::filesystem::path p("test");
  }

  g++-9 -std=c++17 -lstdc++fs -g3 -o testpath testpath.cpp 
  % ./testpath

  % g++-8 -std=c++17 -lstdc++fs -g3 -o testpath testpath.cpp
  % ./testpath                                              
  zsh: segmentation fault (core dumped)  ./testpath

  % gdb testpath
  GNU gdb (Ubuntu 8.2.91.20190405-0ubuntu3) 8.2.91.20190405-git
  Copyright (C) 2019 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  Type "show copying" and "show warranty" for details.
  This GDB was configured as "x86_64-linux-gnu".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
      <http://www.gnu.org/software/gdb/documentation/>.

  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from testpath...
  (gdb) run
  Starting program: /tmp/testpath 

  Program received signal SIGSEGV, Segmentation fault.
  0x000055555555649b in std::vector<std::filesystem::__cxx11::path::_Cmpt, std::allocator<std::filesystem::__cxx11::path::_Cmpt> >::~vector (this=0x23, __in_chrg=<optimised out>) at /usr/include/c++/8/bits/stl_vector.h:567
  567             std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
  (gdb) bt
  #0  0x000055555555649b in std::vector<std::filesystem::__cxx11::path::_Cmpt, std::allocator<std::filesystem::__cxx11::path::_Cmpt> >::~vector (this=0x23, __in_chrg=<optimised out>) at /usr/include/c++/8/bits/stl_vector.h:567
  #1  0x0000555555556314 in std::filesystem::__cxx11::path::~path (this=0x3, __in_chrg=<optimised out>)
      at /usr/include/c++/8/bits/fs_path.h:208
  #2  0x0000555555556f5c in std::filesystem::__cxx11::path::_Cmpt::~_Cmpt (this=0x3, __in_chrg=<optimised out>)
      at /usr/include/c++/8/bits/fs_path.h:643
  #3  0x0000555555556f77 in std::_Destroy<std::filesystem::__cxx11::path::_Cmpt> (__pointer=0x3)
      at /usr/include/c++/8/bits/stl_construct.h:98
  #4  0x0000555555556e27 in std::_Destroy_aux<false>::__destroy<std::filesystem::__cxx11::path::_Cmpt*> (
      __first=0x3, __last=0x0) at /usr/include/c++/8/bits/stl_construct.h:108
  #5  0x0000555555556a98 in std::_Destroy<std::filesystem::__cxx11::path::_Cmpt*> (__first=0x3, __last=0x0)
      at /usr/include/c++/8/bits/stl_construct.h:137
  #6  0x00005555555567a9 in std::_Destroy<std::filesystem::__cxx11::path::_Cmpt*, std::filesystem::__cxx11::path::_Cmpt> (__first=0x3, __last=0x0) at /usr/include/c++/8/bits/stl_construct.h:206
  #7  0x00005555555564b1 in std::vector<std::filesystem::__cxx11::path::_Cmpt, std::allocator<std::filesystem::__cxx11::path::_Cmpt> >::~vector (this=0x7fffffffe310, __in_chrg=<optimised out>)
      at /usr/include/c++/8/bits/stl_vector.h:567
  #8  0x0000555555556314 in std::filesystem::__cxx11::path::~path (this=0x7fffffffe2f0, __in_chrg=<optimised out>)
      at /usr/include/c++/8/bits/fs_path.h:208
  #9  0x0000555555556230 in main () at testpath.cpp:5
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 2414] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1824721/+subscriptions



More information about the foundations-bugs mailing list