X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:from:to:subject:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=mqY wUsx1Ja1tF7hclkqiBiV3OoVb7HCfL33xmeipC2FNtP5xcGzZ3HK86KpmFjBcz20 ROAgcTbjXxumOJp92vwSp+EZpSqcw4RjIW1kWYYkw8S7yWmxPyIjzJmNS5N63CmS TnezSDSIrgMmCcuMMRspwv8RnI1bRusO6U0pJ1u4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:from:to:subject:date:mime-version :content-type:content-transfer-encoding; s=default; bh=P7Ptkdqoe 1FycoYphlWRZXQoUoQ=; b=i19Z6mOndlq1+5eaYvdfSz4EN0gGNLZWMXi1Ihcdu RxxgC8OPeoAHkljzKsla5Uj7XcUsAvVLTbsKNoKthz4BQ+P2x5FoEjvKOv4c7RdX bdoqAMLA8XeNZxqKEy43gE3/vyqwND/KuafEKwFacvQKoeos23wAEQeOGNv5Rlwr C8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pb0-f49.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:subject:date:mime-version :content-type:content-transfer-encoding:importance; bh=DWoVviEtaned4/SRMDvhc2YMC3MAGmgpRzDag2voix4=; b=ZUy47mSEDwUGH6EpIXiBSaOjAp/9SJ17XLyYgMSLFqPmb/QTChv2zEJn+C06cXiv7p M0I7Nw0VProZ/7tgB8qlxultdh+FU5RG/g5Gpyotefg9lu9YGebzfSJQtW9szziFnSW1 zSj1FNdGzBCXmLE5u+X/ZChvNvWCjGCtZDMjICLZOCMunaMhHCQjFJzjr6GCP/s2xIVX 0X7izuRfsPj0MBjjRQZ8TxTNLsRg58CpRPLutNdyYSUnj+1l2bHwA5AKuqb4+JuA89r5 6nqhqUIN/o+paDV5kZ8OKuuUtmtEG2wv/pfu//cu1Wh22tV5rqEattzdulkacRHfRvno xi4Q== X-Gm-Message-State: ALoCoQmZur7cUXNoV9iCs7Pix4KYiHVhnxtmm5C0HeY1rNkMSSKf/ey/V+OBFASujddAUdBCZ6/o X-Received: by 10.68.189.100 with SMTP id gh4mr12938972pbc.21.1391909391492; Sat, 08 Feb 2014 17:29:51 -0800 (PST) Message-ID: <9DC5EA84F12B448CAA4CCA5D593E2C40@TKsamsung> From: "Tony Kelman" To: Subject: clang++ cannot locate string header, or bits/c++config.h Date: Sat, 8 Feb 2014 17:29:48 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit I’ve uploaded cygcheck.out at https://gist.github.com/tkelman/8892631 This only applies to x86 Cygwin, as the clang package is not (yet?) available in 64-bit Cygwin. Simple testcase: echo "#include " > hello.cpp echo "int main () {};" >> hello.cpp clang++ -v hello.cpp This outputs: clang version 3.1 (branches/release_31) Target: i386-pc-cygwin Thread model: posix "/usr/bin/clang" -cc1 -triple i386-pc-cygwin -S -disable-free -disable-llvm-verifier -main-file-name hello.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.52.20120326 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /cygdrive/d/cygwin64/home/Tony/8875125 -ferror-limit 19 -fmessage-length 100 -mstackrealign -fno-use-cxa-atexit -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/hello-108VBJ.s -x c++ hello.cpp clang -cc1 version 3.1 based upon LLVM 3.1 default target i386-pc-cygwin ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++" ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/i686-pc-cygwin" ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/backward" ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/4.5.3/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/bin/../lib/clang/3.1/include /usr/include /usr/include/w32api End of search list. hello.cpp:1:10: fatal error: 'string' file not found #include ^ 1 error generated. Looks like clang was built with hardcoded GCC 4.5.3 header paths. I'm at GCC 4.7.3 now. A successful workaround is to add GCC 4.7.3 header paths to the compiler call: clang++ -I/usr/lib/gcc/i686-pc-cygwin/4.7.3/include/c++ \ -I/usr/lib/gcc/i686-pc-cygwin/4.7.3/include/c++/i686-pc-cygwin hello.cpp Or by adding a symbolic link from /usr/lib/gcc/i686-pc-cygwin/4.5.3 to /usr/lib/gcc/i686-pc-cygwin/4.7.3. I hope this inconvenience can be fixed with a future update to the clang package. Thanks, Tony -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple