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

building compare sources #3218

Merged
merged 2 commits into from
May 17, 2023
Merged

building compare sources #3218

merged 2 commits into from
May 17, 2023

Conversation

yash-zededa
Copy link
Collaborator

modified the building command used for the compare sources utility.

Copy link
Contributor

@deitch deitch left a comment

Choose a reason for hiding this comment

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

We should separate that "local GOOS" evaluation into its own section of the Makefile, but that definitely is for later.

LGTM

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

How are you manually testing this?

I converted it to shell syntax and tried it as
COMPARESOURCE=./build-tools/bin/compare-sbom-sources
COMPARE_SOURCE=./tools/compare-sbom-sources
GOOS=$(uname -s | tr '[A-Z]' '[a-z]') CGO_ENABLED=0 go build -o ${COMPARESOURCES} -C ${COMPARE_SOURCE}

and that fails with the same error as before:
go: cannot find main module, but found .git/config in /home/nordmark/fixes/eve
to create a module there, run:
go mod init

I observe that the existing case we have of using go build in the Makefile (for LINUXKIT) does a cd to the directory and passes in a -mod vendor argument. Do we need the same here?

@deitch
Copy link
Contributor

deitch commented May 17, 2023

and that fails with the same error as before:
go: cannot find main module, but found .git/config in /home/nordmark/fixes/eve
to create a module there, run:
go mod init

It does? What version of go? go has supported -C for quite some time. @yash-zededa and I were on a call, and we ran it, saw that it worked.

@eriknordmark
Copy link
Contributor

and that fails with the same error as before:
go: cannot find main module, but found .git/config in /home/nordmark/fixes/eve
to create a module there, run:
go mod init

It does? What version of go? go has supported -C for quite some time. @yash-zededa and I were on a call, and we ran it, saw that it worked.

My bad; COMPARESOURCES vs COMPARESOURCE in my manual setup as you can trivially see in my comment above ;-)

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

@eriknordmark eriknordmark merged commit ce003b4 into lf-edge:master May 17, 2023
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.

3 participants