Hi Yang,
Thanks. I did indeed include the runtime. I used this command to
compile: gcc -I${CSMITH_PATH}/runtime test.c -o test;
Any idea why this still fails?
You can see the complete output here http://pastebin.com/ie0CqmDM
Shafiul Azam Chowdhury
PhD Student and Graduate Research Assistant
The University of Texas at Arlington
Web: http://shafiul.github.io
On Fri, Oct 2, 2015 at 3:40 PM, Yang Chen <chenyang@cs.utah.edu
<mailto:chenyang@cs.utah.edu>> wrote:
Hi Shafiul,
You may need to include Csmith's runtime path, e.g.,
$ pwd
/home/yangchen/Programs/csmith/src
$ ./csmith > foo.c
$ gcc -I ../runtime foo.c > /dev/null 2>&1
$ ./a.out
checksum = DAB3BE95
- Yang
On 2015-10-02 08:24, Shafiul Azam wrote:
Hi,
I'm new to csmith (2.2.0) and tried generating code and
compiling, but
I'm getting lots of these errors:
test.c:(.text+0x221): undefined reference to
`safe_rshift_func_uint16_t_u_s'
test.c:(.text+0x22d): undefined reference to
`safe_unary_minus_func_int16_t_s'
test.c:(.text+0x2ee): undefined reference to
`safe_rshift_func_uint16_t_u_u'
/tmp/ccksSLp6.o: In function `func_9':
test.c:(.text+0x43f): undefined reference to
`safe_add_func_int32_t_s_s'
test.c:(.text+0x45e): undefined reference to
`safe_mul_func_int16_t_s_s'
test.c:(.text+0x4b8): undefined reference to
`safe_rshift_func_uint16_t_u_u'
These definitions were indeed missing in the generated code. I'm
guessing that I'm missing some library. I'm using Ubuntu 14.04
and gcc
4.8.4.
Command I used: csmith --no-arrays --no-bitfields --no-checksum
--no-consts --no-longlong --no-int8 --no-uint8 --max-block-depth 2
--no-structs --no-unions --no-volatiles --no-const-pointers > test.c
(I tried without passing any options to csmith but the result is
similar.)
Generated C Code: http://pastebin.com/1uJ7Bsdy [1]
Complete Output: http://pastebin.com/ie0CqmDM [2]
I might be doing something stupid and I'm sorry for this post,
but any
help will be highly appreciated.
--
Shafiul
Links:
------
[1] http://pastebin.com/1uJ7Bsdy
[2] http://pastebin.com/ie0CqmDM