[klee-dev] install problem

Daniel Liew daniel.liew at imperial.ac.uk
Wed Jul 3 12:07:49 BST 2013


You need to figure out why the needed header files are not on machine.
I cannot do this for you.

Try looking first at /usr/include/sys/syscall.h and then looking at
the files it includes. On my machine /usr/include/sys/syscall.h
includes /usr/include/asm/unistd.h which then includes
/usr/include/asm/unistd_32.h or /usr/include/asm/unistd_64.h . On my
machine the __NR_open and other declarations are in
/usr/include/asm/unistd_64.h

On 3 July 2013 03:25, koxiaozi at aliyun.com <koxiaozi at aliyun.com> wrote:
> when I try to install the libc6-dev,the shown on the screen is :
> common at ubuntu-server:~$ sudo apt-get install libc6-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> libc6-dev is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
> It means my system have installed libc6-dev
>
>
>
> ------------------------------------------------------------------
> 发件人:Daniel Liew<daniel.liew at imperial.ac.uk>
> 发送日期:2013年7月2日 17:52
> 收件人:koxiaozi at aliyun.com<koxiaozi at aliyun.com>;
> 抄送人:klee-dev<klee-dev at imperial.ac.uk>;
> 主 题:Re: 回复:Re: [klee-dev] KLEE installation problem
> Please remember to reply to all so that the mailing list is CC'ed when
> replying.
>
> The commands I gave you should help you determine where the problems
> is. They will not fix anything.
>
> When you ran...
> $ grep -rH '__NR_OPEN' /usr/include
>
> there are no matches indicating you do not have any header files that
> define the macros you need. This probably means you have not installed
> the necessary development header files. Your host name suggests that
> you are using Ubuntu and the following header files so suggest you
> perhaps you should make sure you have libc6-dev and/or libc6-dev-i386
> installed.
>
> Hope that helps,
> Dan.
>
>
>
> On 2 July 2013 05:59, koxiaozi at aliyun.com <koxiaozi at aliyun.com> wrote:
>> I'm sorry to disturb you again
>>
>> About installing the klee has always wrong; I according to your advice to
>> install klee;
>>
>> first step,I do like this:
>> common at ubuntu-server:~/nxq/klee-niu/llvm-gcc4.2-2.9-x86_64-linux/bin$
>> $(llvm-gcc -print-prog-name=cc1) -v
>>
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/include"
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/include"
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/x86_64-unknown-linux-gnu/include"
>> #include "..." search starts here:
>> #include <...> search starts here:
>> /usr/include/x86_64-linux-gnu
>>
>> /usr/local/include
>> /usr/include
>> End of search list.
>>
>> I input according to the step 2 and step 3 like this:
>>
>> common at ubuntu-server:~$ grep -rH '__NR_OPEN' /usr/include
>> common at ubuntu-server:~$ grep -rHE '^#include <.+/unistd(_(32|64))?\.h>'
>> /usr/include
>> /usr/include/x86_64-linux-gnu/sys/syscall.h:#include <asm/unistd.h>
>> /usr/include/linux/unistd.h:#include <asm/unistd.h>
>> common at ubuntu-server:~$
>>
>> then I do like this:
>> common at ubuntu-server:~$ cd /home/common/nxq/klee-niu/klee/runtime/POSIX
>> common at ubuntu-server:~/nxq/klee-niu/klee/runtime/POSIX$ make clean
>> common at ubuntu-server:~/nxq/klee-niu/klee/runtime/POSIX$ make VERBOSE=1
>> /home/common/nxq/klee-niu/llvm-2.9/autoconf/mkinstalldirs
>> /home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts > /dev/null
>> /bin/date >
>> /home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/.dir
>> llvm[0]: Compiling fd.c for Release+Asserts build (bytecode)
>> if /home/common/nxq/klee-niu/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-gcc
>> -I/home/common/nxq/klee-niu/klee/include
>> -I/home/common/nxq/klee-niu/klee/runtime/POSIX
>> -I/home/common/nxq/klee-niu/llvm-2.9/include -D_DEBUG -D_GNU_SOURCE
>> -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fomit-frame-pointer
>> -fPIC -std=gnu89 -g -O2 -Wall -W -Wno-unused-parameter -Wwrite-strings
>> -MMD -MP -MF
>> "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.bc.d.tmp"
>> -MT "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.ll"
>> -MT
>> "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.bc.d" \
>> fd.c -o
>> /home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.ll -S
>> -emit-llvm ; \
>> then /bin/mv -f
>> "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.bc.d.tmp"
>> "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.bc.d";
>> else
>> /bin/rm
>>
>> "/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.bc.d.tmp";
>> exit 1; fi
>> fd.c: In function 'access':
>> fd.c:81: error: '__NR_access' undeclared (first use in this function)
>>
>> fd.c:81: error: (Each undeclared identifier is reported only once
>> fd.c:81: error: for each function it appears in.)
>> fd.c: In function '__fd_open':
>> fd.c:181: error: '__NR_open' undeclared (first use in this function)
>> fd.c: In function '__fd_lseek':
>> fd.c:390: error: '__NR_lseek' undeclared (first use in this function)
>> fd.c: In function '__fd_stat':
>> fd.c:439: error: '__NR_stat' undeclared (first use in this function)
>> fd.c: In function '__fd_lstat':
>> fd.c:458: error: '__NR_lstat' undeclared (first use in this function)
>> fd.c: In function 'chmod':
>> fd.c:535: error: '__NR_chmod' undeclared (first use in this function)
>> fd.c: In function 'chown':
>> fd.c:581: error: '__NR_chown' undeclared (first use in this function)
>> fd.c: In function 'lchown':
>> fd.c:613: error: '__NR_chown' undeclared (first use in this function)
>> fd.c: In function '__fd_fstat':
>> fd.c:630: error: '__NR_fstat' undeclared (first use in this function)
>> fd.c: In function '__fd_ftruncate':
>> fd.c:666: error: '__NR_ftruncate' undeclared (first use in this function)
>> fd.c: In function '__fd_getdents':
>> fd.c:734: error: '__NR_lseek' undeclared (first use in this function)
>> fd.c: In function 'fcntl':
>> fd.c:956: error: '__NR_fcntl' undeclared (first use in this function)
>> fd.c: In function '__fd_statfs':
>> fd.c:973: error: '__NR_statfs' undeclared (first use in this function)
>> fd.c: In function 'fstatfs':
>> fd.c:993: error: '__NR_fstatfs' undeclared (first use in this function)
>> fd.c: In function 'readlink':
>> fd.c:1116: error: '__NR_readlink' undeclared (first use in this function)
>> fd.c: In function 'select':
>> fd.c:1187: error: '__NR_select' undeclared (first use in this function)
>> make: ***
>> [/home/common/nxq/klee-niu/klee/runtime/POSIX/Release+Asserts/fd.ll] Error
>> 1
>>
>> then I don't know how to do, could you give me some advices?
>>
>>
>>
>> ------------------------------------------------------------------
>> 发件人:Daniel Liew<daniel.liew at imperial.ac.uk>
>> 发送日期:2013年6月25日 17:45
>> 收件人:koxiaozi at aliyun.com<koxiaozi at aliyun.com>;
>> 抄送人:klee-dev<klee-dev at imperial.ac.uk>;
>> 主 题:Re: [klee-dev] KLEE installation problem
>>
>> That's a little weird. My guess is your compiler is not configured
>> correctly as macros like _NR_open and _NR_stat are system call numbers
>> which are usually defined in unistd_64.h or unistd_32.h which is
>> indirectly included . For example the file runtime/POSIX/fd.c includes
>> "sys/syscall.h" which on my system includes "asm/unistd.h".
>>
>> You will need to investigate which header file on your system you need
>> to include to get you system call numbers defined. Perhaps you could
>> try the following...
>>
>> 1. Check /usr/include is being included by llvm-gcc
>>
>> $ $( llvm-gcc -print-prog-name=cc1) -v
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/include"
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/include"
>> ignoring nonexistent directory
>>
>> "/home/duncan/llvm-2.9/64/Phase2/Release/llvmgcc42-2.9-release.install/x86_64-unknown-linux-gnu/include"
>> #include "..." search starts here:
>> #include <...> search starts here:
>> /usr/local/include
>> /usr/include
>> End of search list.
>>
>>
>> 2. Once you have confirmed that llvm-gcc will be including the system
>> headers then find where the syscall numbers are defined
>>
>> $ grep -rH '__NR_OPEN' /usr/include
>>
>> 3. Then perhaps check to see if there is a header file that includes
>> that (assuming it's called unistd.h or unistd_64.h or unistd_32.h on
>> your system)
>>
>> $ grep -rHE '^#include <.+/unistd(_(32|64))?\.h>' /usr/include/
>>
>> If you can find one (on my system that is /usr/include/sys/syscall.h
>> which is already included in fd.c)
>>
>>
>> You could also take a look a look at what include paths are being
>> $ cd /path/to/klee/build/runtime/POSIX/
>> $ make clean
>> $ make VERBOSE=1
>>
>> This will show you the commands being executed to build the runtime
>> library.
>>
>> Hope that helps,
>>
>> Dan.
>>
>>
>> On 25 June 2013 04:54, koxiaozi at aliyun.com <koxiaozi at aliyun.com> wrote:
>>> Hello,
>>> I'm writing this email for my problems while I make install the klee
>>> After I sucessfully set ./configure --with-llvm=$INSTALLDIR/$LLVM
>>> --with-stp=$INSTALLDIR/$STP --with-uclibc=$INSTALLDIR/$POSIX
>>> --enable-posix-runtime , I do make ENABLE_OPTIMIZED=1, then, the errors
>>> reported like this
>>> fd.c:81: error: '_NR_access' undeclared (first use in this function)
>>> fd.c:81: error: (Each undeclared identifier is reported only once
>>> fd.c:81: error: for each function it appears in.)
>>> fd.c: In function '_fd_open':
>>> fd.c: 181: error: '_NR_open' undeclared (first use in this function)
>>> fd.c: In function '_fd_lseek':
>>> fd.c: 390: error: '_NR_lseek' undeclared (first use in this function)
>>> fd.c: In function '_fd_stat':
>>> fd.c: 439: error: '_NR_stat' undeclared (first use in this function)
>>> fd.c: In function '_fd_lstat':
>>> fd.c: 458: error: '_NR_lstat' undeclared (first use in this function)
>>> .........
>>> fd.c: In function 'select':
>>> fd.c: 1187: error: '_NR_select' undeclared (first use in this
>>> function)
>>> make[2]: ***[$INSTALLDIR/klee/runtime/POSIX/Release+Asserts/fd.ll]
>>> Error 1
>>> make[2]: leaving directory `$INSTALLDIR/klee/runtime/POSIX'
>>> make[1]: ***[POSIX/.makeall] Error 2
>>> make[1]: leaving directory `$INSTALLDIR/klee/runtime'
>>> make: *** [all] Error 1
>>> Would you please give me some advice?
>>> Thank you in advance.
>>>
>>> Best Regards.
>>> Demo.




More information about the klee-dev mailing list