Programming/Linux

cloudsuite Software testing 설치 시 오류들

라우드니스 2013. 11. 14. 04:22

http://www.mail-archive.com/cloudsuite@listes.epfl.ch/msg00150.html 참조.


/bin/rm: cannot remove ~~~/Intercept.d.tmp


Intercept.d.tmp를 삭제하지 못해서 오류가 난다고 더 이상 진행이 안된다.


링크의 내용을 참조하면 llvm-2.9/lib/ExecutionEngine/JIT/Intercept.cpp 파일에 unistd.h를 include 해주라는데, 실제로 해주니까 올바르게 컴파일이 된다.



http://keeda.stanford.edu/pipermail/klee-dev/2012-August/000907.html 


building 하면 --emit-llvm 이 없다고 오류가 난다.


llvm-2.9 폴더의 Makefile.config 파일의 190번대 라인에서


# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC  := /opt/llvm-gcc/bin/llvm-gcc
LLVMGXX  := /opt/llvm-gcc/bin/llvm-g++
LLVMCC1  :=
/opt/llvm-gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1
LLVMCC1PLUS :=
/opt/llvm-gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1plus
LLVMGCC_LANGS := c,c++,fortran
LLVMGCC_DRAGONEGG := no
# Information on Clang, if configured.
CLANGPATH :=
CLANGXXPATH :=
ENABLE_BUILT_CLANG := 0

# The LLVM capable compiler to use.
LLVMCC_OPTION := llvm-gcc

이 부분이 원래는 공백인데, software testing benchmark 압축파일에 있는 llvm을 압축 해제한 곳으로 적어주니 올바르게 emit-llvm 까지 해결.



이제는 asm/unistd.h 를 찾지 못하겠다는 에러가 난다.



http://www.mail-archive.com/cloudsuite@listes.epfl.ch/msg00155.html


을 참조하면, 우선 환경 변수를 정해주자.


export CPPFLAGS=/usr/include/x86_64-linux-gnu

export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.3
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu


이럴 경우 


cc1: warning: unrecognized gcc debugging option: N
  AS lib/crtn.o
/tmp/ccc53AXO.s: Assembler messages:
/tmp/ccc53AXO.s: Error: .size expression for _init does not evaluate to a
constant
/tmp/ccc53AXO.s: Error: .size expression for _fini does not evaluate to a
constant

에러가 난다.


http://ubuntuforums.org/showthread.php?t=1861069


을 참조하니 {uclib폴더}/libc/sysdeps/linux/{원하는 architecture}/crtn.5 파일에서 


.size _init, .-_init

.size _fini, .-_fini


이 두 문장을 찾아서 지우면 make가 되는것을 확인 할 수 있다.



cloud9 의 경우, configure를 하면 c 언어를 제대로 찾지못해서 오류가 난다. 이는 위에서 asm/unistd.h를 찾기위해 선언해줬던 환경 변수를 삭제하니 제대로 진행이 됐다.


그런데 이 놈도 make 중에 unistd.h 때문에 오류가 난다...


1) cloud9/lib/Solver/Solver.cpp 에 unistd.h include

2) cloud9/lib/Core/KleeHandler.cpp에 unistd.h include.


3) cloud9/lib/Cloud9/Worker/PeerServer.cpp에서


-> PeerConnection::pointer newConn = PeerConnection::create(acceptor.io_service()


부분을


-> PeerConnection::pointer newConn = PeerConnection::create(acceptor.get_io_service()


으로 수정.


boost library에서 io_service() 함수를 depreciate해버리고 get_io_service()로 바꿨다고 함.


4) cloud9/lib/Cloud9/LB/LBServer.cpp에서


->   WorkerConnection::pointer conn = WorkerConnection::create(

      acceptor.io_service(), lb);


부분을


->   WorkerConnection::pointer conn = WorkerConnection::create(

      acceptor.get_io_service(), lb);


로 수정. 3)번과 같은 이유


5) cloud9/tools/klee/main.cpp에 unistd.h include



반응형