In my Makefile I have this to crosscompile for my rpi0w, rpi02w and rpi4:
release_files: clean
@mkdir build
@echo building for linux/amd64 ...
@CGO_ENABLED=1 GOARCH=amd64 GOOS=linux $(MAKE) build
@openssl dgst -sha256 "build/bettercap" > "build/bettercap-amd64.sha256"
@zip -j "build/bettercap-$(VERSION)-amd64.zip" build/bettercap build/bettercap-amd64.sha256 > /dev/null
@rm -rf build/bettercap build/bettercap-amd64.sha256
@echo building for linux/armhf ...
@CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc GOARM=6 GOARCH=arm GOOS=linux $(MAKE) build
@openssl dgst -sha256 "build/bettercap" > "build/bettercap-armhf.sha256"
@zip -j "build/bettercap-$(VERSION)-armhf.zip" build/bettercap build/bettercap-armhf.sha256 > /dev/null
@rm -rf build/pwngrid build/bettercap-armhf.sha256
@echo building for linux/aarch64 ...
@CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc GOARCH=arm64 GOOS=linux $(MAKE) build
@openssl dgst -sha256 "build/bettercap" > "build/bettercap-aarch64.sha256"
@zip -j "build/bettercap-$(VERSION)-aarch64.zip" build/bettercap build/bettercap-aarch64.sha256 > /dev/null
@rm -rf build/pwngrid build/bettercap-aarch64.sha256
@ls -la build
The amd64 building part works, as I'm on an AMD64 laptop. But the armhf and aarch64 parts fail. I have the cross-compilers (arm-linux-gnueabihf and aarch64-linux-gnu) installed. But I get the following errors. But I cannot find any way to compiling them or installing them accordingly.
/usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lnetfilter_queue: No such file or directory
/usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lnfnetlink: No such file or directory
Any help would be greatly appreciated. I'm most likely to be searching for the wrong keywords on Google.