x86_64-linux-gnu-g++ -m32 fails to find <bits/c++config.h>

Bug #1082344 reported by Colin Watson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gcc-4.7 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

gmp/amd64 currently fails to build in raring, with g++-4.7-multilib 4.7.2-10ubuntu1:

  https://launchpadlibrarian.net/123744259/buildlog_ubuntu-raring-amd64.gmp_2%3A5.0.5%2Bdfsg-2ubuntu2_FAILEDTOBUILD.txt.gz

Here's a reduced version of what it's doing:

$ cat t.cpp
/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a
    pre-standard iostream.h. */
#include <iostream>

/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream
   mode, since that mode puts cout in the global namespace, not "std". */
void someoutput (void) { std::cout << 123; }

int main (void) { return 0; }
$ x86_64-linux-gnu-g++ -m32 t.cpp
In file included from t.cpp:3:0:
/usr/include/c++/4.7/iostream:39:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
$ find /usr -name c++config.h
/usr/include/x86_64-linux-gnu/c++/4.7/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/4.7/x32/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/4.7/32/bits/c++config.h
$ strace -f x86_64-linux-gnu-g++ -m32 t.cpp 2>&1 | fgrep c++config
[pid 29880] open("/usr/include/c++/4.7/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29880] open("/usr/include/c++/4.7/backward/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29880] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29880] open("/usr/local/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29880] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29880] open("/usr/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
/usr/include/c++/4.7/iostream:39:28: fatal error: bits/c++config.h: No such file or directory) = 126
[pid 29881] open("/usr/include/c++/4.7/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29881] open("/usr/include/c++/4.7/backward/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29881] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29881] open("/usr/local/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29881] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29881] open("/usr/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/include/c++/4.7/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/include/c++/4.7/backward/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/local/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29882] open("/usr/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/include/c++/4.7/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/include/c++/4.7/backward/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/local/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 29883] open("/usr/include/bits/c++config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)

Looks like the compiler's notion of the include path for -m32 is wrong?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.7 - 4.7.2-11ubuntu1

---------------
gcc-4.7 (4.7.2-11ubuntu1) raring; urgency=low

  * Merge with Debian; remaining changes:
    - Build from upstream source.

gcc-4.7 (4.7.2-11) experimental; urgency=low

  * Update to SVN 20121124 (r193776) from the gcc-4_7-branch.
    - Fix PR libgomp/55411, PR libstdc++/55413, PR middle-end/55142,
      PR fortran/55352.

  * Update build-indep dependencies for building the libstdc++ docs.
  * Drop the gcc-no-add-needed patch, depend on binutils 2.22 instead.
  * Pass --hash-style=gnu instead of --hash-style=both.
  * Link using --hash-style=gnu on arm64 by default.
  * Split multiarch patches into local and upstreamed parts.
  * Fix PR54974: Thumb literal pools don't handle PC rounding (Matthew
    Gretton-Dann). LP: #1049614, #1065509.
  * Rename the gccgo info to gccgo-4.7 on installation, install into gccgo-4.7.
  * Include libquadmath documentation in the gcc-4.7-doc package.
  * Don't pretend to understand .d files, no D frontend available for 4.7.
  * Fix the multiarch c++ include path for multilib'd targets. LP: #1082344.
  * Make explicit --{en,dis}able-multiarch options effecitive (Thorsten Glaser).
 -- Matthias Klose <email address hidden> Sat, 24 Nov 2012 06:09:46 +0100

Changed in gcc-4.7 (Ubuntu):
status: New → Fix Released
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.