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

go: 1.5 darwin #9558

Closed
wants to merge 2 commits into from
Closed

go: 1.5 darwin #9558

wants to merge 2 commits into from

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Aug 30, 2015

Fixes build issues on Darwin.

I would prefer to keep CGO enabled but it seems like go 1.5 now depends on dsymutil and the Darwin stdenv provides a [dummy version of it](

# - dsymutil: soon going away once it goes into LLVM (this one is fake anyway)
.

Related issues:

@zimbatm zimbatm changed the title Go 1.5 darwin go: 1.5 darwin Aug 30, 2015
@zimbatm
Copy link
Member Author

zimbatm commented Aug 30, 2015

The build is failing due to OOM. What's the best way to work around that ?

@zimbatm zimbatm force-pushed the go-1.5-darwin branch 3 times, most recently from c4b4121 to dcb618e Compare August 30, 2015 20:16
@gridaphobe gridaphobe added the 6.topic: darwin Running or building packages on Darwin label Aug 30, 2015
@domenkozar
Copy link
Member

cc @wkennington @lethalman

@pesterhazy
Copy link
Contributor

This PR allows you to build go15Packages.go on Darwin, but go15Packages.crypto fails:

runtime/cgo
go install runtime/cgo: open /nix/store/awx3r2ha5aksx87wy64cz0wgfv7dcziy-go-1.5/share/go/pkg/darwin_amd64/runtime/cgo.a: permission denied

@zimbatm
Copy link
Member Author

zimbatm commented Sep 11, 2015

I had the issue where the go get commands will try to fetch cgo.a and fail, but it would still be working afterwards.

Another solution might be to provide the dsymutil util instead of using a shim.

@pesterhazy
Copy link
Contributor

@zimbatm this is what I get when I run nix-build -A go15Packages.crypto --show-trace ~/prg/nixpkg:

https://gist.github.com/pesterhazy/134a514b322d522737cb

i386 is not supported on Darwin and `sysctl` is not currently available in the
Darwin stdenv.
@zimbatm
Copy link
Member Author

zimbatm commented Sep 11, 2015

It's a bit of a hack but this fixes cgo building on OSX. @pesterhazy want to give it another shot at this branch ?

I'm sure there is a better way to bring the dsymutil tool into the environment. If anyone has suggestions I'm happy to make the changes.

@pesterhazy
Copy link
Contributor

@zimbatm, that definitely helps. go15packages.crypto now builds. However, go15packages15.text (and go15packages.net) now barf:

# golang.org/x/text/collate/tools/colcmp
/nix/store/59cqpi77rvqsr4zc4jqviz1cw7043wpv-go-1.5.1/share/go/pkg/tool/darwin_amd64/link: /nix/store/59cqpi77rvqsr4zc4jqviz1cw7043wpv-go-1.5.1/share/go/pkg/tool/darwin_amd64/link: combining dwarf failed: open /private/var/folders/rj/8lnf662s3mlgzv5mcq2r2fnc0000gn/T/nix-build-go1.5-text-2015-08-27.drv-2/go-link-257204833/go.dwarf: no such file or directory
builder for ‘/nix/store/lmgwldkrwmbrcmwg3a4fbxwi86namwd7-go1.5-text-2015-08-27.drv’ failed with exit code 1
error: build of ‘/nix/store/lmgwldkrwmbrcmwg3a4fbxwi86namwd7-go1.5-text-2015-08-27.drv’ failed

Might be an unrelated problem though.

@zimbatm
Copy link
Member Author

zimbatm commented Sep 12, 2015

I suspect that all cgo packages will need dsymutil as well, it seems like
the same issue.

On Sat, 12 Sep 2015 12:00 Paulus Esterhazy notifications@github.com wrote:

@zimbatm https://github.com/zimbatm, that definitely helps.
go15packages.crypto now builds. However, go15packages15.text (and
go15packages.net) now barf:

golang.org/x/text/collate/tools/colcmp

/nix/store/59cqpi77rvqsr4zc4jqviz1cw7043wpv-go-1.5.1/share/go/pkg/tool/darwin_amd64/link http://golang.org/x/text/collate/tools/colcmp/nix/store/59cqpi77rvqsr4zc4jqviz1cw7043wpv-go-1.5.1/share/go/pkg/tool/darwin_amd64/link: /nix/store/59cqpi77rvqsr4zc4jqviz1cw7043wpv-go-1.5.1/share/go/pkg/tool/darwin_amd64/link: combining dwarf failed: open /private/var/folders/rj/8lnf662s3mlgzv5mcq2r2fnc0000gn/T/nix-build-go1.5-text-2015-08-27.drv-2/go-link-257204833/go.dwarf: no such file or directory
builder for ‘/nix/store/lmgwldkrwmbrcmwg3a4fbxwi86namwd7-go1.5-text-2015-08-27.drv’ failed with exit code 1
error: build of ‘/nix/store/lmgwldkrwmbrcmwg3a4fbxwi86namwd7-go1.5-text-2015-08-27.drv’ failed

Might be an unrelated problem though.


Reply to this email directly or view it on GitHub
#9558 (comment).

@pesterhazy
Copy link
Contributor

I tried to investigate, but current master doesn't work on OSX anymore because of find params. The issue appears to be fixed in staging but on my lowly macbook air it takes too long to rebuild everything.

@zimbatm zimbatm closed this Feb 13, 2016
@zimbatm zimbatm deleted the go-1.5-darwin branch February 13, 2016 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants