klee / klee

KLEE Symbolic Execution Engine

Home Page:https://klee-se.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues Encountered When Compiling findutils Using wllvm

LuMingYinDetect opened this issue · comments

Hello! I am a beginner with KLEE, and recently, I am looking to use KLEE to perform symbolic execution on findutils. The test suite I've chosen is Corebench, which encompasses various versions of findutils from a decade ago.I use the following command:
git clone git://git.savannah.gnu.org/findutils.git
cd findutils/
git checkout -f b46b0d89
This version of findutils is from the year 2007, and the project directory is:
ABOUT-NLS ChangeLog NEWS README-alpha autom4te.cache debian find lib po
AUTHORS INSTALL README THANKS build-aux debian.rules import-gnulib.config locate stamp-h.in
COPYING Makefile.am README-CVS TODO configure.in doc import-gnulib.sh m4 xargs
The method I learned online for compiling a project into KLEE-usable bc files involves first generating a Makefile from the configure file, then creating an executable from the Makefile, and finally obtaining the bc files. However, in the directory of this project, there is neither a configure file nor a Makefile. Therefore, I'm not quite sure how to obtain the bc files.
Here, I would like to respectfully inquire if you have any tutorials on compiling findutils using wllvm. Once again, I apologize for any inconvenience caused by reaching out.

Unfortunately, this might be a challenge due to the changes in many dependencies. You probably need to run import-gnulib.sh first, then build old versions of autotools and use those to generate the configure script. Finally, configure with CC set to wllvm and something like --disable-nls --disable-largefile --disable-threads (check with ./configure -h what is available). Still, I have no idea if those versions are compatible with a recent glibc.

Unfortunately, this might be a challenge due to the changes in many dependencies. You probably need to run first, then build old versions of and use those to generate the configure script. Finally, configure with set to and something like (check with what is available). Still, I have no idea if those versions are compatible with a recent glibc.import-gnulib.sh``autotools``CC``wllvm``--disable-nls --disable-largefile --disable-threads``./configure -h

Thank you for your response! Excluding the impact of software incompatibility, could you provide me with a series of instructions for compiling findutils using wllvm under normal circumstances? (such as import-gnulib.sh... ./configure...)

could you provide me with a series of instructions for compiling findutils using wllvm under normal circumstances

For a recent version? Sure:

$ git clone git://git.savannah.gnu.org/findutils.git
$ cd findutils
$ ./bootstrap
$ export CC=wllvm
$ export CFLAGS="-g -O1 -Xclang -disable-llvm-passes -D__NO_STRING_INLINES -D_FORTIFY_SOURCE=0 -U__OPTIMIZE__"
$ ./configure --disable-nls --disable-largefile --disable-threads --without-selinux
$ make -j 4 MAKEINFO=true HELP2MAN=true
$ extract-bc find/find

could you provide me with a series of instructions for compiling findutils using wllvm under normal circumstances

For a recent version? Sure:

$ git clone git://git.savannah.gnu.org/findutils.git
$ cd findutils
$ ./bootstrap
$ export CC=wllvm
$ export CFLAGS="-g -O1 -Xclang -disable-llvm-passes -D__NO_STRING_INLINES -D_FORTIFY_SOURCE=0 -U__OPTIMIZE__"
$ ./configure --disable-nls --disable-largefile --disable-threads --without-selinux
$ make -j 4 MAKEINFO=true HELP2MAN=true
$ extract-bc find/find

thanks!I will try it soon!