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

Confusing make targets #580

Closed
afbjorklund opened this issue Jan 2, 2019 · 5 comments · Fixed by #1069
Closed

Confusing make targets #580

afbjorklund opened this issue Jan 2, 2019 · 5 comments · Fixed by #1069
Labels
good first issue kind/bug A defect in an existing functionality (or a PR fixing it) locked - please file new issue/PR

Comments

@afbjorklund
Copy link
Contributor

make starts a container, and sudo make installfails ?

Seems that you need to "make binary-local" to just do a regular build. And that "skopeo" is missing ?

make: *** No rule to make target 'skopeo', needed by 'install-binary'. Stop.

It would be better if binary-local was called "skopeo", and if the static binary was called "skopeo-static"

@rhatdan
Copy link
Member

rhatdan commented Jan 2, 2019

I agree. make should build skopeo.

@vrothberg
Copy link
Member

I agree as well. I continuously jump into this trap when working on podman or buildah before. @runcom @mtrmac WDYT?

@mtrmac
Copy link
Contributor

mtrmac commented Jan 2, 2019

Yeah, as mentioned elsewhere here, building dynamically-linked binaries in a container for a different OS version, or an entirely different OS, and expecting them to be usable locally, is just incorrect.

The default should be binary-local.

I’m almost tempted to drop the in-container builds entirely, AFAICT we are not using them and thus they sometimes break without anyone noticing, but IIRC from earlier reports there are some users, so probably not.

@NicolasT
Copy link

FWIW, make (Docker-based build) is broken right now. In what's below, the build image is built 'from cache', but this 'cache' was seeded only a couple of minutes ago (on first make invocation):

$ make
docker build  -f Dockerfile.build -t skopeobuildimage .
Sending build context to Docker daemon  24.76MB
Step 1/4 : FROM ubuntu:17.10
 ---> e211a66937c6
Step 2/4 : RUN apt-get update && apt-get install -y     golang     btrfs-tools     git-core     libdevmapper-dev     libgpgme11-dev     go-md2man     libglib2.0-dev     libostree-dev
 ---> Using cache
 ---> cb943960df79
Step 3/4 : ENV GOPATH=/
 ---> Using cache
 ---> 822071e5850f
Step 4/4 : WORKDIR /src/github.com/containers/skopeo
 ---> Using cache
 ---> fd0c9ee16c2d
Successfully built fd0c9ee16c2d
Successfully tagged skopeobuildimage:latest
docker run --rm --security-opt label=disable -v $(pwd):/src/github.com/containers/skopeo \
        skopeobuildimage make binary-local  BUILDTAGS='   ostree '
go build "-buildmode=pie" -ldflags "-X main.gitCommit=b329dd0d4e9586480ef4363ad3c85bc6808ca9c2" -gcflags "" -tags "ostree " -o skopeo ./cmd/skopeo
vendor/github.com/klauspost/compress/flate/inflate.go:13:2: cannot find package "math/bits" in any of:
        /src/github.com/containers/skopeo/vendor/math/bits (vendor tree)
        /usr/lib/go-1.8/src/math/bits (from $GOROOT)
        /src/math/bits (from $GOPATH)
make: *** [binary-local] Error 1
Makefile:84: recipe for target 'binary-local' failed
make: *** [Makefile:74: binary] Error 2

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

I think the Docker/Podman build is fixed now. I am going to have an intern tackle fixing this.

@rhatdan rhatdan added the kind/bug A defect in an existing functionality (or a PR fixing it) label Oct 8, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue kind/bug A defect in an existing functionality (or a PR fixing it) locked - please file new issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants