snort3 / libdaq

LibDAQ: The Data AcQuisition Library
Other
45 stars 39 forks source link

add --disable-example #13

Closed ffontaine closed 3 years ago

ffontaine commented 3 years ago

Add --disable-example to be able to build daq on toolchains without threads support

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

snortadmin commented 3 years ago

This is to avoid a pthread dependency? Threading is kinda fundamental to the mission. What are you doing that you can't / won't provide the dependency?

ffontaine commented 3 years ago

The build failure is raised by buildroot autobuilders because all kind of embedded toolchains are tested and some of them can be built without threads support (e.g. uclibc). From my understanding of daq code, threads are only mandatory with pcap module and with this example but I can add a dependency to threads on daq if you think that this is best course of action.

ffontaine commented 3 years ago

Should I close this PR and disable daq on toolchains without threads on buildroot?

snortadmin commented 3 years ago

I think we want to do something for those toolchains. Not sure we should just change it to --disable-threads or do some autodetect foo.

@Xiche - thoughts?

Xiche commented 3 years ago

Looks reasonable to me like this. Autoconf checks for threading seems too special case to be worth it, but a switch to disable the examples seems reasonable.

ffontaine commented 3 years ago

Finally, I'm closing this PR as I found out that afpacket and bpf modules also depend on threads if libpcap is found. So, I'll had a threads dependency in buildroot.

snortadmin commented 3 years ago

Thanks for following up.