Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: cannot run cross compiled ARM binary on QEMU #20763
What version of Go are you using (
Working around QEMU bugs is not a priority for the Go team so I won't target this for any release, but we can keep it open for tracking. We test on real hardware. And QEMU in full system emulation mode works as well. But if somebody else wants to investigate this, it's all yours.
referenced this issue
Jun 26, 2017
Here is a patch for go which fixes the issue.
It might even be correct but I don't really know!
Maybe the issue should be re-opened?
See also ubuntu bug tracker.
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index a6efc0e3d1..64218e3f7e 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -132,7 +132,8 @@ const ( _CLONE_FS | /* share cwd, etc */ _CLONE_FILES | /* share fd table */ _CLONE_SIGHAND | /* share sig handler table */ - _CLONE_THREAD /* revisit - okay for now */ + _CLONE_THREAD | /* revisit - okay for now */ + _CLONE_SYSVSEM ) //go:noescape
Yikes. Clone and SysV semaphores. Two of my favorite things.
@ncw's patch is clearly safe and arguably even the right thing to do (though since Go never exits Go-created threads I don't think the difference is actually observable even if you tried, but I've got patches lined up that will change that). glibc passes
I'll send this as a CL in a bit (unless you want to send it @ncw).