Re: [klee-dev] error : klee + coreutils + experimental [+docker]

2015-04-16 Thread Dan Liew
On 16 April 2015 at 13:59, Joshep J. Cortez Sanchez agne...@gmail.com wrote:
 Dan,

 Thanks for answer!

 In the 1) case, using whole-program-llvm all works fine.

Great.

 I don't know why in the tutorial(step 6) gives:

 Lines executed:97.03% of 101

 and I obtained:
 Lines executed:97.09% of 103

 for : File '../../src/echo.c'   I'm using coreutils 6.11 too.

I don't know. You are using a different compiler (clang) than the
tutorial was written for (llvm-gcc) so that might potentially be the
source of the discrepancy. Clang is supposed to be a drop-in
replacement for gcc though so I would be surprised if that's the
problem.

 In the 2) case (Docker case with klee/klee container)
 I downloaded some containers with same results. My docker is 1.5.0 too.
 Executing ../configure for coreutils 6.11 (in mi computer) is done some kind
 of recursion with a long path and fails creating the Makefile.  [attached
 image]
 Surfing the web I arrive to:
 https://github.com/docker/docker/issues/1413
 And I believe thats my problem, ( but I dont know why occur the recursion)

I suspected that was the issue which is why I suggested you mounted a
directory from your host machine as a volume inside the docker
container. This will bypass the storage driver (i.e. in your case
aufs) so you'll have the path limit of your real filesystem rather
than aufs.

___
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev


Re: [klee-dev] error : klee + coreutils + experimental [+docker]

2015-04-15 Thread Dan Liew
 sudo docker run -ti klee/klee
 klee@2f1c0eaa949c:~$ wget
 http://ftp.gnu.org/gnu/coreutils/coreutils-6.11.tar.gz
 klee@2f1c0eaa949c:~$ tar xf coreutils-6.11.tar.gz
 klee@2f1c0eaa949c:~$ cd coreutils-6.11
 klee@2f1c0eaa949c:~/coreutils-6.11$ mkdir obj-gcov  cd obj-gcov
 klee@2f1c0eaa949c:~/coreutils-6.11/obj-gcov$ ../configure --disable-nls
 CFLAGS=-g -fprofile-arcs -ftest-coverage

 config.status: executing po-directories commands
 config.status: creating po/POTFILES
 config.status: creating po/Makefile
 rm: cannot remove 'confdir3/confdir3/confdir3/..
 .(many many repetitions ).../confdir3/confdir3': File name too long

Oh I forgot to mention that (just in case it wasn't implied). I can't
reproduce the above behaviour.

___
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev


Re: [klee-dev] error : klee + coreutils + experimental [+docker]

2015-04-14 Thread Dan Liew
Hi,

 Clearly i have not llvm-ld because it was removed.
 So, what shuold I change in klee-gcc to make it work with the new
 settings/version of things

klee-gcc is only meant to be used with llvm-gcc. I would use
whole-program-llvm [1] to build core utils if you are using clang.

$ export LLVM_COMPILER=clang
$ mkdir obj-llvm
$ CC=/path/to/whole-program-llvm/wllvm ../configure --disable-nls CFLAGS=-g
$ make

Now extract the bit code for the application you want to run

$ /path/to/whole-program-llvm/extract-bc src/du

# Now you will have a src/du.bc file which is a LLVM module

$ klee --posix-runtime --libc=uclibc src/du.bc --version

 2) WITH DOCKER klee/klee case:

 It fails in step 1 (2 too)
 I run:
 sudo docker run -ti klee/klee
 klee@2f1c0eaa949c:~$ wget
 http://ftp.gnu.org/gnu/coreutils/coreutils-6.11.tar.gz
 klee@2f1c0eaa949c:~$ tar xf coreutils-6.11.tar.gz
 klee@2f1c0eaa949c:~$ cd coreutils-6.11
 klee@2f1c0eaa949c:~/coreutils-6.11$ mkdir obj-gcov  cd obj-gcov
 klee@2f1c0eaa949c:~/coreutils-6.11/obj-gcov$ ../configure --disable-nls
 CFLAGS=-g -fprofile-arcs -ftest-coverage

 config.status: executing po-directories commands
 config.status: creating po/POTFILES
 config.status: creating po/Makefile
 rm: cannot remove 'confdir3/confdir3/confdir3/..
 .(many many repetitions ).../confdir3/confdir3': File name too long

