James Molloy
2011-Nov-24 08:22 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hi, Just to clarify, some header files are compiler specific. Stdint.h is one of them. The reason your Ubuntu stdint.h works is because, coincidentally, Clang's stdint.h uses the same layout and pre-processor built-ins as GCC. This is an implementation detail. Do not rely upon it. You should use Clang's stdint.h. Cheers, James From: Seung-yeon Choe [mailto:sychoe at gmail.com] Sent: 24 November 2011 05:42 To: James Molloy Cc: Anton Korobeynikov; llvmdev at cs.uiuc.edu Subject: Re: [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<mailto: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<mailto: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> [mailto: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<mailto: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<mailto: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 -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111124/6a0e6dc5/attachment.html>
Seung-yeon Choe
2011-Nov-24 11:57 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hi, There is a little bit awkward thing. If I need to use the newlibc printf function regardless stdint.h is compiler specific implementation, I should remove or block newlibc's stdint.h and the others because as you know clang already stdint.h (glibc compatible??) header but it is not standard library full set, right? On the other hand, even if I want to use other toolchain's glibc function, I have to replace them with headers in /lib/clang/*/include folder, right? Please show me the lights of solution one more time. :) Thanks and regards, Seung-yeon. 2011/11/24 James Molloy <James.Molloy at arm.com>> Hi,**** > > ** ** > > Just to clarify, some header files are compiler specific. Stdint.h is one > of them. The reason your Ubuntu stdint.h works is because, coincidentally, > Clang’s stdint.h uses the same layout and pre-processor built-ins as GCC.* > *** > > ** ** > > This is an implementation detail. Do not rely upon it. You should use > Clang’s stdint.h.**** > > ** ** > > Cheers,**** > > ** ** > > James**** > > *From:* Seung-yeon Choe [mailto:sychoe at gmail.com] > *Sent:* 24 November 2011 05:42 > *To:* James Molloy > *Cc:* Anton Korobeynikov; llvmdev at cs.uiuc.edu > > *Subject:* Re: [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*** > * > > **** > > ** ** > > ** ** > > -- IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111124/ca7e414a/attachment.html>
James Molloy
2011-Nov-24 12:09 UTC
[LLVMdev] arm neon intrinsics cross compile error on windows system
Hi, There's an open question as to the compatibility of specific headers within libraries - Clang's stdint.h *should* be compatible with newlib, and so you should be able to just overwrite all duplicate headers in newlib that are also provided by Clang. Cp -r newlib/libc/include/* /tmp/include Cp -r lib/clang/3.0/include/* /tmp/include Clang -I/tmp/include ... Cheers, James From: Seung-yeon Choe [mailto:sychoe at gmail.com] Sent: 24 November 2011 11:58 To: James Molloy Cc: Anton Korobeynikov; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] arm neon intrinsics cross compile error on windows system Hi, There is a little bit awkward thing. If I need to use the newlibc printf function regardless stdint.h is compiler specific implementation, I should remove or block newlibc's stdint.h and the others because as you know clang already stdint.h (glibc compatible??) header but it is not standard library full set, right? On the other hand, even if I want to use other toolchain's glibc function, I have to replace them with headers in /lib/clang/*/include folder, right? Please show me the lights of solution one more time. :) Thanks and regards, Seung-yeon. 2011/11/24 James Molloy <James.Molloy at arm.com<mailto:James.Molloy at arm.com>> Hi, Just to clarify, some header files are compiler specific. Stdint.h is one of them. The reason your Ubuntu stdint.h works is because, coincidentally, Clang's stdint.h uses the same layout and pre-processor built-ins as GCC. This is an implementation detail. Do not rely upon it. You should use Clang's stdint.h. Cheers, James From: Seung-yeon Choe [mailto:sychoe at gmail.com<mailto:sychoe at gmail.com>] Sent: 24 November 2011 05:42 To: James Molloy Cc: Anton Korobeynikov; llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu> Subject: Re: [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<mailto: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<mailto: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> [mailto: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<mailto: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<mailto: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 -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111124/a0c647c6/attachment.html>
Seemingly Similar 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