flannel-io / flannel

flannel is a network fabric for containers, designed for Kubernetes
Apache License 2.0
8.6k stars 2.87k forks source link

riscv64 build failure #1988

Open glevand opened 3 weeks ago

glevand commented 3 weeks ago

Hi,

I maintain the flannel package in buildroot. One of the buildroot target architectures is riscv64. The riscv64 flannel build has been failing lately.

riscv64 | flannel-0.25.1 | http://autobuild.buildroot.net/results/d2be77d8b9236db45c4f3a558f3198f199c0c568

That autobuild.buildroot.net link has the build log (build-end.log), and has this error and comment:

github.com/flannel-io/flannel $WORK/b051/pkg.a(_x001.o): unknown relocation type 17; compiled without -fpic? $WORK/b060/pkg.a(_x005.o): unknown relocation type 17; compiled without -fpic? make: *** [package/pkg-generic.mk:283: /home/buildroot/instance-0/output-1/build/flannel-0.25.1/.stamp_built] Error 1 make: Leaving directory '/home/buildroot/instance-0/buildroot'

I don't have an riscv64 development setup to test with. Is the.fix as simple as adding -fpic to the flannel makefile?

-Geoff

thomasferrandiz commented 3 weeks ago

Hi, I'm not familiar with this flag (-fpic) but I see in the log file you mentioned that you have CGO_ENABLED=1 while in our riscv64 build, CGO is disabled. We only support enabling cgo for amd64 at the moment.