Skip to content
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

Package fails to compile under go-1.12 #30777

Closed
mouse07410 opened this issue Mar 12, 2019 · 2 comments
Closed

Package fails to compile under go-1.12 #30777

mouse07410 opened this issue Mar 12, 2019 · 2 comments

Comments

@mouse07410
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.12 darwin/amd64
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.3
BuildVersion:	18D109
$ 

Does this issue reproduce with the latest release?

The latest release is exactly what seems to have caused it.

What operating system and processor architecture are you using (go env)?

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ur20980/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ur20980/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/go-build347467007=/tmp/go-build -gno-record-gcc-switches -fno-common"
$ 

What did you do?

Tried to compile/build https://github.com/Yubico/yubihsm-connector

What did you expect to see?

Like what go-1.11.5 was giving to another user:

$ git clone git@github.com:Yubico/yubihsm-connector.git
Cloning into 'yubihsm-connector'...
remote: Enumerating objects: 1314, done.
remote: Counting objects: 100% (1314/1314), done.
remote: Compressing objects: 100% (994/994), done.
remote: Total 1314 (delta 213), reused 1312 (delta 212), pack-reused 0
Receiving objects: 100% (1314/1314), 2.34 MiB | 4.17 MiB/s, done.
Resolving deltas: 100% (213/213), done.
$ cd yubihsm-connector/
$ make
github.com/hashicorp/hcl/hcl/strconv
github.com/kardianos/service
github.com/magiconair/properties
github.com/mitchellh/mapstructure
github.com/spf13/pflag
github.com/spf13/afero/mem
github.com/spf13/jwalterweatherman
github.com/spf13/cast
golang.org/x/text/transform
github.com/hashicorp/hcl/hcl/token
github.com/pelletier/go-toml
golang.org/x/sys/unix
github.com/spf13/cobra
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/json/token
golang.org/x/text/unicode/norm
golang.org/x/crypto/ssh/terminal
github.com/fsnotify/fsnotify
github.com/hashicorp/hcl/hcl/parser
github.com/hashicorp/hcl/json/scanner
github.com/sirupsen/logrus
github.com/hashicorp/hcl/hcl/printer
github.com/hashicorp/hcl/json/parser
gopkg.in/yaml.v2
github.com/spf13/afero
github.com/sirupsen/logrus/hooks/syslog
github.com/hashicorp/hcl
github.com/spf13/viper
cgo-gcc-prolog:186:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
/usr/local/include/libusb-1.0/libusb.h:1299:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
/usr/local/include/libusb-1.0/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
github.com/thorduri/go-libusb/usb
yubihsm-connector
$ go version
go version go1.11.5 darwin/amd64
$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.14.3
BuildVersion:	18D109

What did you see instead?

$ make
github.com/hashicorp/hcl/hcl/strconv
github.com/spf13/jwalterweatherman
github.com/spf13/afero/mem
golang.org/x/text/transform
github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/token
github.com/kardianos/service
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/json/scanner
github.com/spf13/cast
github.com/mitchellh/mapstructure
github.com/magiconair/properties
github.com/hashicorp/hcl/hcl/parser
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/hcl/printer
golang.org/x/sys/unix
github.com/hashicorp/hcl
github.com/pelletier/go-toml
golang.org/x/text/unicode/norm
github.com/fsnotify/fsnotify
github.com/spf13/pflag
golang.org/x/crypto/ssh/terminal
github.com/sirupsen/logrus
github.com/sirupsen/logrus/hooks/syslog
github.com/spf13/cobra
gopkg.in/yaml.v2
github.com/spf13/afero
github.com/spf13/viper
cgo-gcc-prolog:194:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
/opt/local/include/libusb-1.0/libusb.h:1299:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
/opt/local/include/libusb-1.0/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
github.com/thorduri/go-libusb/usb
golang.org/x/sys/unix.kevent: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.ioctl: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.Close: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.Kqueue: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.Open: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.mmap: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.munmap: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
# yubihsm-connector
yubihsm-connector
FATAL: command "build" failed: exit status 2
make: *** [build] Error 1
$ 
@ianlancetaylor
Copy link
Member

You need to update to the current version of the golang.org/x/sys/unix package. Note that it has been vendored into yubihsm-connector so you likely need to update the vendored copy.

@mouse07410
Copy link
Author

mouse07410 commented Mar 12, 2019

@ianlancetaylor that does not seem to help:

$ gb vendor update --all
$ make
github.com/hashicorp/hcl/hcl/strconv
github.com/spf13/jwalterweatherman
github.com/spf13/afero/mem
golang.org/x/text/transform
github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/token
github.com/kardianos/service
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/json/scanner
github.com/spf13/cast
github.com/hashicorp/hcl/hcl/parser
github.com/magiconair/properties
github.com/mitchellh/mapstructure
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/hcl/printer
github.com/hashicorp/hcl
golang.org/x/text/unicode/norm
golang.org/x/sys/unix
github.com/pelletier/go-toml
github.com/fsnotify/fsnotify
golang.org/x/crypto/ssh/terminal
github.com/spf13/pflag
gopkg.in/yaml.v2
github.com/sirupsen/logrus
github.com/spf13/afero
github.com/sirupsen/logrus/hooks/syslog
github.com/spf13/cobra
github.com/spf13/viper
cgo-gcc-prolog:194:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
/opt/local/include/libusb-1.0/libusb.h:1299:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
/opt/local/include/libusb-1.0/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
github.com/thorduri/go-libusb/usb
golang.org/x/sys/unix.libc_close_trampoline·f: relocation target golang.org/x/sys/unix.libc_close_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_ioctl_trampoline·f: relocation target golang.org/x/sys/unix.libc_ioctl_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_kevent_trampoline·f: relocation target golang.org/x/sys/unix.libc_kevent_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_kqueue_trampoline·f: relocation target golang.org/x/sys/unix.libc_kqueue_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_mmap_trampoline·f: relocation target golang.org/x/sys/unix.libc_mmap_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_munmap_trampoline·f: relocation target golang.org/x/sys/unix.libc_munmap_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_open_trampoline·f: relocation target golang.org/x/sys/unix.libc_open_trampoline not defined for ABIInternal (but is defined for ABI0)
# yubihsm-connector
yubihsm-connector
FATAL: command "build" failed: exit status 2
make: *** [build] Error 1
$ 

And please do not close the issue until it's clear it has been resolved.

Update
I don't know if this is of any help, but gb has been updated to its latest version. Unfortunately, it does not seem to report its own version. This is all I can get from it:

$ gb env
GB_PROJECT_DIR="/Users/ur20980/src/yubihsm-connector"
GB_SRC_PATH="/Users/ur20980/src/yubihsm-connector/src:/Users/ur20980/src/yubihsm-connector/vendor/src"
GB_PKG_DIR="/Users/ur20980/src/yubihsm-connector/pkg/darwin-amd64"
GB_BIN_SUFFIX="-darwin-amd64"
GB_GOROOT="/usr/local/go"
$ gb info
GB_PROJECT_DIR="/Users/ur20980/src/yubihsm-connector"
GB_SRC_PATH="/Users/ur20980/src/yubihsm-connector/src:/Users/ur20980/src/yubihsm-connector/vendor/src"
GB_PKG_DIR="/Users/ur20980/src/yubihsm-connector/pkg/darwin-amd64"
GB_BIN_SUFFIX="-darwin-amd64"
GB_GOROOT="/usr/local/go"
$

@golang golang locked and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants