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

WARNING: target-architecture and --arch do not overlap, nothing to build #1050

Open
TimKnight-DWP opened this issue Feb 27, 2024 · 3 comments

Comments

@TimKnight-DWP
Copy link

YAML file

# SPDX-FileCopyrightText: 2023 Chainguard, Inc
# SPDX-License-Identifier: Apache-2.0
#
# This is a sample configuration file to demonstrate how to build a software
# project using melange
package:
  name: minimal
  version: 0.0.1
  epoch: 0
  description: a very basic melange example
  target-architecture:
    - amd64
    - arm64

environment:
  contents:
    repositories:
      - https://packages.wolfi.dev/os
    keyring:
      - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
    packages:
      - busybox=1.36.1

pipeline:
  - runs: |
      mkdir "world"
      echo "hello" > "world/hello"

Command

melange build example.melange.yaml

or

docker run --privileged --rm -v "${PWD}":/work \
  cgr.dev/chainguard/melange build example.melange.yaml  

Logs in console:

2024/02/27 12:57:53 WARN skipping arch 386
2024/02/27 12:57:53 WARN skipping arch amd64
2024/02/27 12:57:53 WARN skipping arch arm64
2024/02/27 12:57:53 WARN skipping arch arm/v6
2024/02/27 12:57:53 WARN skipping arch arm/v7
2024/02/27 12:57:53 WARN skipping arch ppc64le
2024/02/27 12:57:53 WARN skipping arch riscv64
2024/02/27 12:57:53 WARN skipping arch s390x
2024/02/27 12:57:53 WARN WARNING: target-architecture and --arch do not overlap, nothing to build

Please can someone advise, from looking at the documentation, that feels like a command which should work?

@willswire
Copy link

willswire commented Mar 10, 2024

Try using the following in your YAML file:

  target-architecture:
    - x86_64
    - aarch64

@TimKnight-DWP
Copy link
Author

@willswire I'm able to build x86_64 but no other arches, I feel like if the warning is related to underlying CPU architecture of the build machine (i.e. selected arches it can't build), then the warning should state that explicitly?

siennathesane added a commit to siennathesane/melange that referenced this issue Apr 23, 2024
Removing duplicated code that introduced chainguard-dev#1050 for Macs.

Signed-off-by: Sienna <sienna@linux.com>
@siennathesane
Copy link

If you're building on a Mac using kind/{Docker,Rancher} Desktop, add the cloud.google.com/compute-class: Scale-Out label to your node. I submitted #1163 to fix this

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 a pull request may close this issue.

3 participants