[LLVMdev] Error building compiler-rt

Pranav Garg pranav.garg2107 at gmail.com
Wed Jul 31 14:54:41 PDT 2013


Hi,

I see that ENABLE_WERROR is being set to off (the default value) in the
config.log in the llvm build. However on grepping for WERROR in the
compiler-rt folder I get the following output:

pranav at pranav:~/smack-project/llvm-3.4/src/projects/compiler-rt$ grep -Rin
WERROR *
lib/asan/tests/CMakeLists.txt:38:  -Werror
lib/asan/asan_malloc_mac.cc:253:// This function is currently unused, and
we build with -Werror.
lib/tsan/check_cmake.sh:8:CC=clang CXX=clang++ cmake
-DLLVM_ENABLE_WERROR=ON -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_ASSERTIONS=ON $ROOT/../../../..
lib/tsan/Makefile.old:3:CXXFLAGS = -fPIE -fno-rtti -g -Wall -Werror \
lib/tsan/rtl/Makefile.old:1:CXXFLAGS = -fPIE -g -Wall -Werror -fno-builtin
-DTSAN_DEBUG=$(DEBUG) -DSANITIZER_DEBUG=$(DEBUG)
lib/tsan/go/buildgo.sh:68:FLAGS=" -I../rtl -I../.. -I../../sanitizer_common
-I../../../include -m64 -Wall -Werror -Wno-maybe-uninitialized
-fno-exceptions -fno-rtti -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4
$OSCFLAGS"
lib/sanitizer_common/sanitizer_platform_limits_posix.cc:410:  unsigned
IOCTL_FDWERRORCLR = FDWERRORCLR;
lib/sanitizer_common/sanitizer_platform_limits_posix.cc:411:  unsigned
IOCTL_FDWERRORGET = FDWERRORGET;
lib/sanitizer_common/sanitizer_platform_limits_posix.h:442:  extern
unsigned IOCTL_FDWERRORCLR;
lib/sanitizer_common/sanitizer_platform_limits_posix.h:443:  extern
unsigned IOCTL_FDWERRORGET;
lib/sanitizer_common/tests/CMakeLists.txt:36:  -Wall -Werror
-Werror=sign-compare)
lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc:177:
_(FDWERRORCLR, NONE, 0);
lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc:178:
_(FDWERRORGET, WRITE, struct_floppy_write_errors_sz);
make/options.mk:10:CFLAGS := -Wall -Werror
make/platform/clang_linux.mk:85:CFLAGS := -Wall -Werror -O3
-fomit-frame-pointer
make/platform/clang_darwin.mk:109:CFLAGS := -Wall -Werror -O3
-fomit-frame-pointer
make/platform/multi_arch.mk:10:CFLAGS := -Wall -Werror
make/platform/darwin_fat.mk:42:CFLAGS := -Wall -Werror

I see that -DLLVM_ENABLE_WERROR is being set in the script
"lib/tsan/check_cmake.sh". Should I disable -DLLVM_ENABLE_WERROR at this
point?

Thanks
Pranav


On Wed, Jul 31, 2013 at 3:24 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:

> You can disable -Werror by adding the cmake flag -DLLVM_ENABLE_WERROR=OFF,
> which should let it just ignore that (that's also the default, so you must
> have turned it on somewhere)
>
> On Jul 31, 2013, at 13:09 , Pranav Garg <pranav.garg2107 at gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to build llvm along with clang and compiler-rt. When I run
> make, I am getting the following compilation error (I tried compiling
> llvm-3.2, which is what I need for my project, but also tried llvm-3.3 and
> the current llvm source from the git repository).
> >
> > ...
> >   COMPILE:   clang_linux/full-x86_64/x86_64:
> /home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c
> >
> /home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c:53:29:
> error: cast to 'unsigned char *' from smaller integer type 'unsigned int'
> >       [-Werror,-Wint-to-pointer-cast]
> >         unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
> >                                    ^
> >
> /home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c:54:27:
> error: cast to 'unsigned char *' from smaller integer type 'unsigned int'
> >       [-Werror,-Wint-to-pointer-cast]
> >         unsigned char* endPage = (unsigned
> char*)((p+TRAMPOLINE_SIZE+pageSize) & pageAlignMask);
> >                                  ^
> > 2 errors generated.
> > ...
> >
> > On gcc --version I get the following output:
> >         gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
> > My operating system is a Ubuntu 12.04.1 LTS. On typing uname -a I get:
> >         Linux pranav 3.2.0-33-generic-pae #52-Ubuntu SMP Thu Oct 18
> 16:39:21 UTC 2012 i686 i686 i386 GNU/Linux
> >
> > Any ideas as to how to resolve this compilation error?
> >
> > Thanks
> > Pranav
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130731/db93f7d2/attachment.html>


More information about the llvm-dev mailing list