Closed jeremyherbert closed 6 years ago
Given that a specific version of libmpsse is required, is there a reason that libmpsse isn't just included in this repository ? It could be bundled into libloragw fairly easily. I can provide a pull request for this.
Thanks for your feedback! We're trying to keep the repository clean, so we'd like to avoid storing libmpsse
in it. However, it would probably be a good idea to specify more explicitly in the docs which version of lmpsse to download, and how to install it.
I actually think that the docs for how to do it are pretty good. The problem for me here is that some linker flags are missing in the go wrapper.
I'd rather not add those linker flags in the Go files, since libmpsse
is only required for FTDI builds - for which we plan to drop support mid-term. It'd also mean every developer would have to install libmpsse
to develop, even for SPI gateways...
Another solution could be to move all the cgo flags in the Makefile. What do you think?
That sounds like a much better idea!
Do you have any plans to support a USB-based setup then?
When building the packet forwarder, I get the following errors:
Looking closer at the files in the wrapper directory, it seems that the cgo flags are not set to link
libmpsse
. One cannot useCGO_LDFLAGS
because the order of linker arguments matters, and that appends it onto the end of the existing args. The correct line in the variouswrapper/*.go
files should be:// #cgo LDFLAGS: -lm -lmpsse ${SRCDIR}/../lora_gateway/libloragw/libloragw.a
Yes, I realise this breaks other the non-ftdi builds. Still trying to work out how to solve that.
Environment