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

Unable to compile Dropwatch for OpenWrt #76

Closed
francescoraves483 opened this issue Nov 27, 2022 · 1 comment
Closed

Unable to compile Dropwatch for OpenWrt #76

francescoraves483 opened this issue Nov 27, 2022 · 1 comment

Comments

@francescoraves483
Copy link

Hello,
I am trying to compile Dropwatch for OpenWrt, for an x86_64 platform based on the musl standard C library.
However, I am unable to complete the configuration of the project, both if I try compiling inside OpenWrt, or if I try cross-compiling the project from Ubuntu 20 LTS.

In the first case, "./configure" fails even if libnl is installed:

checking for LIBNL3... no
configure: error: libnl-3.0 is required

root@OpenWrt:~/dropwatch# opkg install libnl
Package libnl (3.3.0-1) installed in root is up to date.

I suppose this is probably due to the absence of libnl as a libXXX-dev package for OpenWrt.

When I try cross-compiling, instead, "./configure" returns an error on bfd.h:

/mnt/xtra/dropwatch$ ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-openwrt-linux-musl
[...]
checking whether we are cross compiling... yes
[...]
checking bfd.h usability... no
checking bfd.h presence... no
checking for bfd.h... no
configure: error: Couldn't find or include bfd.h

The procedure does not fail if I just run "./configure" without any cross-compilation option.

Is this due to Dropwatch non supporting OpenWrt or musl-based systems? Or am I doing something wrong in the configuration procedure?

Thank you very much in advance.

@nhorman
Copy link
Owner

nhorman commented Nov 27, 2022

bfd.h isn't part of either glibc or musl, its part of binutils. I suspect AC_CHECK_HEADERS in the configure.ac file is finding the bfd.h for the x86_64 platform when cross compiling, but unable to use it for the cross-build (its arch specific).

Your choices are:

  1. install the binutils package in your cross systree
  2. build without binutil support (i.e. ./configure --without-bfd). this is probably a good option as bfd support isn't really finished (kas support really obviates it)

@nhorman nhorman closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants