Skip to content

Trying ton run stabilizer in a Docker environment #9

@BuonOmo

Description

@BuonOmo

Hi,

I've tried to run stabilizer in a container to be able to use it as-is in a deprecated environment (llvm 3.1) for small files. However, it doesn't build, and my cmake knowledge is very limited. I'll dig more into that later, but if you have any pointer, I'd be thankful!

FROM alpine:3.9

RUN apk add --no-cache git cmake build-base python \
	&& rm -rf /tmp/* /var/cache/apk/*
RUN git clone --depth 1 --branch llvmorg-3.1.0 https://github.com/llvm/llvm-project.git
RUN cd llvm-project \
	&& mkdir build \
	&& cd build \
	&& cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm \
	&& make

RUN git clone git://github.com/ccurtsinger/stabilizer.git stabilizer
RUN cd stabilizer && make

Currently the bug seems to be that I need to specify another std version to CMAKE, yet I've tried many way of doing so without success. The cmake command works, and the make command fails at:

[  5%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DynamicLibrary.cpp.o
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp: In static member function 'static void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)':
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:158:42: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
    if (!strcmp(symbolName, #SYM)) return &SYM
                                          ^
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:165:5: note: in expansion of macro 'EXPLICIT_SYMBOL'
     EXPLICIT_SYMBOL(stderr);
     ^~~~~~~~~~~~~~~
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:158:42: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
    if (!strcmp(symbolName, #SYM)) return &SYM
                                          ^
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:166:5: note: in expansion of macro 'EXPLICIT_SYMBOL'
     EXPLICIT_SYMBOL(stdout);
     ^~~~~~~~~~~~~~~
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:158:42: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
    if (!strcmp(symbolName, #SYM)) return &SYM
                                          ^
/llvm-project/llvm/lib/Support/DynamicLibrary.cpp:167:5: note: in expansion of macro 'EXPLICIT_SYMBOL'
     EXPLICIT_SYMBOL(stdin);
     ^~~~~~~~~~~~~~~
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/build.make:830: lib/Support/CMakeFiles/LLVMSupport.dir/DynamicLibrary.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Ulysse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions