[cfe-dev] Clang can't compile #include<new>
Nikola Smiljanic
popizdeh at gmail.com
Sat May 31 15:48:09 PDT 2014
Forwarding to mailing list as I don't know much about these weird looking
triples from another planet :)
Have you tried providing the path to standard library using -I?
Do you have cross-compile version of libstdc++ installed?
On Sun, Jun 1, 2014 at 3:16 AM, Danna bib <danna1364 at gmail.com> wrote:
> Sorry for that.
> I am using clang 3.4 on x86-64 linux machine and my gcc version is 4.8.2
> (Ubuntu 4.8.2-19ubuntu1).
> I used the following command:
>
> "LLVM2/build/Release+Asserts/bin/clang *-v *-static -emit-llvm *-target
> armv7a-none-eabi* -S -o spec_namd.o -DSPEC_CPU -DNDEBUG spec_namd.C"
>
> And I get the following output.
>
> ....
> clang version 3.4 (tags/RELEASE_34/final)
> *Target: armv7a-none--eabi*
> Thread model: posix
> Found candidate GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7
> Found candidate GCC installation:
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7.3
> Selected GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7
> "~/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
> clang -cc1 version 3.4 based upon LLVM 3.4 default target
> x86_64-unknown-linux-gnu
> #include "..." search starts here:
> #include <...> search starts here:
> /usr/local/include
> ~/LLVM2/build/Release+Asserts/bin/../lib/clang/3.4/include
> /usr/include
> End of search list.
> In file included from spec_namd.C:12:
> In file included from ./SimParameters.h:12:
> In file included from ./Lattice.h:10:
> In file included from ./NamdTypes.h:12:
> In file included from ./ResizeArray.h:19:
>
> ./ResizeArrayRaw.h:19:10:* fatal error: 'new' file not found*
> #include <new>
> ^
> 1 error generated.
>
> The error raise from "-target armv7a-none-eabi", and when I don't
> determine target, clang works perfectly.
>
> regards,
> Danna
>
>
> On Thu, May 29, 2014 at 6:01 PM, Nikola Smiljanic <popizdeh at gmail.com>
> wrote:
>
>> Could you please give us a bit more information:
>>
>> - What platform are you on?
>> - What standard library are you using?
>> - Where is you library located?
>> - How are you invoking clang?
>>
>> Nikola
>>
>>
>> On Fri, May 30, 2014 at 10:48 AM, Danna bib <danna1364 at gmail.com> wrote:
>>
>>> Dear all,
>>>
>>> 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:
>>> ...
>>> ./ResizeArrayRaw.h:19:10: fatal error: 'new' file not found
>>> #include <new>
>>> ^
>>> ...
>>>
>>> It seems that clang can't find the <new> c++ standard library. Does
>>> anyone know how I can solve this problem?
>>> Any advise would be appreciated.
>>>
>>> regards,
>>> Danna
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140601/cbef457e/attachment.html>
More information about the cfe-dev
mailing list