rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

rattler-build error when using --target-platform linux-64 on osx-arm64

Open nichmor opened this issue 1 year ago • 5 comments

Having this recipe.yaml in a recipe folder

# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json

context:
  version: "13.4.2"


package:
  name: "boltons"
  version: ${{ version }}

source:
  url: https://github.com/mahmoud/boltons/archive/${{ version }}.tar.gz
  sha256: 1843160500f560802b5240adf8073e35112d17a4ca02581b5c45bb571ded4df7

build:
  script: 
    - python -m pip install . --no-deps -vv

requirements:
  host:
    - pip
    - python >=3.7
    - setuptools
  run:
    - python >=3.7

Running rattler-build build --render-only --recipe recipe --target-platform linux-64

will output this error:

thread 'tokio-runtime-worker' panicked at /Users/runner/miniforge3/conda-bld/rattler-build_1709722974673/_build_env/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/time/entry.rs:556:9:
A Tokio 1.x context was found, but it is being shutdown.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error:   × Failed to resolve dependencies: failed to link 'share/terminfo/N/NCR260VT300WPP'
  ├─▶ failed to link 'share/terminfo/N/NCR260VT300WPP'
  ├─▶ could not open source file
  ╰─▶ Invalid argument (os error 22)

and running rattler-build build --render-only --recipe recipe --target-platform win-64 this:

thread 'tokio-runtime-worker' panicked at /Users/runner/miniforge3/conda-bld/rattler-build_1709722974673/_build_env/.cargo/git/checkouts/rattler-3fdeff0ba0214908/82dc20f/crates/rattler/src/install/entry_point.rs:18:14:
unsupported platform
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at /Users/runner/miniforge3/conda-bld/rattler-build_1709722974673/_build_env/.cargo/git/checkouts/rattler-3fdeff0ba0214908/82dc20f/crates/rattler/src/install/driver.rs:139:13:
internal error: entered unreachable code: if a send error occurs here it means the task processor is dropped. Since this only happens when dropping this object there cannot be another call to this function. Therefor this should never happen.

running using: rattler-build 0.13.0 osx-arm64 macos 13.4 (22F66)

nichmor avatar Mar 18 '24 09:03 nichmor

This is not rattler-build's fault, but weird behavior of ncurses. You can't create the same file both uppercase and lowercase on macOS file systems. https://github.com/conda-forge/ncurses-feedstock/issues/73

rattler-build / rattler could create a better error message, though.

pavelzw avatar Mar 18 '24 13:03 pavelzw

duplicate of https://github.com/mamba-org/rattler/issues/460

pavelzw avatar Mar 18 '24 14:03 pavelzw

I would argue that in combination with the --render-only we could do a better job though (e.g. not extract everything or use the run_exports.json index file).

wolfv avatar Mar 18 '24 14:03 wolfv

@nichmor this is practically also fixed for the render-only use case, right?

wolfv avatar Apr 03 '24 06:04 wolfv

@nichmor this is practically also fixed for the render-only use case, right?

yes

nichmor avatar Apr 03 '24 08:04 nichmor