libstdc++-5-dev:amd64 5.5.0-1ubuntu1 configured without _GLIBCXX_USE_C99

Bug #1725848 reported by Andrew Paxie
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gcc-5 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Test program compiled on Artful Aardvark Ubuntu 17.10.

$ which g++-5
/usr/bin/g++-5

$ /usr/bin/g++-5 --version
g++-5 (Ubuntu 5.5.0-1ubuntu1) 5.4.1 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/bin/g++-5 -std=c++11 -x c++ - <<EOF
#include <iostream>
#include <string>
int main()
{
  std::cout << std::to_string(0) << '\n';
  return 0;
}
EOF

Expected result

compile without errors, output 0

Actual result

<stdin>: In function ‘int main()’:
<stdin>:5:16: error: ‘to_string’ is not a member of ‘std’

Supposed cause

_GLIBCXX_USE_C99 is not set in
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h
in package libstdc++-5-dev:amd64 5.5.0-1ubuntu1

Further information

Test program compiles and runs on Zesty Zapus with package
libstdc++-5-dev:amd64 (5.4.1-8ubuntu1).

Tags: artful
tags: added: artful
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

huh, one should not use libstdc++5 at all ever. One should only use libstdc++6. libstdc++5 is pre-historic ABI from the 90s no?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Or i am confused.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think i am confused.

Revision history for this message
Matthias Klose (doko) wrote :

won't fix for GCC 5, fixed in 6 and 7

Changed in gcc-5 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Andrew Paxie (andrewpaxie) wrote :

Will this situation remain the same on the next LTS, 18.04?

I now have to invent a migration strategy for a user of g++-5/libstdc++-v3 on Xenial,
which has no g++-6 or g++-7. I guess it has to be via Zesty, skipping Artful.

Revision history for this message
Andrew Paxie (andrewpaxie) wrote :

Ok, gcc-5 is in the universe repository for artful, meaning "community supported,"
not officially supported by Canonical.

Revision history for this message
Matthias Klose (doko) wrote :

yes, in general, you should use the default GCC version. Older versions might just be removed.

Revision history for this message
Richard Huber (richaustin) wrote :

This is a big problem for the community because NVCC from NVidia for Cuda 8 only works with Gcc-5. Probably why there is so much traffic on this issue right now. Nothing works with Cuda on GCC-5 with 17.10, which affects a ton of users.

Revision history for this message
hami (zr-zz-alp) wrote :

This is a big problem. I am using https://github.com/NetSys/bess. BESS relies on gRPC. gRPC fails to compile under gcc 5 due to the to_string not declared error. gRPC does compile under gcc 6 or 7 but it breaks BESS.

Revision history for this message
David Welch (davidwelch158) wrote :

This bug is related to https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1725869 (and https://sourceware.org/bugzilla/show_bug.cgi?id=22296). If gcc-5 is rebuilt with a version of glibc with that bug fixed then this one is fixed too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.