[cfe-users] compile error

Mani monamimani at gmail.com
Thu Jul 11 17:34:17 PDT 2013


Hi all,

i have been compiling clang for months without problems, until about last week. Since then I can't compile.

usually delete CMakeCache.txt then run
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_C_COMPILER=/usr/local/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++ -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_SHARED_LINKER_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=OFF -DLLVM_BUILD_TOOLS=ON -DLLVM_BUILD_EXAMPLES=OFF -DCLANG_BUILD_EXAMPLES=OFF -DLLVM_APPEND_VC_REV=ON /Users/Mani/Development/Projects/llvm/source
ln -s $PWD/compile_commands.json /Users/Mani/Development/Projects/llvm/source

and then run 
make -j10 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1

Here is what i get.

[ 15%] [ 16%] Built target clang_rt.x86_64
Built target clang_rt.i386
[ 16%] /Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:799:1: error: 'assertion_failed__799'
      declared as an array with a negative size
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:726:3: note: expanded from macro
      'CHECK_SIZE_AND_OFFSET'
  COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro
      'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:803:1: error: 'assertion_failed__803'
      declared as an array with a negative size
CHECK_SIZE_AND_OFFSET(dirent, d_reclen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:728:3: note: expanded from macro
      'CHECK_SIZE_AND_OFFSET'
  COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) ==          \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Mani/Development/Projects/llvm/source/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro
      'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~
2 errors generated.
Built target RTLSanCommon.osx
make[2]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/sanitizer_platform_limits_posix.cc.o] Error 1
make[1]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs….

Anybody know what going on?

Thanks
Emmanuel



More information about the cfe-users mailing list