clang doesn't know about multiarch

Bug #764870 reported by Krzysztof Klimonda
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
LLVM
Fix Released
Medium
clang (Ubuntu)
Fix Released
High
Sylvestre Ledru

Bug Description

Binary package hint: clang

clang hasn't been updated to deal with multiarch and fails to include headers that has been moved to $arch-linux-gnu subfolder.

For example:
kklimonda@blue:/tmp$ clang -o /dev/null curl.c
In file included from curl.c:1:
In file included from /usr/include/curl/curl.h:34:
In file included from /usr/include/curl/curlbuild.h:152:
In file included from /usr/include/sys/socket.h:40:
/usr/include/bits/socket.h:381:10: fatal error: 'asm/socket.h' file not found
#include <asm/socket.h>
         ^
1 error generated.
kklimonda@blue:/tmp$ cat curl.c
#include <curl/curl.h>

int main() {}

Revision history for this message
In , Thebeing+llvm (thebeing+llvm) wrote :

On my Debian 64bit system, some architecture depenent headers live in /usr/include/x86_64-linux-gnu/. While gcc picks those up by default (no "-I"-flag needed), clang doesn't and it would be super nice if it did…

Cheers

Niels

Revision history for this message
In , Chandler Carruth (chandlerc) wrote :

Nick, weren't you looking at the Debian include directories when setting up build bots? Did you commit all of the fixes?

Revision history for this message
In , B-nicholas (b-nicholas) wrote :

I did commit my fixes, this is a different issue. We need to add these paths too.

Changed in clang (Ubuntu):
importance: Undecided → High
Revision history for this message
In , Adrien Chauve (achauve) wrote :

Same problem on ubuntu 11.04 64 bits.

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: New → Fix Released
Changed in llvm:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in clang (Ubuntu):
assignee: nobody → Sylvestre Ledru (sylvestre)
Revision history for this message
In , Chandler Carruth (chandlerc) wrote :

I believe this is fixed in mainline based in part on a ground-up rewrite of how include paths are managed. I think it had been hacked to work in some cases for some time before that.

Please file new bugs if there are specific systems you are having issues with. If possible, include the output from clang from a failed compile with the extra '-v' options specified.

Changed in llvm:
status: Confirmed → 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.