This code: > package headers > > import "syscall" > > var IpccallLookup = map[int]string{ > syscall.SYS_SEMOP: "semop", > syscall.SYS_SEMGET: "semget", > syscall.SYS_SEMCTL: "semctl", > 4: "semtimedop", > syscall.SYS_MSGSND: "msgsnd", > syscall.SYS_MSGRCV: "msgrcv", > syscall.SYS_MSGGET: "msgget", > syscall.SYS_MSGCTL: "msgctl", > syscall.SYS_SHMAT: "shmat", > syscall.SYS_SHMDT: "shmdt", > syscall.SYS_SHMGET: "shmget", > syscall.SYS_SHMCTL: "shmctl", > } Fails to build even though these syscalls exist in the system: > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:7:2: undefined: syscall.SYS_SEMOP > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:8:2: undefined: syscall.SYS_SEMGET > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:9:2: undefined: syscall.SYS_SEMCTL > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:11:2: undefined: syscall.SYS_MSGSND > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:12:2: undefined: syscall.SYS_MSGRCV > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:13:2: undefined: syscall.SYS_MSGGET > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:14:2: undefined: syscall.SYS_MSGCTL > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:15:2: undefined: syscall.SYS_SHMAT > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:16:2: undefined: syscall.SYS_SHMDT > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:17:2: undefined: syscall.SYS_SHMGET > ../go/src/github.com/mozilla/mig/vendor/github.com/mozilla/libaudit-go/headers/ipc_tab.go:17:2: too many errors go-1.10.3
From the official documentation: NOTE: This package is locked down. Code outside the standard Go repository should be migrated to use the corresponding package in the golang.org/x/sys repository. That is also where updates required by new systems or versions should be applied. Signal, Errno and SysProcAttr are not yet available in golang.org/x/sys and must still be referenced from the syscall package. See https://golang.org/s/go1.4-syscall for more information. Syscalls are maintained outside the go standard packages, this is out of the scope of the lang/go port.