[LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'

Alexey Samsonov samsonov at google.com
Wed Jun 6 03:33:37 PDT 2012


Hi, Chatsiri!


> ---------- Forwarded message ----------
> From: Chatsiri Ratana <insiderboy at gmail.com>
> Date: Wed, Jun 6, 2012 at 2:15 PM
> Subject: [LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'
> To: llvmdev at cs.uiuc.edu
>
>
> Hello All,
>
>      I build LLVM source code version 3.2 from SVN repository. After I
> build source code of LLVM include "compiler-rt"(Compiler-rt at revision
> 158057.
> ) and "clang" are represent an error as below.
>


> make[5]: Entering directory
> `/san01/home/chatsiri/workspacecpp/llvm-svn/projects/compiler-rt'
>   COMPILE:   clang_linux/asan-x86_64/x86_64:
> /san01/home/chatsiri/workspacecpp/llvm-svn/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
> /san01/home/chatsiri/workspacecpp/llvm-svn/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:47:36:
> error: use of
>       undeclared identifier 'O_CLOEXEC'
>       write ? O_WRONLY | O_CREAT | O_CLOEXEC : O_RDONLY,
> 0660);                                   ^
> 1 error generated.
>
> Who have any idea with error these?
>

The code in sanitizer_linux.cc calls libc function "open" and passes
O_CLOEXEC as a flag to it. "man open" says:
"O_CLOEXEC (Since Linux 2.6.23)"
is it possible that your Linux is older that a given version?


>
> Best Regards,
> Chatsiri Rattana.
>
> --
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120606/aabbfa7b/attachment.html>


More information about the llvm-dev mailing list