-
Notifications
You must be signed in to change notification settings - Fork 189
Will not compile with libpcap.1.9.0 #245
Comments
This occurs when trying to compile with libpcap.1.9.0 |
Well, it seems this project is pretty abandoned, isn't? |
I have the same problem as you,Have you solved it? |
I switched to previous version of libpcap, however, you can compile barnyard2 in separate directory from snort with libpcap 1.9.0. |
I switched to libpcap-1.8.1 or libpcap-1.5.3,then compile barnyard2 also display below error : |
This worked for me: |
So as long as snort and barnyard2 are in separate directories, it's possible to build them both with libpcap 1.9. Am I understanding that correctly? |
Actually snort and barnyard2 is in separate directories, but this error is along exist,I haven't found a solution yet. |
Hi |
Thanks,then I successfully reinstalled it with libpcap-1.8.1. |
My pull request here fixes this particular issue: #254 |
I am grateful for this great service! Thank you so very much. |
Works fine. Thank you. Why isn't this merged yet? |
Hi
It's compatible with libpcap 1.8.1
…On Wed, Nov 11, 2020, 03:15 Mehrshad ***@***.***> wrote:
Hi
you can compile with libpcap-1.8.1
How ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMFN7SPWZYSFAIPX33XGU33SPHGAHANCNFSM4GRG4IFQ>
.
|
I'm sorry for my poor English. My environment is Ubuntu 20.04 LTS. I have some questions. I use "apt" command to manage package. (1) (2) (3) Then, when I executed "snort -V", result includes a sentence of "Using libpcap version 1.9.1". What should I do to make this sentence "Using libpcap version 1.8.1"? I'm sorry for many questions. |
What you did in (3) should allow you to build barnyard2. |
Sorry for the late reply. It worked. Thank you very much! |
Hi to all! I have a problem! I'm trying to build barnyard2 on ubuntu 22.04. But some errors arise. As i saw from previous comments it happens because of libpcap 1.9.1. If its true, please provide me with strict commands for reinstalling libpcap to 1.8.1 version! Thank you! |
Hello! Do you still remember how you reinstall libpcap? |
Doing so can cause namespace collisions, as per, for example, firnsy/barnyard2#245. Instead, define PCAP_SOCKET, and use that. On Windows, this shouldn't break any APIs, as any code using the two active-mode APIs that return a socket handle would probably be assigning their return values to a SOCKET, and as, on Windows, we're defining PCAP_SOCKET as SOCKET, there would be no type clash. On UN*Xes, this might break code that uses one of the two active-mode APIs that return a socket handle if those programs were written to assign the return values of those APIs to a SOCKET, as we're no longer defining SOCKET. However, as those APIs are only provided if libpcap is built with remote capture support - which is not the default - and as they're somewhat painful to use, there's probably little if any code that needs to compile for UN*X and that uses them. If there *is* any such code, it could do #ifndef PCAP_SOCKET #ifdef _WIN32 #define PCAP_SOCKET SOCKET #else #defube PCAP_SOCKET int #endif #endif and use PCAP_SOCKET.
I am unable to make barnyard2-master with the latest libpcap.1.9.0. Works fine with libpcap.1.8.1. Below is the error I receive:
make all-recursive
make[1]: Entering directory
/home/analyst/installation_files/barnyard2-master' Making all in src make[2]: Entering directory
/home/analyst/installation_files/barnyard2-master/src'Making all in sfutil
make[3]: Entering directory
/home/analyst/installation_files/barnyard2-master/src/sfutil' gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c getopt_long.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sfmemcap.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sfprimetable.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sfxhash.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sf_ip.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sf_iph.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sf_ipvar.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sf_textlog.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c sf_vartable.c rm -f libsfutil.a ar cru libsfutil.a getopt_long.o sfmemcap.o sfprimetable.o sfxhash.o sf_ip.o sf_iph.o sf_ipvar.o sf_textlog.o sf_vartable.o ranlib libsfutil.a make[3]: Leaving directory
/home/analyst/installation_files/barnyard2-master/src/sfutil'Making all in output-plugins
make[3]: Entering directory
/home/analyst/installation_files/barnyard2-master/src/output-plugins' gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_arubaaction.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_bro.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_cef.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_csv.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_fast.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_full.c gcc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil -I/opt/snort/include -DDEBUG -g -O0 -fno-strict-aliasing -Wall -c spo_alert_fwsam.c make[3]: Leaving directory
/home/analyst/installation_files/barnyard2-master/src/output-plugins'make[2]: Leaving directory
/home/analyst/installation_files/barnyard2-master/src' make[1]: Leaving directory
/home/analyst/installation_files/barnyard2-master'In file included from ../decode.h:49:0,
from ../plugbase.h:70,
from ../spooler.h:32,
from ../barnyard2.h:52,
from spo_alert_fwsam.c:91:
/opt/snort/include/sfbpf_dlt.h:642:0: warning: "DLT_IEEE802_15_4" redefined [enabled by default]
#define DLT_IEEE802_15_4 195
^
In file included from /opt/snort/include/pcap/bpf.h:109:0,
from /opt/snort/include/pcap/pcap.h:88,
from /opt/snort/include/pcap.h:43,
from ../barnyard2.h:46,
from spo_alert_fwsam.c:91:
/opt/snort/include/pcap/dlt.h:749:0: note: this is the location of the previous definition
#define DLT_IEEE802_15_4 DLT_IEEE802_15_4_WITHFCS
^
In file included from /opt/snort/include/pcap.h:43:0,
from ../barnyard2.h:46,
from spo_alert_fwsam.c:91:
/opt/snort/include/pcap/pcap.h:950:18: error: two or more data types in declaration specifiers
#define SOCKET int
^
spo_alert_fwsam.c:118:13: note: in expansion of macro ‘SOCKET’
typedef int SOCKET;
^
spo_alert_fwsam.c:118:1: warning: useless type name in empty declaration [enabled by default]
typedef int SOCKET;
^
spo_alert_fwsam.c: In function ‘AlertFWsam’:
spo_alert_fwsam.c:981:18: warning: variable ‘cn’ set but not used [-Wunused-but-set-variable]
ClassType *cn = NULL;
^
spo_alert_fwsam.c:973:27: warning: variable ‘lastbsp’ set but not used [-Wunused-but-set-variable]
static unsigned short lastbsp[FWSAM_REPET_BLOCKS];
^
make[3]: *** [spo_alert_fwsam.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: