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

Update golang to 1.13.0 #45

Closed
wants to merge 1 commit into from
Closed

Conversation

tao12345666333
Copy link
Contributor

@tao12345666333 tao12345666333 commented Oct 1, 2019

replcace #39

Copy link

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no plan to keep this sdk file hosted there, it's just there for demonstration purpose.

ADD https://s3.dockerproject.org/darwin/v2/${OSX_SDK}.tar.xz "${OSX_CROSS_PATH}/tarballs/${OSX_SDK}.tar.xz"
# ADD https://s3.dockerproject.org/darwin/v2/${OSX_SDK}.tar.xz "${OSX_CROSS_PATH}/tarballs/${OSX_SDK}.tar.xz"
# FIXME: upload to s3.dockerproject.org
ADD https://github.com/ndeloof/golang-cross/raw/113fix/${OSX_SDK}.tar.xz "${OSX_CROSS_PATH}/tarballs/${OSX_SDK}.tar.xz"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the SDK https://github.com/phracker/MacOSX-SDKs, but unfortunately it lacks the necessary headers file.
I got some error like this:

testing o32-clang ... osxcross: error: cannot find libc++ headers
osxcross: error: while detecting target

The full job can be found here https://gitlab.com/taobeier/golang-cross/-/jobs/308408417

Later I chose the SDK build by @ndeloof It works well. https://gitlab.com/taobeier/golang-cross/-/jobs/309123113

I think we shoud upload new version SDK to s3.dockerproject.org @thaJeztah

ARG OSX_SDK=MacOSX10.10.sdk
ARG OSX_SDK_SUM=631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789
ARG OSX_SDK=MacOSX10.11.sdk
ARG OSX_SDK_SUM=98cdd56e0f6c1f9e1af25e11dd93d2e7d306a4aa50430a2bc6bc083ac67efbb8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the SDK uploads to s3.dockerproject.org, I can change here. (If you want to re-generate it)

@tao12345666333
Copy link
Contributor Author

I have no plan to keep this sdk file hosted there, it's just there for demonstration purpose.

Yep. We will upload it to s3.dockerproject . (Just because I didn't rebuild it 😄

@tao12345666333
Copy link
Contributor Author

Successfully tagged docker-cli-cross:latest
docker run --rm -e VERSION=19.09.0-dev -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS -e GOOS -e GOARCH -e GOARM -v "/builds/taobeier/golang-cross/cli":/go/src/github.com/docker/cli -v "docker-cli-dev-cache:/root/.cache/go-build"  docker-cli-cross make cross
./scripts/build/cross
Building binaries for all platforms
Generating windows resources
Building build/docker-windows-amd64
/go/src/github.com/docker/cli/scripts/gen/../winresources/common.rc:11: digit exceeds base
/go/src/github.com/docker/cli/scripts/gen/../winresources/common.rc:12: digit exceeds base
/go/src/github.com/docker/cli/scripts/gen/../winresources/common.rc:11: digit exceeds base
/go/src/github.com/docker/cli/scripts/gen/../winresources/common.rc:12: digit exceeds base
Building build/docker-darwin-amd64
Building statically linked build/docker-linux-amd64
Building statically linked build/docker-linux-arm
Building statically linked build/docker-linux-ppc64le
Building statically linked build/docker-linux-s390x

Using GitLab CI test the cli's build job. https://gitlab.com/taobeier/golang-cross/-/jobs/309123114

@ndeloof
Copy link

ndeloof commented Oct 1, 2019

IIUC from a legal PoV we are not allowed to host sdk (derived from xcode) on a public s3, which can be considered a form of "redistribution".

@tao12345666333
Copy link
Contributor Author

I have not studied this point. I noticed that the previous sdk was hosted on S3.
I also saw a similar project https://github.com/phracker/MacOSX-SDKs but I am not familiar with it.

# OSX-cross parameters. Go 1.11 requires OSX >= 10.10
ARG OSX_VERSION_MIN=10.10
# OSX-cross parameters. Go 1.13 requires OSX >= 10.11
ARG OSX_VERSION_MIN=10.11
ARG OSX_CROSS_COMMIT=a9317c18a3a457ca0a657f08cc4d0d43c6cf8953
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to update to master I have already done it. tao12345666333@afc6f85

The CI has been passed. https://gitlab.com/taobeier/golang-cross/-/jobs/309376124

@tao12345666333
Copy link
Contributor Author

@thaJeztah PTAL. Thanks.

@tao12345666333
Copy link
Contributor Author

ping @thaJeztah PTAL. Thanks.

cc @kolyshkin

@thaJeztah
Copy link
Member

Still trying to get an answer on updating the s3 bucket; hold tight 😅
Probably we should update to Go 1.13.3 now as well

ping @andrewhsu PTAL

@tao12345666333
Copy link
Contributor Author

Yep. I should update to Go 1.13.3. I am also waiting for the update of S3 bucket. 😄

@pchampio
Copy link

Hey, What's the status of this PR?
Awesome job btw!

@tao12345666333
Copy link
Contributor Author

wait for s3 bucket.

@Jacalz
Copy link

Jacalz commented Dec 22, 2019

Could we please get go updated to 1.13.5 and see this merged? I can not use this package to cross compile my application as it relies on os.UserConfigDir() that was added in version 1.13...

@tao12345666333
Copy link
Contributor Author

Could we please get go updated to 1.13.5 and see this merged?

Sorry, unfortunately, if we want to merge this PR, we need a bucket to hold the SDK.

As @thaJeztah commented before #45 (comment)

Still trying to get an answer on updating the s3 bucket; hold tight

@tao12345666333
Copy link
Contributor Author

Update for solve conflict file.

@Jacalz
Copy link

Jacalz commented Jan 10, 2020

It is sad that this seems to take such a long time and that the code needs to workaround using functions introduced in 1.13.0. I would be great to get this finished 👍

Anyhow, while we already are waiting, could we please get the go version updated to 1.13.6 so we get all the latest fixes and security patches? 🙂

@tao12345666333
Copy link
Contributor Author

@Jacalz The reason this PR has never been merged is because we don't have hostable S3 storage.
#45 (comment)

I can update the Go version and it ’s easy.

@pgaskin
Copy link

pgaskin commented Jan 15, 2020

Note that there are other images similar to this one, for example https://github.com/elastic/golang-crossbuild.

@robdefeo
Copy link

robdefeo commented Feb 3, 2020

Any update on this?

@robdefeo
Copy link

robdefeo commented Feb 6, 2020

@thaJeztah https://github.com/phracker/MacOSX-SDKs/releases would this not provide a drop in replacement for S3 file hosting?

@tao12345666333
Copy link
Contributor Author

@robdefeo Thanks!
But I have tried it before, it is incomplete and cannot be compiled for us.

@robdefeo
Copy link

robdefeo commented Feb 7, 2020

@tao12345666333 what are the exact requirements needed? This will help the community figure know exactly what is needed then we will be more easily able to help. Thanks

@tao12345666333
Copy link
Contributor Author

@robdefeo ref: phracker/MacOSX-SDKs#21

Signed-off-by: Jintao Zhang <[email protected]>
@Jacalz
Copy link

Jacalz commented Feb 25, 2020

What exactly is the problem with the bucket for storing the SDK?
Is it impossible to do or have nobody stepped up with a working hosting bucket?

@thaJeztah
Copy link
Member

No approval from legal to upload a new version of the SDK.

I had an alternative stashed in my local Git, that just updates the Go version, and adds some TODO comments. One restriction of that change would be that the image wouldn't set the correct "minimum version"; perhaps it doesn't cause issues, but added the comments for future follow up.

Let me open a PR for that (at least as a temporary solution)

@thaJeztah thaJeztah mentioned this pull request Feb 25, 2020
@thaJeztah
Copy link
Member

GitHub is giving angry unicorns, but managed to push #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants