You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
When trying to build Grype from the source.tar I am running into an error go: build output "grype" already exists and is a directory
What you expected to happen:
After running go build ./cmd/grype Grype is now functional.
How to reproduce it (as minimally and precisely as possible):
trying to build in a Dockerfile. Using golang-1.21.8 as builder. I copy down the source.tar and then run the command suggested in the DEVELOPING.md it downloads the go.mod and then errors out. Trying to git clone produces same error.
Anything else we need to know?:
I have tried in multiple locations with the same error. Removing the grype directory obviously does not work ha.
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
The text was updated successfully, but these errors were encountered:
I don't think we will be able to support this exact use case, since as you noted there is a grype directory and this is unlikely to change.
You have a couple options:
Use go run ./cmd/grype, which is effectively what many of us do during development. You can make code changes and re-run this easily.
Run make snapshot (after make bootstrap), which will build snapshot releases closest to what our release process does, but this is considerably slower as it builds binaries for all supported platforms.
It looks like we need to get the DEVELOPING.md updated.
kzantow
changed the title
Building Grype from source errors out.
Incorrect instructions in DEVELOPING.md to build Grype from source
Apr 11, 2024
Ah, well thats a bummer. Neither of those use cases will work for us but thank you for the quick feedback. The install.sh build does work for us but was hoping for a source route. If need be you can feel free to close this issue.
What happened:
When trying to build Grype from the source.tar I am running into an error
go: build output "grype" already exists and is a directory
What you expected to happen:
After running
go build ./cmd/grype
Grype is now functional.How to reproduce it (as minimally and precisely as possible):
trying to build in a Dockerfile. Using golang-1.21.8 as builder. I copy down the source.tar and then run the command suggested in the DEVELOPING.md it downloads the go.mod and then errors out. Trying to git clone produces same error.
Anything else we need to know?:
I have tried in multiple locations with the same error. Removing the grype directory obviously does not work ha.
Environment:
grype version
:cat /etc/os-release
or similar):VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
The text was updated successfully, but these errors were encountered: