msv-lab / angelix

Semantic program repair system for C programs
http://angelix.io
MIT License
97 stars 38 forks source link

make with multi-threaded fail #24

Open blank-black opened 3 years ago

blank-black commented 3 years ago

Hi Sergey,

After using the Dockerfile to build and enter the docker, run activate. When I run make default, it failed with:

... [ 95%] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Indexing.cpp.o [ 95%] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/IndexingContext.cpp.o Linking CXX shared library ../../../../lib/libclang.so collect2: error: ld terminated with signal 9 [Killed] make[3]: [lib/libclang.so.3.7] Error 1 make[3]: Leaving directory `/angelix/build/llvm-3.7.0.src/build' make[2]: [tools/clang/tools/libclang/CMakeFiles/libclang.dir/all] Error 2 make[2]: Leaving directory /angelix/build/llvm-3.7.0.src/build' make[1]: *** [all] Error 2 make[1]: Leaving directory/angelix/build/llvm-3.7.0.src/build' make: *** [clang] Error 2

I run several times, but they failed not in the same position but all in 95%.

I delete the multi-threaded content in makefile

klee-uclibc: $(KLEE_UCLIBC_DIR)
    cd $(KLEE_UCLIBC_DIR) && ./configure --make-llvm-lib && make -j2

to

klee-uclibc: $(KLEE_UCLIBC_DIR)
    cd $(KLEE_UCLIBC_DIR) && ./configure --make-llvm-lib && make

It passed finally. The similar issue came when I build the docker image, again failed at about 95%, so I have to delete the multi-threaded -j. I don't know why multi-threaded make infects the results.

mechtaev commented 3 years ago

Hi Boyang,

Thank you for pointing this out. I will remove -j2 from the Dockerfile. I think the crash might be due to insufficient memory, because linking Clang uses quite a lot of memory.

Sergey