[Nut-upsdev] Cross-compiling for OpenWRT on Debian - neon libraries error

Charles Lepple clepple at gmail.com
Sat Sep 18 21:26:55 BST 2021


On Sep 16, 2021, at 6:30 AM, Seb Belcher via Nut-upsdev <nut-upsdev at alioth-lists.debian.net> wrote:
> 
> Bit of a noob question I'm sure but would appreciate the help.  The nut package maintained for OpenWRT does not include the netxml drivers that I need for my UPS, so I'm embarking on something a little outside my comfort zone and trying to cross-compile from source.  The build system is Debian. 
> 
> I've got quite far, and was able to cross-compile nut with default options but adding the --with-neon is breaking it.  I've installed the neon dev libraries on the build system and they seem to be detected during the configure stage
> ...
> checking for libneon version via pkg-config (0.25.0 minimum required)... 0.30.2 found
> checking for libneon cflags... -I/usr/include/neon
> checking for libneon ldflags... -lneon
> ...
> but then it quits with an error. 
> configure: error: "neon libraries not found, required for neon based XML/HTTP driver"
> 
> I've verified the neon header files are in /usr/include/neon beyond that, I'm at a loss.  Any help would be appreciated.  Thanks. 
> 
It's been a little while since I last used a cross-compiler, so maybe I am rusty on terminology. It sounds like you are building on a Debian system, but targeting OpenWRT - are they both the same architecture? (e.g. Debian on MIPS, and a WRT54G MIPS-based router)

If not, I would expect that your path for libneon would be a little longer, with the target architecture/OS included in there somewhere. (The include files might work across similar architectures, but the libraries are definitely going to have to match the target architecture/OS.)

For instance, you might need to install libneon into the Buildroot staging_dir if you are following these instructions:

https://openwrt.org/docs/guide-developer/crosscompile

then follow their recommendations on setting LDFLAGS (which should probably show up in NUT's ./configure output).


More information about the Nut-upsdev mailing list