8
Spike Fuzzer linker errors
I decided to play around with Spike fuzzer and encountered some weird errors during installation. I was using gcc 4.1.2.
gcc -ggdb -o generic_listen_tcp generic_listen_tcp.o dlrpc.o
dlargs.o spike.o listener.o hdebug.o tcpstuff.o
spike_dcerpc.o base64.o udpstuff.o spike_oncrpc.o -ldl -L. -ldlrpc
/usr/bin/ld: generic_listen_tcp: hidden symbol `__stack_chk_fail_local' in
/usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [generic_listen_tcp] Error 1
If you are also getting the same error, I would recommend that you do the following
SPIKE/SPIKE/src$ ./configure
Now open the Makefile in your favorite editor and edit the CFLAGS line to include the following option:
-fno-stack-protector
This is how my CFLAGS line looks like in the Makefile:
CFLAGS = -Wall -funsigned-char -c -fPIC -ggdb -fno-stack-protector
This should make it build fine (I do get a few warnings but that’s cool…it still does not result in a no-build.
Thanks a lot for that. I experienced the same error and was really amazed by that solution. Thanks!
This stack protector is really pissing me off. Thanks for the solution!
Worked for me! Thanks.
i have a trouble, it compile fine, thank you, but:
./generic_chunked: error while loading shared libraries: libdlrpc.so: cannot open shared object file: No such file or directory
@* Did you compile with the -ldlrpc flag in the Makefile?
Thanks a lot, i was looking for the solution and here it is 🙂
Peace
If you have problems even after adding “-fno-stack-protector” to “Makefile”. Run ./configure alone, and then edit Makefile because it removes the “-fno-stack-protector” you added if you run “./configure; make” as it appears in the documentation. After that, add “-fno-stack-protector” in the Makefile, and run “make”. It will compile!
Thanks Rajat.
This solution has been deemed correct by the post author
Try . ld.sh it should also work