-
Notifications
You must be signed in to change notification settings - Fork 38
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
osx fixes for go 1.11 #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐸
@vdemeester @thaJeztah PTAL |
@kolyshkin I do have a Mac developer subscription; would it be cleaner to update the package we have at dockerproject.org? |
I think we can reuse the one from this PR, it works fine and needs nothing. It would be awesome though if you can upload it to s3.dockerproject.org. I tried to do it myself, logged in to aws successfully (using kir / docker-core credentials) but accessing S3 gives me "access denied". |
i'll put it up (working on getting the cache to play nice) |
|
This is a 3-in-1 story. Please have a seat. 1. As Go 1.11 release notes say, > Go 1.11 now requires <...> macOS 10.10 Yosemite or later So, change the OSX_VERSION_MIN in osxcross to 10.10. 2. MACOSX SDK tarball that was used before comes without libc++ headers, which are now required by at least crypto/x509 pkg when compiling for Darwin. These include files are part of xcode, which can only be downloaded by someone having Apple Developer ID, which I don't have so this path is not available for me. An alternative is to reuse the SDK tarball from the https://github.com/multiarch/crossbuild project. Using it fixes the following error: > # crypto/x509 > osxcross: error: cannot find libc++ headers 3. The new tarball, although, misses the libtool package (apparently somehow injected into the tarball that was used earlier) needed to compile miekg/pkcs11 used by cli, which leads to errors like: > # github.com/docker/cli/vendor/github.com/miekg/pkcs11 > vendor/github.com/miekg/pkcs11/pkcs11.go:28:10: fatal error: 'ltdl.h' file not found > #include <ltdl.h> > ^ > 1 error generated. To fix this one, libtool for osx need to be installed. Building it from source (with osxcross) requires some other dependencies. Using brew is not possible since it is Linux. Solution: download a binary package from brew repo, cherry pick the needed stuff (lib and include). Tested to fix docker-cli compilation issues on OSX. Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Updated:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As per @thaJeztah suggestion I rolled back go version to The only problem with that is we already have a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Starting in Go 1.11, OSX 10.9 is no longer supported and building using the `builder` (which uses osxcross internally) fails. Updating this requires supplying an updated SDK and specifying the new minimum version (10.10), though apparently there are some complications regarding the SDK file to use. Luckily, I found that others had already solved the [same problem] and we can reuse their SDK archive. [same problem]: docker/golang-cross#11 (comment) Release note: None
34036: builder: target OSX 10.10+ r=petermattis a=tbg Starting in Go 1.11, OSX 10.9 is no longer supported and building using the `builder` (which uses osxcross internally) fails. Updating this requires supplying an updated SDK and specifying the new minimum version (10.10), though apparently there are some complications regarding the SDK file to use. Luckily, I found that others had already solved the [same problem] and we can reuse their SDK archive. [same problem]: docker/golang-cross#11 (comment) Release note: None Co-authored-by: Tobias Schottdorf <[email protected]>
This is a 3-in-1 story. Please have a seat.
Part 1.
Go 1.11 release notes say:
So, change the
OSX_VERSION_MIN
inosxcross
to10.10
.Part 2.
MACOSX SDK tarball that was used before comes without libc++
headers, which are now required by at least crypto/x509 pkg
when compiling for Darwin. These include files are part of xcode,
which can only be downloaded by someone having Apple Developer ID,
which I don't have so this path is not available for me.
An alternative is to reuse the SDK tarball from the
https://github.com/multiarch/crossbuild project. Using it
fixes the following error:
Part 3.
The new tarball, although, misses the libtool package (apparently
somehow injected into the tarball that was used earlier) needed to
compile miekg/pkcs11 used by cli, which leads to errors like:
To fix this one, libtool for osx need to be installed. Building it from
source (with osxcross) requires some other dependencies. Using brew is not
possible since it is Linux. Solution: download a binary package from brew
repo, cherry pick the needed stuff (lib and include).
Tested to fix docker-cli compilation issues on OSX using Go 1.11.