GithubHelp home page GithubHelp logo

Comments (10)

fckbo avatar fckbo commented on September 6, 2024

Hi Olaf,

Did u use master or another branch ? May I ask on which OS did u try to build oc ?

from oc.

olbohlen avatar olbohlen commented on September 6, 2024

Hi,

I am using the master branch and I tried again today with a pull from today. I am building on illumos (yes, unsupported, I know, but I could really use it...) and at least kubectl compiles.

(629) x230:/export/home/olbohlen/go/src/github.com/openshift/oc$ gmake GO_REQUIRED_MIN_VERSION:= oc
go build -mod=vendor -tags 'include_gcs include_oss containers_image_openpgp' -ldflags "-s -w -X github.com/openshift/oc/pkg/version.versionFromGit="v4.2.0-alpha.0-730-gddbae76" -X github.com/openshift/oc/pkg/version.commitFromGit="ddbae76ae" -X github.com/openshift/oc/pkg/version.gitTreeState="dirty" -X github.com/openshift/oc/pkg/version.buildDate="2020-08-12T08:03:14Z" -X k8s.io/component-base/version.gitMajor="1" -X k8s.io/component-base/version.gitMinor="18" -X k8s.io/component-base/version.gitVersion="v1.18.2-0-g52c56ce" -X k8s.io/component-base/version.gitCommit="ddbae76ae" -X k8s.io/component-base/version.buildDate="2020-08-12T08:03:11Z" -X k8s.io/component-base/version.gitTreeState="clean" -X k8s.io/client-go/pkg/version.gitVersion="v4.2.0-alpha.0-730-gddbae76" -X k8s.io/client-go/pkg/version.gitCommit="ddbae76ae" -X k8s.io/client-go/pkg/version.buildDate="2020-08-12T08:03:11Z" -X k8s.io/client-go/pkg/version.gitTreeState="dirty"" github.com/openshift/oc/cmd/oc

github.com/docker/docker/pkg/term

vendor/github.com/docker/docker/pkg/term/tc.go:12:27: undefined: Termios
vendor/github.com/docker/docker/pkg/term/tc.go:13:28: undefined: unix.SYS_IOCTL
vendor/github.com/docker/docker/pkg/term/tc.go:13:56: undefined: getTermios
vendor/github.com/docker/docker/pkg/term/tc.go:17:27: undefined: Termios
vendor/github.com/docker/docker/pkg/term/tc.go:18:28: undefined: unix.SYS_IOCTL
vendor/github.com/docker/docker/pkg/term/tc.go:18:48: undefined: setTermios
vendor/github.com/docker/docker/pkg/term/term.go:24:10: undefined: Termios
vendor/github.com/docker/docker/pkg/term/term.go:53:14: undefined: Termios
vendor/github.com/docker/docker/pkg/term/term.go:96:19: undefined: MakeRaw

github.com/moby/term

vendor/github.com/moby/term/tc.go:12:27: undefined: Termios
vendor/github.com/moby/term/tc.go:13:28: undefined: unix.SYS_IOCTL
vendor/github.com/moby/term/tc.go:13:56: undefined: getTermios
vendor/github.com/moby/term/tc.go:17:27: undefined: Termios
vendor/github.com/moby/term/tc.go:18:28: undefined: unix.SYS_IOCTL
vendor/github.com/moby/term/tc.go:18:48: undefined: setTermios
vendor/github.com/moby/term/term.go:24:10: undefined: Termios
vendor/github.com/moby/term/term.go:53:14: undefined: Termios
vendor/github.com/moby/term/term.go:96:19: undefined: MakeRaw

github.com/docker/docker/pkg/system

vendor/github.com/docker/docker/pkg/system/lstat_unix.go:19:9: undefined: fromStatT
vendor/github.com/docker/docker/pkg/system/stat_unix.go:65:9: undefined: fromStatT

github.com/docker/docker/client

vendor/github.com/docker/docker/client/client.go:120:35: undefined: DefaultDockerHost
vendor/github.com/docker/docker/client/client.go:125:12: undefined: DefaultDockerHost
vendor/github.com/docker/docker/client/client.go:128:12: undefined: defaultProto
vendor/github.com/docker/docker/client/client.go:129:12: undefined: defaultAddr
gmake: *** [vendor/github.com/openshift/build-machinery-go/make/targets/golang/build.mk:14: build] Error 2
(634) x230:/export/home/olbohlen/go/src/github.com/openshift/oc$ go version
go version go1.14 illumos/amd64

This is what I got today.

from oc.

Toasterson avatar Toasterson commented on September 6, 2024

For illumos/amd64 you will need a modern docker dependency. Unfortunately docker has completely broken the go modules version solver.... You have to manually build the Git commit, date and tag combo to pull in the correct dependency. You will also need moby/moby#41345 which I just created for oc to build.

