-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: github.com/opencontainers/runc for riscv64 build error #58861
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
Comments
cc @golang/riscv64 |
It seems cross-compile issue, I can build and run runc on linux riscv64 box without problem. |
which version runc and go? I use go version 1.19 on qemuriscv64, also failed. |
On my visionfive2(Engineering Release 69, linux 5.15) go1.20. |
yes, qemuriscv64 can build runc with libseccomp.so successfully, it's cross-compile bug. |
I'm closing this issue for now. |
enable debug: | go build github.com/seccomp/libseccomp-golang: so add the following will resolve this issue: thanks a lot, no problem |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
cross-compile runc for riscv64:
zhangze@zhangze-virtual-machine:~/source/runc$ GOARCH=riscv64 make
go build -x -v -p 1 -work -trimpath "-buildmode=pie" -tags "seccomp urfave_cli_no_docs" -ldflags "-X main.gitCommit=v1.1.0-415-g58c192a1-dirty -X main.version=1.1.0+dev " -o runc . &> ok_riscv.txt
make: *** [Makefile:61: runc] Error 1
What did you expect to see?
get runc binary for riscv64
What did you see instead?
use single thread compile, when build stop get here, no error
........
cd /home/zhangze/source/runc
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/b216/pkg.a -trimpath "/usr/local/go/src/os/signal=>os/signal;$WORK/b216=>" -p os/signal -std -installsuffix shared -buildid S3IUt_jZSvoWGaSdfmtY/S3IUt_jZSvoWGaSdfmtY -goversion go1.20 -symabis $WORK/b216/symabis -shared -c=16 -nolocalimports -importcfg $WORK/b216/importcfg -pack -asmhdr $WORK/b216/go_asm.h /usr/local/go/src/os/signal/doc.go /usr/local/go/src/os/signal/signal.go /usr/local/go/src/os/signal/signal_unix.go
cd /usr/local/go/src/os/signal
/usr/local/go/pkg/tool/linux_amd64/asm -p os/signal -trimpath "/usr/local/go/src/os/signal=>os/signal;$WORK/b216=>" -I $WORK/b216/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_riscv64 -shared -o $WORK/b216/sig.o ./sig.s
/usr/local/go/pkg/tool/linux_amd64/pack r $WORK/b216/pkg.a $WORK/b216/sig.o # internal
/usr/local/go/pkg/tool/linux_amd64/buildid -w $WORK/b216/pkg.a # internal
cp $WORK/b216/pkg.a /home/zhangze/.cache/go-build/58/582849006a0f4de5257286dfde3db9c85b50af607c3eabdd279820266e8b2c87-d # internal
because make enable seccomp by default, so cgo for riscv is needed, I heared riscv64 CGO support has been upstream, yes?
At least go build should give some error output.
=======================
if build in yocto for riscv:
https://github.com/riscv/meta-riscv
enable seccomp tag, result is the same as previous one.
disable seccomp tag, so no cgo will be used, then build is OK.
The text was updated successfully, but these errors were encountered: