clang can not compile stl using code

Bug #1239665 reported by Steveire
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clang (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

    stephen@hal:~/safe/dev/playground/cpp{master}$ clang++ test.cpp
    In file included from test.cpp:2:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/string:39:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/char_traits.h:39:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/postypes.h:39:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/cwchar:43:
    /usr/include/wchar.h:39:11: fatal error: 'stdarg.h' file not found
    # include <stdarg.h>
              ^
    1 error generated.

    stephen@hal:~/safe/dev/playground/cpp{master}$ locate stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.4.3/include/tr1/stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include/tr1/stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.7/include/tr1/stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include/tr1/stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/stlport/stlport/stdarg.h
    /home/stephen/android/android-ndk-r9/sources/cxx-stl/stlport/stlport/stl/_cstdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.6/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/llvm-3.2/prebuilt/linux-x86_64/lib/clang/3.2/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/llvm-3.3/prebuilt/linux-x86_64/lib/clang/3.3/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/mipsel-linux-android-4.6/prebuilt/linux-x86_64/lib/gcc/mipsel-linux-android/4.6/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/mipsel-linux-android-4.8/prebuilt/linux-x86_64/lib/gcc/mipsel-linux-android/4.8/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/x86-4.6/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.6/include/cross-stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/x86-4.6/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.6/include/stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.8/include/cross-stdarg.h
    /home/stephen/android/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.8/include/stdarg.h
    /home/stephen/android/android-sdk-linux/build-tools/17.0.0/renderscript/clang-include/stdarg.h
    /home/stephen/android/android-sdk-linux/build-tools/18.1.0/renderscript/clang-include/stdarg.h
    /home/stephen/bbndk/host_10_1_0_132/linux/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.6.3/include/stdarg.h
    /home/stephen/bbndk/host_10_1_0_132/linux/x86/usr/lib/gcc/i486-pc-nto-qnx8.0.0/4.6.3/include/cross-stdarg.h
    /home/stephen/bbndk/host_10_1_0_132/linux/x86/usr/lib/gcc/i486-pc-nto-qnx8.0.0/4.6.3/include/stdarg.h
    /home/stephen/bbndk/target_10_1_0_1020/qnx6/usr/include/stdarg.h
    /home/stephen/bbndk/target_10_1_0_1020/qnx6/usr/include/c++/4.6.3/tr1/stdarg.h
    /home/stephen/dev/build/qtbase/llvm/lib/clang/3.4/include/stdarg.h
    /home/stephen/dev/build/qtbase/llvm-32/lib/clang/3.2/include/stdarg.h
    /home/stephen/dev/prefix/qtbase/kde/lib/clang/3.4/include/stdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/gcc/ginclude/stdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/gcc/ginclude/.svn/text-base/stdarg.h.svn-base
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c/std_cstdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c/.svn/text-base/std_cstdarg.h.svn-base
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c_compatibility/stdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c_compatibility/.svn/text-base/stdarg.h.svn-base
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c_std/std_cstdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/libstdc++-v3/include/c_std/.svn/text-base/std_cstdarg.h.svn-base
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/more-hdrs/stdarg.h
    /home/stephen/dev/src/iphone-dev/llvm-gcc-4.0-iphone/more-hdrs/.svn/text-base/stdarg.h.svn-base
    /home/stephen/dev/src/kdevelop/languages/cpp/parser/include/stdarg.h
    /home/stephen/dev/src/lev/toolchain/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/include/c++/4.6.2/tr1/stdarg.h
    /home/stephen/dev/src/lev/toolchain/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/lib/gcc/arm-fsl-linux-gnueabi/4.6.2/include/stdarg.h
    /home/stephen/dev/src/lev/toolchain/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/native/usr/lib/gcc/arm-fsl-linux-gnueabi/4.6.2/include/stdarg.h
    /home/stephen/dev/src/llvm/tools/clang/lib/Headers/stdarg.h
    /home/stephen/dev/src/llvm-32/tools/clang/lib/Headers/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/include/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/include/cross-stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/mips-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /home/stephen/qnx650/host/linux/x86/usr/lib/gcc/sh-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /home/stephen/qnx650/target/qnx6/usr/include/stdarg.h
    /home/stephen/qnx650/target/qnx6/usr/include/c++/4.4.2/tr1/stdarg.h
    /home/stephen/rpi/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2/tr1/stdarg.h
    /home/stephen/rpi/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/include/cross-stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/mips-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /opt/qnx650_/host/linux/x86/usr/lib/gcc/sh-unknown-nto-qnx6.5.0/4.4.2/include/stdarg.h
    /opt/qnx650_/target/qnx6/usr/include/stdarg.h
    /opt/qnx650_/target/qnx6/usr/include/c++/4.4.2/tr1/stdarg.h
    /usr/aarch64-linux-gnu/include/c++/4.7.3/tr1/stdarg.h
    /usr/arm-linux-gnueabi/include/c++/4.7.3/tr1/stdarg.h
    /usr/arm-linux-gnueabihf/include/c++/4.7.3/tr1/stdarg.h
    /usr/arm-linux-gnueabihf/include/c++/4.8.1/tr1/stdarg.h
    /usr/i686-w64-mingw32/include/_mingw_stdarg.h
    /usr/i686-w64-mingw32/include/stdarg.h
    /usr/include/c++/4.6/tr1/stdarg.h
    /usr/include/c++/4.7/tr1/stdarg.h
    /usr/include/c++/4.8/tr1/stdarg.h
    /usr/lib/gcc/avr/4.7.2/include/stdarg.h
    /usr/lib/gcc/i686-w64-mingw32/4.6/include/cross-stdarg.h
    /usr/lib/gcc/i686-w64-mingw32/4.6/include/stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.6/include/cross-stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.7/include/cross-stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.8/include/cross-stdarg.h
    /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h
    /usr/lib/gcc/x86_64-w64-mingw32/4.6/include/cross-stdarg.h
    /usr/lib/gcc/x86_64-w64-mingw32/4.6/include/stdarg.h
    /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/include/stdarg.h
    /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/include/stdarg.h
    /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/include/stdarg.h
    /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include/stdarg.h
    /usr/lib/gcc-cross/powerpc-linux-gnu/4.7/include/stdarg.h
    /usr/lib/llvm-3.2/lib/clang/3.2/include/stdarg.h
    /usr/lib/syslinux/com32/include/stdarg.h
    /usr/powerpc-linux-gnu/include/c++/4.7.3/tr1/stdarg.h
    /usr/x86_64-w64-mingw32/include/_mingw_stdarg.h
    /usr/x86_64-w64-mingw32/include/stdarg.h

    stephen@hal:~/safe/dev/playground/cpp{master}$ cat test.cpp

    #include <string>

Revision history for this message
Steveire (steveire) wrote :

This worked with 13.04.

Revision history for this message
Steveire (steveire) wrote :
Changed in clang (Ubuntu):
status: New → Invalid
Revision history for this message
Kevin Funk (kfunk) wrote :

Marked as duplicate of bug #1242300, the other bug entry has some more extra information.

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.