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

cmd/go: go get -u golang.org/x/vgo: sys/socket.h not found on macOS 10.13.4 #25560

Closed
SergeyParamoshkin opened this issue May 25, 2018 · 4 comments
Closed

Comments

@SergeyParamoshkin
Copy link

@SergeyParamoshkin SergeyParamoshkin commented May 25, 2018

Hi! I have the problem. I trying to get vgo as written in documentation, but I get error. what am i doing wrong?

$ go version
go version go1.10.2 darwin/amd64
OS X High Sierra 10.13.4
$ go get -u golang.org/x/vgo
# net
In file included from /usr/local/go/src/net/cgo_bsd.go:11:
In file included from /usr/include/netdb.h:91:
/usr/include/netinet/in.h:81:10: fatal error: 'sys/socket.h' file not found
#include <sys/socket.h>
         ^~~~~~~~~~~~~~
1 error generated.
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ softwareupdate -i -r
Software Update Tool

Finding available software
No updates are available.

I try reinstall golang and vgo ( remove binary and sources), but it didn't help me.

@SergeyParamoshkin

This comment has been minimized.

Copy link
Author

@SergeyParamoshkin SergeyParamoshkin commented May 25, 2018

I made workaround.

sudo ln -svf /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h /usr/include/sys/socket.h 

thereafter vgo installed successful. maybe have more beautiful solution ?

@SergeyParamoshkin SergeyParamoshkin changed the title error downloading vgo x/vgo: error downloading vgo May 25, 2018
@gopherbot gopherbot added this to the vgo milestone May 25, 2018
@bcmills bcmills changed the title x/vgo: error downloading vgo x/vgo: sys/socket.h not found when installing on OS X High Sierra May 30, 2018
@bcmills bcmills added the OS-Darwin label May 30, 2018
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented May 30, 2018

I try reinstall golang and vgo ( remove binary and sources), but it didn't help me.

How did you install the Go toolchain? (The official distribution, brew, or something else?)

What is the output of the following commands on your machine?

  • which $(go env CC)
  • $(go env CC) --version
@SergeyParamoshkin

This comment has been minimized.

Copy link
Author

@SergeyParamoshkin SergeyParamoshkin commented May 31, 2018

Hi @bcmills, I use official distribution for MacOS

$ which $(go env CC)
/usr/bin/clang
$ $(go env CC) --version
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@rsc rsc changed the title x/vgo: sys/socket.h not found when installing on OS X High Sierra cmd/go: go get -u golang.org/x/vgo: sys/socket.h not found on macOS 10.13.4 Jun 6, 2018
@rsc rsc modified the milestones: vgo, Go1.11 Jun 6, 2018
@bcmills bcmills added help wanted and removed WaitingForInfo labels Jun 12, 2018
@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Go1.12 Jul 6, 2018
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Nov 13, 2018

I'm still not sure what the problem is here, but I haven't seen any further reports of this, and the vgo repository is mostly not needed now that Go 1.11 is released (with preliminary module support).

I don't think we'll be able to get to this. If you have a similar issue installing the Go toolchain itself, please file a new issue.

@bcmills bcmills closed this Nov 13, 2018
@golang golang locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.