<div dir="ltr"><div><div>Thank you Nokola, my problem solved. I just add the following path to standard library to the clang!<br>-I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/ and -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/<br>
<br></div>regards,<br></div>Danna<br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 31, 2014 at 3:48 PM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forwarding to mailing list as I don't know much about these weird looking triples from another planet :)<div>
<br></div><div>Have you tried providing the path to standard library using -I?</div><div>Do you have cross-compile version of libstdc++ installed?</div><div><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 1, 2014 at 3:16 AM, Danna bib <span dir="ltr"><<a href="mailto:danna1364@gmail.com" target="_blank">danna1364@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Sorry for that.<br></div>I am using clang 3.4 on x86-64 linux machine and my gcc version is 4.8.2 (Ubuntu 4.8.2-19ubuntu1). <br>I used the following command:<br><br>"LLVM2/build/Release+Asserts/bin/clang <b>-v </b>-static -emit-llvm <b>-target armv7a-none-eabi</b> -S -o spec_namd.o -DSPEC_CPU -DNDEBUG spec_namd.C"<br>
<br></div><div>And I get the following output.<br></div><div><br>....<br>clang version 3.4 (tags/RELEASE_34/final)<br><b>Target: armv7a-none--eabi</b><br>Thread model: posix<br>Found candidate GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7<br>
Found candidate GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7.3<br>Selected GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7<br> "~/LLVM2/build/Release+Asserts/bin/clang" -cc1 -triple armv7-none--eabi -emit-llvm -disable-free -main-file-name spec_namd.C -static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-cpu cortex-a8 -target-feature +soft-float-abi -target-abi aapcs -mfloat-abi soft -target-linker-version 2.24 -v -coverage-file /home/moslem/Desktop/Spec/444.namd/src/spec_namd.o -resource-dir ~/LLVM2/build/Release+Asserts/bin/../lib/clang/3.4 -D SPEC_CPU -D NDEBUG -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir ~/Desktop/Spec/444.namd/src -ferror-limit 19 -fmessage-length 205 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o spec_namd.o -x c++ spec_namd.C<br>
clang -cc1 version 3.4 based upon LLVM 3.4 default target x86_64-unknown-linux-gnu<br>#include "..." search starts here:<br>#include <...> search starts here:<br> /usr/local/include<br> ~/LLVM2/build/Release+Asserts/bin/../lib/clang/3.4/include<br>
/usr/include<br>End of search list.<br>In file included from spec_namd.C:12:<br>In file included from ./SimParameters.h:12:<br>In file included from ./Lattice.h:10:<br>In file included from ./NamdTypes.h:12:<br>In file included from ./ResizeArray.h:19:<div>
<br>
./ResizeArrayRaw.h:19:10:<b> fatal error: 'new' file not found</b><br>#include <new><br> ^<br></div>1 error generated.</div><div><br></div><div>The error raise from "-target armv7a-none-eabi", and when I don't determine target, clang works perfectly.<br>
</div><div><br></div>regards,<br></div>Danna<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 29, 2014 at 6:01 PM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Could you please give us a bit more information:<div><br></div><div>- What platform are you on?</div><div>
- What standard library are you using?</div><div>- Where is you library located?</div><div>- How are you invoking clang?</div>
<div><br></div><div>Nikola</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Fri, May 30, 2014 at 10:48 AM, Danna bib <span dir="ltr"><<a href="mailto:danna1364@gmail.com" target="_blank">danna1364@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div><div>Dear all,<br></div><br></div>I have compiled several programs of SPEC2006 by clang, but I couldn’t compile program 444.namd, and I got the the following fatal error:<br>
...<br>./ResizeArrayRaw.h:19:10: fatal error: 'new' file not found<br>
#include <new><br> ^<br>...<br><br></div>It seems that clang can't find the <new> c++ standard library. Does anyone know how I can solve this problem?<br></div>Any advise would be appreciated.<br>
<br>
</div>regards,<br></div>Danna<br><div><div><div><br><br><br></div></div></div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>