Please make radamsa great again (building on Windows)
pedrib opened this issue · 6 comments
As the title says. The last version I was able to build was 0.4a in late 2013.
When I try to build Radamsa now, it complains about:
#include <netinet/in.h>
^
compilation terminated.
I've tried using different owl versions, commenting some owl code and generating radamsa.c, etc, but I cannot get it to work.
If you point me in the right direction I will try to make it work.
Radamsa has helped me greatly finding bugs in Windows (see PR #30) and I'm sure I'm not the only one!
Are you can get more information about the error? Are you try to compile under windows?
root@sd-70859:/home/oneprovider/fuzz/libarchive# apt-file search in.h | grep netinet
libc6-dev: /usr/include/netinet/in.h
I think, you don't have installed the libc6 (libc) libraries
I'm building on Linux, and I have libc6-dev installed.
Normal radamsa works fine with a simple "make".
It fetches owl, builds radamsa.c, etc, using gcc as normal.
After that, I try to do:
i686-w64-mingw32-gcc -o bin/radamsa.exe radamsa.c -lwsock32 -Wall -O2
and I get the error above. Looking on Google it seems that we are building for Windows, for netinet/in.h does not exist on Windows (uses windows sockets instead).
Without knowing anything about it, I'd guess that when radamsa.c is generated, something changed from before - it probably used some other ifdef or socket library that would also work on Windows.
don't know why you get the error, but I can successfully compile radamsa with use Cygwin under windows
https://github.com/vah13/radamsa/releases
Something has indeed changed. Radamsa had partial Windows-support earlier, but e.g. TCP didn't work and terminal interaction required special trickery. It was effectively trying to do what Cygwin already provides. That part was removed from Radamsa after 0.4. Now you should compile it in Cygwin, and then you can copy radamsa.exe (and cygwin1.dll) to where you want to use it.
Got it working, thanks!
The correct build command is:
i686-pc-cygwin-gcc.exe -m32 -static -o bin/radamsa.exe radamsa.c -lwsock32 -Wall -O2
(this is for cygwin 64 bit, for 32 bit remove -m32)
Without the -static, it needs both cygwin1.dll and cyggcc_1.dll, with the -static it only needs the former.