clang++ fails to compile STL-using C++ code out of the box

Bug #779404 reported by Alex B
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
clang (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: clang

clang++ uses GCC's STL, but appears to only support versions up to 4.4: if you try to compile a trivial program on Natty Narwhal, it will fail:

cat<<EOF > foo.cc
#include <iostream>
int main() {return 0;}
EOF
clang++ --verbose foo.cc

Note in the output how it starts looking for GCC includes starting with version 4.4, then 4.3, etc...

However Natty Narwhal only has 4.5 installed, and clang package (incorrectly) lists libstdc++ dependency as >=4.5. Installing g++-4.4 fixes the problem, but dependency should be fixed up.

Related branches

Alex B (a13xb)
description: updated
Alex B (a13xb)
summary: - clang++ fails to compile STL-using C++ out of the box
+ clang++ fails to compile STL-using C++ code out of the box
David Coles (dcoles)
Changed in clang (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clang - 2.9-1

---------------
clang (2.9-1) unstable; urgency=low

  * debian/packages.d/tools.mk: clang C++ headers detection was broken. Set them
    by default. Thanks to Michael Wild for doing my work
  * debian/control: libstdc++6-4.5-dev added as dependency of clang
    (LP: #779404)
  * debian/patches/searchGCCPath.patch: Added a path to the search of the C++
    header (Closes: #594820) (LP: #764870)
  * debian/control.in/llvm-gcc-4.2, debian/control.in/llvm-snapshot,
    debian/packages.d/llvm-gcc-4.2.mk, debian/packages.d/llvm-snapshot.mk:
    removed
  * Upload in unstable
 -- Ubuntu Archive Auto-Sync <email address hidden> Fri, 27 May 2011 07:44:05 +0000

Changed in clang (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Matthias Blaicher (blaicher) wrote :

I still have this problem under up to date Natty, the most recent package version there is 2.8-0ubuntu2. Could this be backported to natty? Or at least the dependency for gcc-4.4 be added?

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.