The below patch exlcudes the GSS api and adds the needed dependencies for oc to compile.

diff --git a/Makefile b/Makefile
index 940a90415..ebae9e4f9 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ GO_BUILD_PACKAGES :=$(strip \
        $(wildcard ./tools/*) \
 )
 # These tags make sure we can statically link and avoid shared dependencies
-GO_BUILD_FLAGS :=-tags 'include_gcs include_oss containers_image_openpgp gssapi'
+GO_BUILD_FLAGS :=-tags 'include_gcs include_oss containers_image_openpgp'
 GO_BUILD_FLAGS_DARWIN :=-tags 'include_gcs include_oss containers_image_openpgp'
 GO_BUILD_FLAGS_WINDOWS :=-tags 'include_gcs include_oss containers_image_openpgp'
 GO_BUILD_FLAGS_LINUX_CROSS :=-tags 'include_gcs include_oss containers_image_openpgp'
diff --git a/go.mod b/go.mod
index d24da4a9f..6642538ea 100644
--- a/go.mod
+++ b/go.mod
@@ -16,6 +16,7 @@ require (
        github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
        github.com/bugsnag/bugsnag-go v1.5.3 // indirect
        github.com/bugsnag/panicwrap v1.2.0 // indirect
+       github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 // indirect
        github.com/containers/image v0.0.0-00010101000000-000000000000
        github.com/containers/storage v0.0.0-20190726081758-912de200380a // indirect
        github.com/coreos/etcd v3.3.15+incompatible
@@ -39,6 +40,8 @@ require (
        github.com/gorilla/handlers v1.4.2 // indirect
        github.com/mitchellh/go-wordwrap v1.0.0
        github.com/moby/buildkit v0.0.0-20181107081847-c3a857e3fca0
+       github.com/moby/sys/mount v0.1.0 // indirect
+       github.com/moby/term v0.0.0-20200611042045-63b9a826fb74 // indirect
        github.com/mtrmac/gpgme v0.1.2 // indirect
        github.com/opencontainers/go-digest v1.0.0-rc1
        github.com/openshift/api v0.0.0-20200521162313-4090b8d67ad8
@@ -78,12 +81,20 @@ require (
 replace (
        github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.7
        github.com/apcera/gssapi => github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b
+
+       // Update dependency to containerd to include last fixes not related to illumos but somehow did not get pulled by the resolver
+       github.com/containerd/containerd => github.com/containerd/containerd v1.4.0-rc.1
        github.com/containers/image => github.com/openshift/containers-image v0.0.0-20190130162819-76de87591e9d
        // Taking changes from https://github.com/moby/moby/pull/40021 to accomodate new version of golang.org/x/sys.
        // Although the PR lists c3a0a3744636069f43197eb18245aaae89f568e5 as the commit with the fixes,
        // d1d5f6476656c6aad457e2a91d3436e66b6f2251 is more suitable since it does not break fsouza/go-clientdocker,
        // yet provides the same fix.
-       github.com/docker/docker => github.com/docker/docker v1.4.2-0.20191121165722-d1d5f6476656
+       // github.com/docker/docker => github.com/docker/docker v1.4.2-0.20191121165722-d1d5f6476656
+       //
+       // Override with current docker development branch to pull in illumos fixes
+       //github.com/docker/docker => github.com/docker/docker v17.12.0-ce-rc1.0.20200728121027-0f41a77c6993+incompatible
+       // Override with a branch, that has moby/moby#41345
+       github.com/docker/docker => github.com/OpenFlowLabs/moby v17.12.0-ce-rc1.0.20200812094058-e3ab23630964+incompatible
 
        k8s.io/api => k8s.io/api v0.18.2
        k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.2

My build steps where as follows

export PATH=/usr/gnu/bin:$PATH

# Add the patch from above
go mod tidy
go mod vendor
gmake

The resulting OC reports a version string

./oc version
Client Version: v4.2.0-alpha.0-657-g51011e4

Also see kubernetes/kubernetes#91570 for the current upstreaming status of https://github.com/Toasterson/kubernetes/tree/he

from oc.

olbohlen avatar olbohlen commented on September 6, 2024

I can confirm that I can build oc with this patch. Can you somehow upstream these patches? I'm open to test this, I could even provide a jenkins instance and/or ssh access to a build machine if needed.

from oc.

openshift-bot avatar openshift-bot commented on September 6, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

from oc.

Toasterson avatar Toasterson commented on September 6, 2024

/remove-lifecycle stale

from oc.

openshift-bot avatar openshift-bot commented on September 6, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

from oc.

openshift-bot avatar openshift-bot commented on September 6, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

from oc.

openshift-bot avatar openshift-bot commented on September 6, 2024

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

from oc.

openshift-ci-robot avatar openshift-ci-robot commented on September 6, 2024

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from oc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.