-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cygwin compile error. #50
Comments
From
|
first occurance is |
All the libraries are present. |
That's what I've thought too. That's why I've modified the make file to the proper location, but it doesn't work, and I didn't understand why. I've check the pasts issues, and used the issue #40 as source for ideas, but with no luck. |
The symbols you are missing are definitely provided by libresolv.so on my system. Look, I am not sure anyone has ever tried prads in cygwin before. The environment might prove insufficient. You can try |
The .so it's not present, because, if I've understood correctly from previous search over it, it's bundled inside the cygwin1.dll or, anyway, inside the cygwin framework.
The output of the
|
Well, maybe the symbols are in the cygwin dll, but the makefile expects there to be a working -lresolv to link with, and that this library provides the required symbols. My bet is that cygwin libresolv is broken or too old. You can try with MSYS2, which is a more up-to-date posix compatibility layer. You'll be the first one that gets this working, so be sure to report back 😅 |
Ok :-). I'll continue the investigations/works over it. I'll keep you posted :-)! |
a quick look into my crystal ball yeilded this gem from 2004: You can try to install minires-devel in cygwin and see if that provides the needed resolver symbols. |
It seems that the minires-devel is now obsolete and no more available. https://cygwin.com/cgi-bin2/package-grep.cgi?grep=minires&arch=x86 I'm installing MSYS2 at the moment. |
Hi everyone, I've tried to compile PRADS under a Cygwin environment for some tests using a Windows machine, but I've got this error:
$ make
You need libpcre-dev and libpcap-dev to compile this program.
make CONFDIR=/usr/local/etc/prads -C src/
make[1]: entering in the folder "/home/Giacomo/prads/src"
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o bstrlib.o bstrlib.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o sig_tcp.o sig_tcp.c
sig_tcp.c: In function ‘grab_name’:
sig_tcp.c:918:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
if (!r || !(s = r->h_name) || !(j = strlen(s))) return "";
^
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o config.o config.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o sys_func.o sys_func.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o assets.o assets.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o prads.o prads.c
prads.c:55:12: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
extern int optind, opterr, optopt; // getopt()
^~~~~~
prads.c:55:20: warning: ‘opterr’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
extern int optind, opterr, optopt; // getopt()
^~~~~~
prads.c:55:28: warning: ‘optopt’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
extern int optind, opterr, optopt; // getopt()
^~~~~~
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o dhcp.o dhcp.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o dump_dns.o dump_dns.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o mac.o mac.c
mac.c: In function ‘arp_check’:
mac.c:335:6: warning: type of ‘eth_hdr’ defaults to ‘int’ [-Wimplicit-int]
void arp_check(eth_hdr, tstamp)
^~~~~~~~~
mac.c:335:6: warning: type of ‘tstamp’ defaults to ‘int’ [-Wimplicit-int]
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o servicefp/servicefp.o servicefp/servicefp.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o servicefp/tcpc.o servicefp/tcpc.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o servicefp/tcps.o servicefp/tcps.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o servicefp/udps.o servicefp/udps.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o ipfp/ipfp.o ipfp/ipfp.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o ipfp/udp_fp.o ipfp/udp_fp.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o ipfp/icmp_fp.o ipfp/icmp_fp.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o cxt.o cxt.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_dispatch.o output-plugins/log_dispatch.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_stdout.o output-plugins/log_stdout.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_file.o output-plugins/log_file.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_fifo.o output-plugins/log_fifo.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_ringbuffer.o output-plugins/log_ringbuffer.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -c -o output-plugins/log_sguil.o output-plugins/log_sguil.c
cc -O3 -DRELEASE='"-20-g407cf7c"' -DCONFDIR='"/usr/local/etc/prads/"' -D__USE_GNU -o prads bstrlib.o sig_tcp.o config.o sys_func.o assets.o prads.o dhcp.o dump_dns.o mac.o servicefp/servicefp.o servicefp/tcpc.o servicefp/tcps.o servicefp/udps.o ipfp/ipfp.o ipfp/udp_fp.o ipfp/icmp_fp.o cxt.o output-plugins/log_dispatch.o output-plugins/log_stdout.o output-plugins/log_file.o output-plugins/log_fifo.o output-plugins/log_ringbuffer.o output-plugins/log_sguil.o -lpcap -lpcre -lresolv
** dump_dns.o:dump_dns.c:(.text+0xa8): undefined reference to "__ns_parserr"
dump_dns.o:dump_dns.c:(.text+0xed): undefined reference to "__p_type"
dump_dns.o:dump_dns.c:(.text+0xf9): undefined reference to "__p_class"
dump_dns.o:dump_dns.c:(.text+0x1c2): undefined reference to "__ns_name_uncompress"
dump_dns.o:dump_dns.c:(.text+0x225): undefined reference to "__ns_name_uncompress"
dump_dns.o:dump_dns.c:(.text+0x27a): undefined reference to "__ns_name_uncompress"
dump_dns.o:dump_dns.c:(.text+0x42a): undefined reference to "__ns_initparse"
dump_dns.o:dump_dns.c:(.text+0x49e): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x50c): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x519): undefined reference to "__p_rcode"
dump_dns.o:dump_dns.c:(.text+0x524): undefined reference to "_res_opcodes"
dump_dns.o:dump_dns.c:(.text+0x5ad): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x621): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x695): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x709): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x77d): undefined reference to "__ns_msg_getflag"
dump_dns.o:dump_dns.c:(.text+0x7f1): more undefined references to "__ns_msg_getflag" follow
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:100: prads] Error 1 **
make[1]: exit from the folder "/home/Giacomo/prads/src"
make: *** [Makefile:15: build] Error 2
I've used the NPcap files with a symbolic link to the proper name as libpcap substitute.
I've also modified the src/Makefile to point to the proper lib location:
for finding static libraries
#LIBDIR=/usr/lib/x86_64-linux-gnu
LIBDIR=/usr/lib
But still don't work.
Do you have any ideas for fixing it?
The text was updated successfully, but these errors were encountered: