Skip to content
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

Closed
tpetazzoni opened this issue Jun 9, 2013 · 5 comments
Closed

Invalid hardcoded path in libpcap configure.in #305

tpetazzoni opened this issue Jun 9, 2013 · 5 comments

Comments

@tpetazzoni
Copy link
Contributor

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?

@infrastation
Copy link
Member

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

mfornero pushed a commit to mfornero/buildroot that referenced this issue Nov 5, 2013
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>
philenotfound pushed a commit to philenotfound/buildroot-cr15wi that referenced this issue Sep 23, 2014
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>
@guyharris
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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

@tpetazzoni
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants