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 get' Installation Process Fails #203

Open
slcardinal opened this issue May 16, 2024 · 3 comments
Open

'go get' Installation Process Fails #203

slcardinal opened this issue May 16, 2024 · 3 comments

Comments

@slcardinal
Copy link

When trying to install the packager using the instruction provided below, the process fails when trying to install the cenkalti/backoff go module. From what I can determine, the cenkalti/backoff module now requires Go 1.18, which has depreciated the use of 'go get' in favor of using 'go install'. I am not super familar with Go, so I am looking for some assistance in make this process work again, as we us this module to build some custom buildpacks for Cloud Foundry.

go get github.com/cloudfoundry/libbuildpack cd ~/go/src/github.com/cloudfoundry/libbuildpack && GO111MODULE=on go mod download cd packager/buildpack-packager && GO111MODULE=on go install

`# go get github.com/cloudfoundry/libbuildpack
go: downloading github.com/cloudfoundry/libbuildpack v0.0.0-20231211162543-86d10e150195
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/cenkalti/backoff/v4 v4.2.0
go: downloading github.com/Masterminds/semver v1.5.0

github.com/cenkalti/backoff/v4

pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:10:26: syntax error: unexpected any, expecting ]
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:10:38: method has no receiver
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:16:53: syntax error: unexpected [ after top level declaration
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:17:16: method has no receiver
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:17:16: syntax error: unexpected (, expecting name or (
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:42:19: syntax error: unexpected [, expecting (
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:53:25: syntax error: unexpected [, expecting (
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:66:33: syntax error: unexpected [, expecting (
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:70:19: syntax error: unexpected [, expecting (
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:76:2: syntax error: non-declaration statement outside function body
pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:76:2: too many errors
note: module requires Go 1.18`

@slcardinal
Copy link
Author

Instruction for using the Buildpackager Packager are also listed in the Cloud Foundry Docs here: https://docs.cloudfoundry.org/buildpacks/custom.html

@romain-dartigues
Copy link

Instructions did not work (for me); I had to:

git clone https://github.com/cloudfoundry/libbuildpack.git
cd libbuildpack/packager/buildpack-packager/
GO111MODULE=on go mod download
GOBIN=/tmp/ GO111MODULE=on go install

After what I get a working buildpack-packager, but without some command listed in the documentation:

$ buildpack-packager init --name sidecars-buildpack --path=sidecars-buildpack
Usage: buildpack-packager <flags> <subcommand> <subcommand args>

Subcommands:
        commands         list all command names
        flags            describe all known top-level flags
        help             describe subcommands and their syntax

Subcommands for Custom:
        build            Create a buildpack zipfile from the current directory
        summary          Print out list of dependencies of this buildpack

$ echo $?
2

@slcardinal
Copy link
Author

Just checking to see if someone has looked at this issue. It has broken my teams ability to build and deploy a couple of custom buildpack that we have used for years. If this is not going to be fixed, is there a work around that I can use to continue to build and deploy custom buildpacks?

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

No branches or pull requests

2 participants