openai / go-vncdriver

Fast VNC driver
MIT License
123 stars 60 forks source link

Build errors on macOS Sierra #7

Closed html5cat closed 7 years ago

html5cat commented 7 years ago

Getting a bunch of these trying to build on macOS Sierra. Am I missing any dependencies?

# github.com/openai/go-vncdriver/vendor/github.com/pixiv/go-libjpeg/jpeg
couldn't understand kern.osversion `16.1.0'
ld: warning: object file 
(/var/folders/tf/y27g06dd1lvd0zwyqlc577980000gn/T/go-build280452270/github.com/openai/go-vncdriver/vendor/github.com/pixiv/go-libjpeg/jpeg/_obj/_cgo_main.o) 
was built for newer OSX version (10.12) than being linked (10.4)
gdb commented 7 years ago

From the README: (On OSX newer than El Capitan, you may need to install golang from their site, and then just install brew install libjpeg-turbo.)

Can you check whether doing so works (i.e. not using go from Homebrew)?

html5cat commented 7 years ago

Tried that, same errors. Uninstalled brew version just in case.

yurik$ go version
go version go1.7.4 darwin/amd64

yurik$ which go
/usr/local/go/bin/go
gdb commented 7 years ago

@jeremyschlatter any ideas?

jeremyschlatter commented 7 years ago

Hmm. Not sure. I'm on macOS Sierra, too, so I might be able to repro.

@html5cat Did you brew install libjpeg-turbo? If so, can I see brew info libjpeg-turbo? May be worth checking brew doctor and brew config as well. Also, what command are you running to build? Can you try go build ./vncclient in the go-vncdriver directory?

jeremyschlatter commented 7 years ago

Homebrew/legacy-homebrew#40762 looks like a similar issue that was fixed by running xcode-select --install

casesandberg commented 7 years ago

Works for me after brew install libjpeg-turbo on Sierra with go@1.7.3

html5cat commented 7 years ago

@jeremyschlatter added Xcode tools earlier today.

yurik$ brew info libjpeg-turbo
jpeg-turbo: stable 1.5.1 (bottled), HEAD [keg-only]
JPEG image codec that aids compression and decompression
http://www.libjpeg-turbo.org/
/usr/local/Cellar/jpeg-turbo/1.5.1 (37 files, 2.6M)
  Poured from bottle on 2016-12-05 at 10:52:46
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jpeg-turbo.rb
==> Dependencies
Build: libtool ✔, nasm ✘
==> Options
--without-test
    Skip build-time checks (Not Recommended)
--HEAD
    Install HEAD version
html5cat commented 7 years ago

This looks interesting though:

yurik$ go build ./vncclient
vncclient/client.go:16:2: cannot find package "github.com/juju/errors" in any of:
    /usr/local/go/src/github.com/juju/errors (from $GOROOT)
    /Users/yurik/src/github.com/juju/errors (from $GOPATH)
vncclient/encoding.go:11:2: cannot find package "github.com/op/go-logging" in any of:
    /usr/local/go/src/github.com/op/go-logging (from $GOROOT)
    /Users/yurik/src/github.com/op/go-logging (from $GOPATH)
vncclient/client.go:17:2: cannot find package "github.com/openai/go-vncdriver/flexzlib" in any of:
    /usr/local/go/src/github.com/openai/go-vncdriver/flexzlib (from $GOROOT)
    /Users/yurik/src/github.com/openai/go-vncdriver/flexzlib (from $GOPATH)
vncclient/encoding.go:12:2: cannot find package "github.com/pixiv/go-libjpeg/jpeg" in any of:
    /usr/local/go/src/github.com/pixiv/go-libjpeg/jpeg (from $GOROOT)
    /Users/yurik/src/github.com/pixiv/go-libjpeg/jpeg (from $GOPATH)
html5cat commented 7 years ago

Sorry folks, somehow had export CC=gcc-4.2 in my .bash_profile. Removing it fixed the issue.