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

Errors when following DEVELOPMENT.md on Windows machine #1237

Open
cormacpayne opened this issue Nov 2, 2023 · 4 comments
Open

Errors when following DEVELOPMENT.md on Windows machine #1237

cormacpayne opened this issue Nov 2, 2023 · 4 comments
Labels
help wanted Need some extra hands to the this done. os/windows status/ready type/chore

Comments

@cormacpayne
Copy link

Summary

Hey there, I've been following the DEVELOPMENT.md file to generate some lifecycle binaries locally but am running into some issues on my Windows machine when running the set of make commands provided. I have all of the prerequisites installed and have tried the make commands listed with elevated instances of cmd, PowerShell and Git Bash, but all have run into the same set of issues.

Below are the errors I'm seeing for each make command ran:

make all

### TRUNCATED OUTPUT ###

--- PASS: TestPlatform (0.01s)
    --- PASS: TestPlatform/unit-platform/0.3 (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.3/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- PASS: TestPlatform/unit-platform/0.3/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.4 (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.4/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- PASS: TestPlatform/unit-platform/0.4/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.5 (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.5/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- PASS: TestPlatform/unit-platform/0.5/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.6 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.6/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.6/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.7 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.7/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.7/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.8 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.8/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.8/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.9 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.9/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.9/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.10 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.10/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.10/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.11 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.11/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.11/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
    --- PASS: TestPlatform/unit-platform/0.12 (0.00s)
        --- PASS: TestPlatform/unit-platform/0.12/#NewPlatform/Platform_API_>=_0.6/configures_the_platform (0.00s)
        --- SKIP: TestPlatform/unit-platform/0.12/#NewPlatform/Platform_API_<_0.6/configures_the_platform (0.00s)
PASS
ok      github.com/buildpacks/lifecycle/platform/launch 2.025s
FAIL
make: *** [Makefile:289: unit] Error 1
make build

C:\lifecycle>make build
"> Building lifecycle/lifecycle for linux/amd64..."
mkdir -p C:\lifecycle\out/linux-amd64/lifecycle
The syntax of the command is incorrect.
make: *** [Makefile:73: C:\lifecycle\out/linux-amd64/lifecycle/lifecycle] Error 1
make package

C:\lifecycle>make package
"> Installing syft..."
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
\033[0;31m\033[1m[error]\033[0m unable to find tag='' \033[0m
\033[0;31m\033[1m[error]\033[0m do not specify a version or select a valid version from https://github.com/anchore/syft/releases \033[0m
make: *** [Makefile:244: install-syft] Error 1

Proposal

Any additional guidance on how these make commands should be executed on a Windows machine would be great 😄


Context

N/A

@natalieparellano
Copy link
Member

Oof, sorry about that @cormacpayne - I guess we never run that make target on Windows in CI so we haven't caught this. You can try installing syft with Chocolatey and then commenting out the install-syft target. Eventually we'll need to add some branching logic similar to here to perform the correct installation for the OS.

@cormacpayne
Copy link
Author

@natalieparellano Hey Natalie, sorry for the delayed response, and thanks for the reply as always -- I was able to get this to work locally by using WSL, but also found the behavior was more consistent (and easier to manage) by forking the repository and modifying the build.yml GitHub Action workflow. I'm in a good development state now, so however you'd like to prioritize this item is OK with me.

As a quick follow-up question so to not open an entirely different issue (possibly for the pack repo): if I use the build.yml workflow to publish a lifecycle image to my personal container registry, is there a way to create a builder that's built on top of that lifecycle image? The flow I've been trying based on my understanding is to push my lifecycle image foobar.azurecr.io/lifecycle:1.2.3, use pack config lifecycle-image foobar.azurecr.io/lifecycle to set the repository, and then set lifecycle.version to 1.2.3 in the builder.toml file. Even after this, it seems like pack builder create will still use lifecycle GitHub releases if the lifecycle.version property is set and ignore what was set by pack config lifecycle-image.

@natalieparellano
Copy link
Member

@cormacpayne I'm sorry that say that pack doesn't support creating builders from lifecycle images. I myself have wanted this feature for a long time. But you can run make build-<os>-<arch> package-<os>-<arch> and the resulting tarball can be specified in your builder config like so:

[lifecycle]
uri = "<path to tarball>"

I hope this helps!

@cormacpayne
Copy link
Author

@natalieparellano OK that's what I figured, but just wanted to double-check -- thanks for the clarification!

@natalieparellano natalieparellano added the help wanted Need some extra hands to the this done. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need some extra hands to the this done. os/windows status/ready type/chore
Projects
None yet
Development

No branches or pull requests

3 participants