-
Notifications
You must be signed in to change notification settings - Fork 852
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
Invalid hardcoded path in libpcap configure.in #305
Comments
@dragorn (author of respective change), could you review and update? Thank you. |
When libpcap detects that libnl3 is available, it hardcodes the fact of using -I/usr/include/libnl3, which is completely wrong in cross-compilation. This commit fixes that, by removing this hardcoded include path, and by passing an appropriate -I option from libpcap.mk. The original issue has been reported upstream at the-tcpdump-group/libpcap#305. Fixes: http://autobuild.buildroot.net/results/b65/b6585bf2985a188e797e5a6b71a35c461421e3b4/build-end.log Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
When libpcap detects that libnl3 is available, it hardcodes the fact of using -I/usr/include/libnl3, which is completely wrong in cross-compilation. This commit fixes that, by removing this hardcoded include path, and by passing an appropriate -I option from libpcap.mk. The original issue has been reported upstream at the-tcpdump-group/libpcap#305. Fixes: http://autobuild.buildroot.net/results/b65/b6585bf2985a188e797e5a6b71a35c461421e3b4/build-end.log Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
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.) |
And given that:
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 |
If 1.10 doesn't fix the problem, please speak up, otherwise we'll close this. |
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! |
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?
The text was updated successfully, but these errors were encountered: