libpcap icon indicating copy to clipboard operation
libpcap copied to clipboard

Invalid hardcoded path in libpcap configure.in

Open tpetazzoni opened this issue 12 years ago • 3 comments
trafficstars

The libpcap configure.in contains V_INCLS="$V_INCLS -I/usr/include/libnl3", which is fundamentally wrong for cross-compilation.

Would it be possible to use pkg-config to detect libnl instead, and get the right cflags/ldflags?

tpetazzoni avatar Jun 09 '13 09:06 tpetazzoni

@dragorn (author of respective change), could you review and update? Thank you.

infrastation avatar Jun 09 '13 19:06 infrastation

Currently (as of 1.10), we try to find libnl3 using pkg-config, and only fall back on hardcoding the include path if that doesn't work.

If that doesn't suffice, it appears that either 1) we should change includes of netlink/XXX.h to includes of libnl3/netlink/XXX.h or 2) find the appropriately libnl3, for pkg-config-less configuring, in some fashion.

(Ultimately, I'd like to do 3) stop using libnl and talk to netlink in some other fashion.)

guyharris avatar May 11 '21 22:05 guyharris

And given that:

$ pkg-config --cflags libnl-genl-3.0
-I/usr/include/libnl3

solution 1) would be wrong (as it would break on a platform where pkg-config worked, unless we tweaked its output to remove the /libnl3, but that would probably be the wrong thing to do). I.e., it appears that the intent is that the -I flag argument used when building with libnl3 include /libnl3, presumably so that you can have multiple versions of libnl installed for developers.

guyharris avatar May 12 '21 08:05 guyharris

If 1.10 doesn't fix the problem, please speak up, otherwise we'll close this.

guyharris avatar Sep 28 '22 02:09 guyharris

Sorry for not following up on this. I confirm that 1.10 apparently fixed our issue, and we're now relying on the pkg-config based detection, which works fine. Thanks a lot!

tpetazzoni avatar Sep 28 '22 07:09 tpetazzoni