Perhaps you're running an old buggy version of docker? I'm using Docker 1.5.0

Or perhaps there's something wrong with the underlying storage driver
being used by your version of Docker.

You could try doing the build of coretuils in a Docker volume to
bypass the storage driver to see if that fixes your issue:

$ docker run -ti -v /path/on/host/system:/mnt klee/klee

the above will make the /path/on/host/system available in the /mnt
inside the container.

Then you could try extracting the coreutils files into /mnt and trying
the build there.

Thanks,
Dan.

___
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev


[klee-dev] error : klee + coreutils + experimental [+docker]

2015-04-13 Thread Joshep J. Cortez Sanchez
Hi all,

I' ve follow de experimental tutorial http://klee.github.io/experimental/
to KLEE in the last week and all was fine.
Also I made the container klee/klee for docker.

But, when I try testing coreutils
http://klee.github.io/tutorials/testing-coreutils/, I'm obtaining some
errors:

1) *WITHOUT DOCKER case*:
In *step 2* from tutorial.

coreutils-6.11$ mkdir obj-llvm
coreutils-6.11$ cd obj-llvm
obj-llvm$ ../configure --disable-nls CFLAGS=-g
... verify that configure worked ...
obj-llvm$ *make CC=/my/path/to/klee/scripts/klee-gcc*

This line fail with:
/home/lala/klee/scripts/klee-gcc  -g  -Wl,--as-needed -o uname uname.o
uname-uname.o ../lib/libcoreutils.a  ../lib/libcoreutils.a
Traceback (most recent call last):
  File /home/lala/klee/scripts/klee-gcc, line 38, in module
main()
  File /home/lala/klee/scripts/klee-gcc, line 32, in main
os.execvp(llvm-ld, [llvm-ld, --disable-opt] + linkArgs)
  File /usr/lib/python2.7/os.py, line 344, in execvp
_execvpe(file, args)
  File /usr/lib/python2.7/os.py, line 380, in _execvpe
func(fullname, *argrest)
*OSError: [Errno 2] No such file or director *

Clearly i have not llvm-ld because it was removed
http://stackoverflow.com/questions/17779958/llvm-ld-still-exist-for-clang-3-4.
So, what shuold I change in klee-gcc to make it work with the new
settings/version of things

2) *WITH DOCKER klee/klee case*:
It fails in *step 1* (2 too)
I run:
sudo docker run -ti klee/klee
klee@2f1c0eaa949c:~$ wget
http://ftp.gnu.org/gnu/coreutils/coreutils-6.11.tar.gz
klee@2f1c0eaa949c:~$ tar xf coreutils-6.11.tar.gz
klee@2f1c0eaa949c:~$ cd coreutils-6.11
klee@2f1c0eaa949c:~/coreutils-6.11$ mkdir obj-gcov  cd obj-gcov
klee@2f1c0eaa949c:~/coreutils-6.11/obj-gcov$ *../configure --disable-nls
CFLAGS=-g -fprofile-arcs -ftest-coverage*

config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
rm: cannot remove 'confdir3/confdir3/confdir3/..
.(many many repetitions ).../confdir3/confdir3': File name too long

- The same ocurr when executing the ../configure for obj-llvm case.


Any help or ideas you can provide will be greatly appreciated.
(I'm using ubuntu 14.04 x64)
Thank you.


-- 
   Joshep
___
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev