[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-dev] Generated code does not compile: undefined reference to `safe_rshift_func_uint16_t_u_s'


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

Complete Output: http://pastebin.com/ie0CqmDM

I might be doing something stupid and I'm sorry for this post, but any help will be highly appreciated.