[klee-dev] Running Multifile Applications using Klee

Saikat Dutta saikatdutta.pro2011 at gmail.com
Sat Sep 21 10:36:31 BST 2013


I upgraded to python 2.7
"extract-bc gzip" produced gzip.bc
what to do next?


On Sat, Sep 21, 2013 at 2:20 PM, Daniel Liew <daniel.liew at imperial.ac.uk>wrote:

> Oh I forgot to mention that if you really don't feel like upgrading
> you could just modify the extract-bc python script by removing the use
> of argparse from the main() function and setting
>
> inputFile = sys.argv[1]
>
> On 20 September 2013 17:58, Daniel Liew <daniel.liew at imperial.ac.uk>
> wrote:
> > Your python install is too old (the argparse module was introduced in
> > python2.7) you need python 2.7 or later. You can find your current
> > python version by running
> >
> > $ python --version
> >
> > I think you said you were using Ubuntu 10.04 in which case the python
> > version is probably 2.6.5 . Unless you have a good reason to be
> > running such an old version of python (or Ubuntu for that matter) you
> > should upgrade.
> >
> >
> > On 20 September 2013 17:50, Saikat Dutta <saikatdutta.pro2011 at gmail.com>
> wrote:
> >> Hi,
> >> At the "extract-bc gzip" stage following error is produced:
> >>
> >> Traceback (most recent call last):
> >>   File
> >>
> "/home/saikat/Downloads/llvm_new/whole-program-llvm-llvm-gcc/extract-bc",
> >> line 269, in <module>
> >>     sys.exit(main(sys.argv))
> >>   File
> >>
> "/home/saikat/Downloads/llvm_new/whole-program-llvm-llvm-gcc/extract-bc",
> >> line 212, in main
> >>     import argparse
> >> ImportError: No module named argparse
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Fri, Sep 20, 2013 at 10:09 PM, Daniel Liew <
> daniel.liew at imperial.ac.uk>
> >> wrote:
> >>>
> >>> On 20 September 2013 17:15, Saikat Dutta <
> saikatdutta.pro2011 at gmail.com>
> >>> wrote:
> >>> > Hi,
> >>> > Everything goes fine with wllvm according to the way you described in
> >>> > the
> >>> > previous mail. No errors till make step.
> >>>
> >>> If you don't tell us what the errors are we will **not** be able to
> >>> help you. If you see an error tell us what it is.
> >>>
> >>> > But instead of "gzip.bc" or
> >>> > "gzip.o.bc" , ".gzip.o.bc" is being formed.
> >>>
> >>> .gzip.o.bc is a LLVM bitcode file that corresponds to the gzip.o
> >>> object file (this mostly likely corresponds with gzip.c) . It is
> >>> **not** the finally linked executable. You are only supposed to run
> >>> extract-bc on the the finally linked executable (or on static
> >>> libraries) **not** on object files.
> >>>
> >>> I just tried this and it works fine. You should run extract-bc on the
> >>> "gzip" executable.
> >>>
> >>> # I assume you have llvm-gcc in your path and it was the pre-built
> >>> binary llvm-gcc 4.2
> >>>
> >>> $ export LLVM_COMPILER=llvm-gcc
> >>> $ export WLLVM_OUTPUT=WARNING
> >>> $ export
> >>> LLVM_COMPILER_PATH=/your/path/to/the/llvm2.9/build/Release+Asserts/bin
> >>> $ wget http://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.xz
> >>> $ tar -xvf gzip-1.6.tar.xz
> >>> $ cd gzip-1.6
> >>> $ CC=wllvm ./configure
> >>> $ make -j4
> >>> $ extract-bc gzip
> >>>
> >>> # gzip.bc will now be in the current directory
> >>>
> >>> > When I use extract bc on it,
> >>> > error is generated. Please help.
> >>> > -Saikat
> >>>
> >>> Again... If there is an error message tell us what it is.
> >>>
> >>> Hope that helps.
> >>>
> >>> Dan.
> >>
> >>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list