Created attachment 210232 [details] patch http://thunderx1.nyi.freebsd.org/data/head-arm64-default/p520537_s355573/logs/errors/micro-1.4.1.log # github.com/zyedidia/micro/vendor/github.com/zyedidia/pty vendor/github.com/zyedidia/pty/pty_freebsd.go:50:20: undefined: fiodgnameArg vendor/github.com/zyedidia/pty/pty_freebsd.go:63:12: undefined: _C_SPECNAMELEN vendor/github.com/zyedidia/pty/pty_freebsd.go:66:9: undefined: fiodgnameArg see attached patch
(In reply to mikael.urankar from comment #0) I don't think fiodgnameArg needs additional padding, go implicitly aligns Buf to 8-byte boundary on aarch64: $ cat fiodgname_arg.c #include <stdio.h> #include <stddef.h> #include <sys/filio.h> int main(int argc, char *argv[]) { printf("len: %zu\n", offsetof(struct fiodgname_arg, len)); printf("buf: %zu\n", offsetof(struct fiodgname_arg, buf)); } $ cc -o fiodgname_arg fiodgname_arg.c && ./fiodgname_arg len: 0 buf: 8 $ cat fiodgname_arg.go package main import ( "fmt" "unsafe" ) type fiodgnameArg struct { Len int32 Buf *byte } func main() { x := fiodgnameArg{} fmt.Printf("x.Len: %d\n", unsafe.Offsetof(x.Len)) fmt.Printf("x.Buf: %d\n", unsafe.Offsetof(x.Buf)) } $ go run fiodgname_arg.go x.Len: 0 x.Buf: 8
(In reply to Dmitri Goutnik from comment #1) It was not obvious looking at the amd64 implementation. amd64 needs to be fixed?
Created attachment 210238 [details] patch
A commit references this bug: Author: swills Date: Mon Jan 6 13:48:48 UTC 2020 New revision: 522229 URL: https://svnweb.freebsd.org/changeset/ports/522229 Log: editors/micro: fix build on aarch64 PR: 242889 Submitted by: mikael.urankar@gmail.com Changes: head/editors/micro/files/ head/editors/micro/files/patch-vendor_github.com_zyedidia_pty_ztypes__freebsd__arm64.go
Committed, thanks!