Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying ton run stabilizer in a Docker environment #9

Open
BuonOmo opened this issue Nov 9, 2021 · 2 comments
Open

Trying ton run stabilizer in a Docker environment #9

BuonOmo opened this issue Nov 9, 2021 · 2 comments

Comments

@BuonOmo
Copy link

BuonOmo commented Nov 9, 2021

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

@tbarbette
Copy link

Hey! I can't help but I would certainly be interested in the resulting docker :)

@BuonOmo
Copy link
Author

BuonOmo commented Nov 9, 2021

Hey @tbarbette yeah I guessed this would be linked to #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants