Seung-yeon Choe
2011-Nov-23 13:21 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Dear all. I built the LLVM 3.0 rc4 with Clang front-end in windows os env. (also with -DLLVM_TARGETS_TO_BUILD=all option) For arm neon intrinsics testing, I tried to compile some codes, which are included a few neon intrinsics. Although I got a well done bitcode on ubuntu build pc, it shows some errors when compile the codes on windows. Could you let me know why occurred errors? is this just a bug at windows system? the used command is clang helloneon.c -o helloneon.bc -c -emit-llvm -ccc-host-triplearmv7-none-gnueabi -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -I"C:\Program Files\CodeSourcery\Sourcery_CodeBench_for_ARM_EABI\arm-none-eabi\include" -ferror-limit=1000 and the followings are error codes. Thanks and regards, Seung-yeon. In file included from helloneon.c:4: d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:41:24: error: invalid vector element type 'int32_t' (aka 'long') typedef __attribute__((neon_vector_type(2))) int32_t int32x2_t; ^ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:42:24: error: invalid vector element type 'int32_t' (aka 'long') typedef __attribute__((neon_vector_type(4))) int32_t int32x4_t; ^ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:49:24: error: invalid vector element type 'uint32_t' (aka 'unsigned long') typedef __attribute__((neon_vector_type(2))) uint32_t uint32x2_t; ^ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:50:24: error: invalid vector element type 'uint32_t' (aka 'unsigned long') typedef __attribute__((neon_vector_type(4))) uint32_t uint32x4_t; ^ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:355:10: error: invalid conversion between vector type '__attribute__((__vector_size__(16 * sizeof(signed char)))) signed char' and integer type 'int32x4_t' (aka 'long') of different size return (int32x4_t)__builtin_neon_vmovl_v((int8x8_t)__a, 18); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:357:44: error: invalid conversion between vector type 'int8x8_t' and integer type 'int32x2_t' (aka 'long') of different size return (int64x2_t)__builtin_neon_vmovl_v((int8x8_t)__a, 19); } ^~~~~~~~~~~~~ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:361:10: error: invalid conversion between vector type '__attribute__((__vector_size__(16 * sizeof(signed char)))) signed char' and integer type 'uint32x4_t' (aka 'unsigned long') of different size return (uint32x4_t)__builtin_neon_vmovl_v((int8x8_t)__a, 26); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:363:45: error: invalid conversion between vector type 'int8x8_t' and integer type 'uint32x2_t' (aka 'unsigned long') of different size return (uint64x2_t)__builtin_neon_vmovl_v((int8x8_t)__a, 27); } ^~~~~~~~~~~~~ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:368:10: error: invalid conversion between vector type '__attribute__((__vector_size__(16 * sizeof(signed char)))) signed char' and integer type 'int32x4_t' (aka 'long') of different size return (int32x4_t)__builtin_neon_vmull_v((int8x8_t)__a, (int8x8_t)__b, 18); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:370:44: error: invalid conversion between vector type 'int8x8_t' and integer type 'int32x2_t' (aka 'long') of different size return (int64x2_t)__builtin_neon_vmull_v((int8x8_t)__a, (int8x8_t)__b, 19); } ^~~~~~~~~~~~~ ........ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111123/16bb4c51/attachment.html>
Anton Korobeynikov
2011-Nov-23 14:34 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hello> In file included from helloneon.c:4: > d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:41:24: > error: invalid vector element type 'int32_t' (aka 'long')This looks weird, why int32_t is long? Are you using cygwin somehow? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Seung-yeon Choe
2011-Nov-23 14:42 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hello, Anton Korobeynikov. I just built the llvm using ms visual studio 2010 and ran the compile command on windows default command console. additionally, I also specified include dir of arm codesourcery latest toolchain because of missing stdio.h and stdint.h . Thanks and best regards, Seung-yeon. 2011/11/23 Anton Korobeynikov <anton at korobeynikov.info>> Hello > > > In file included from helloneon.c:4: > > > d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:41:24: > > error: invalid vector element type 'int32_t' (aka 'long') > This looks weird, why int32_t is long? Are you using cygwin somehow? > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111123/03e0f40c/attachment.html>
Seung-yeon Choe
2011-Nov-24 04:28 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hello, James Molly. Thank you for your advices. Now I aware that this is the problem of stdint.h. And, codesourcery toolchain also has stdint.h header file at same place of stdio.h Generally, Clang has "lib/clang/3.0/include" default search path. If I added codesourcery toolchain path for stdio.h with -I option, stdint.h has been loaded at the specified toolchain path first cuz clang's default search path priority moved back. In my case, when I busted codesourcery toolchains stdint.h, it's okay to build. And also it was okay cuz clang called /usr/include/stdint.h first on Unbuntu linux. How could I avoid this conflict, not to be removed stdint.h of toolchian? I think arm_neon.h in clang lib folder can handle this. Thanks and regards Seung-yeon. 2011/11/24 James Molloy <james.molloy at arm.com>> Hi,**** > > ** ** > > > additionally, I also specified include dir of arm codesourcery latest > toolchain because of missing stdio.h and stdint.h .**** > > ** ** > > I think this is your problem. Uint32_t is defined in stdint.h, and if > you’re not using clang’s stdint.h then all bets are off (int is the same > size as long on 32-bit x86, so it’s perfectly reasonable for gcc’s headers > to define int32_t as long).**** > > ** ** > > Clang comes with stdint.h (but not stdio.h) – you should use clang’s.**** > > ** ** > > Cheers,**** > > ** ** > > James**** > > ** ** > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Seung-yeon Choe > *Sent:* 23 November 2011 14:42 > *To:* Anton Korobeynikov > *Cc:* llvmdev at cs.uiuc.edu > *Subject:* Re: [LLVMdev] arm neon intrinsics cross compile error on > windows system**** > > ** ** > > Hello, Anton Korobeynikov.**** > > ** ** > > I just built the llvm using ms visual studio 2010 and ran the compile > command on windows default command console. > additionally, I also specified include dir of arm codesourcery latest > toolchain because of missing stdio.h and stdint.h .**** > > ** ** > > Thanks and best regards,**** > > Seung-yeon.**** > > ** ** > > ** ** > > 2011/11/23 Anton Korobeynikov <anton at korobeynikov.info>**** > > Hello**** > > > > In file included from helloneon.c:4: > > > d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:41:24: > > error: invalid vector element type 'int32_t' (aka 'long')**** > > This looks weird, why int32_t is long? Are you using cygwin somehow? > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University*** > * > > ** ** >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111124/3f62bd10/attachment.html>
Seung-yeon Choe
2011-Nov-24 05:42 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hello, I totally understood about this problem. codesourcery codebench arm eabi version uses newlibc. but, arm gnu/linux version uses glibc. hm.. actually there is no problem. it was my mistake as james told me. Thanks. 2011/11/24 Seung-yeon Choe <sychoe at gmail.com>> Hello, James Molly. > > Thank you for your advices. > > Now I aware that this is the problem of stdint.h. And, codesourcery > toolchain also has stdint.h header file at same place of stdio.h > > Generally, Clang has "lib/clang/3.0/include" default search path. > If I added codesourcery toolchain path for stdio.h with -I option, > stdint.h has been loaded at the specified toolchain path first cuz clang's > default search path priority moved back. > > In my case, when I busted codesourcery toolchains stdint.h, it's okay to > build. > And also it was okay cuz clang called /usr/include/stdint.h first on > Unbuntu linux. > > How could I avoid this conflict, not to be removed stdint.h of toolchian? > I think arm_neon.h in clang lib folder can handle this. > > Thanks and regards > Seung-yeon. > > > > 2011/11/24 James Molloy <james.molloy at arm.com> > >> Hi,**** >> >> ** ** >> >> > additionally, I also specified include dir of arm codesourcery latest >> toolchain because of missing stdio.h and stdint.h .**** >> >> ** ** >> >> I think this is your problem. Uint32_t is defined in stdint.h, and if >> you’re not using clang’s stdint.h then all bets are off (int is the same >> size as long on 32-bit x86, so it’s perfectly reasonable for gcc’s headers >> to define int32_t as long).**** >> >> ** ** >> >> Clang comes with stdint.h (but not stdio.h) – you should use clang’s.**** >> >> ** ** >> >> Cheers,**** >> >> ** ** >> >> James**** >> >> ** ** >> >> *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] >> *On Behalf Of *Seung-yeon Choe >> *Sent:* 23 November 2011 14:42 >> *To:* Anton Korobeynikov >> *Cc:* llvmdev at cs.uiuc.edu >> *Subject:* Re: [LLVMdev] arm neon intrinsics cross compile error on >> windows system**** >> >> ** ** >> >> Hello, Anton Korobeynikov.**** >> >> ** ** >> >> I just built the llvm using ms visual studio 2010 and ran the compile >> command on windows default command console. >> additionally, I also specified include dir of arm codesourcery latest >> toolchain because of missing stdio.h and stdint.h .**** >> >> ** ** >> >> Thanks and best regards,**** >> >> Seung-yeon.**** >> >> ** ** >> >> ** ** >> >> 2011/11/23 Anton Korobeynikov <anton at korobeynikov.info>**** >> >> Hello**** >> >> >> > In file included from helloneon.c:4: >> > >> d:/llvm_projects/llvm-3.0rc4/bin/../lib/clang/3.0/include\arm_neon.h:41:24: >> > error: invalid vector element type 'int32_t' (aka 'long')**** >> >> This looks weird, why int32_t is long? Are you using cygwin somehow? >> >> -- >> With best regards, Anton Korobeynikov >> Faculty of Mathematics and Mechanics, Saint Petersburg State University** >> ** >> >> ** ** >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111124/b6db633c/attachment.html>
Apparently Analagous Threads
- [LLVMdev] arm neon intrinsics cross compile error on windows system
- [LLVMdev] arm neon intrinsics cross compile error on windows system
- [LLVMdev] arm neon intrinsics cross compile error on windows system
- [LLVMdev] arm neon intrinsics cross compile error on windows system
- [LLVMdev] arm neon intrinsics cross compile error on windows system