[llvm-dev] [compiler-rt] dd santizer build failed for x86_64

Khem Raj via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 12 23:35:50 PDT 2016


Hi

I am trying to compile compiler-rt for x86_64 using clang trunk and
seeing this error

/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/dd_interceptors.cc:226:1:
warning: attribute
      declaration must precede definition [-Wignored-attributes]
INTERCEPTOR(char*, realpath, const char *path, char *resolved_path) {
^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/../../interception/interception.h:188:3:
note:
      expanded from macro 'INTERCEPTOR'
  DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
  ^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/../../interception/interception.h:148:57:
note:
      expanded from macro 'DECLARE_WRAPPER'
    __attribute__((weak, alias("__interceptor_" #func), visibility("default")));
                                                        ^
/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/bits/stdlib.h:37:8:
note: previous definition is here
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
       ^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/dd_interceptors.cc:226:20:
error: redefinition of
      'realpath'
INTERCEPTOR(char*, realpath, const char *path, char *resolved_path) {
                   ^
/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/bits/stdlib.h:37:8:
note: previous definition is here
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
       ^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/dd_interceptors.cc:226:1:
warning: attribute
      declaration must precede definition [-Wignored-attributes]
INTERCEPTOR(char*, realpath, const char *path, char *resolved_path) {
^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/../../interception/interception.h:188:3:
note:
      expanded from macro 'INTERCEPTOR'
  DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
  ^
/mnt/oe/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/compiler-rt/3.9.0+gitAUTOINC+3e3f7da05e-r0/git/lib/tsan/dd/../../interception/interception.h:148:20:
note:
      expanded from macro 'DECLARE_WRAPPER'
    __attribute__((weak, alias("__interceptor_" #func), visibility("default")));
                   ^
/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/bits/stdlib.h:37:8:
note: previous definition is here
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
       ^
2 warnings and 1 error generated.
make[2]: *** [lib/tsan/dd/CMakeFiles/clang_rt.dd-x86_64.dir/dd_interceptors.cc.o]
Error 1

Anyone else seeing this too ?

I am cross compiling compiler-rt

Thanks
-Khem


More information about the llvm-dev mailing list