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

Local Build on ARM64 (M1/M2) #294

Closed
2 tasks
michaelweinold opened this issue Mar 18, 2023 · 2 comments
Closed
2 tasks

Local Build on ARM64 (M1/M2) #294

michaelweinold opened this issue Mar 18, 2023 · 2 comments

Comments

@michaelweinold
Copy link
Contributor

Unfortunately, I am still not able to reproduce the successful M1/M2 build by @DerThorsten from #277 (comment). Below are my steps, which are pieced together from the documentation and the linked issue.

  1. Create a conda environment from ci-eny.yml (with playwright installed through pip):
name: ci-env
channels:
  - conda-forge
dependencies:
  - python
  - pip
  - empack >=2,<3
  - colorama
  - ruamel
  - ruamel.yaml <0.17.6
  - rich
  - mamba >= 0.23.1
  - micromamba >= 0.23.1
  - jsonschema
  - cython
  - patchelf
  - liblief
  - py-lief
  - conda
  - conda-build
  - pyyaml
  - click == 8.0.4
  - typer >= 0.7.0
  - quetz-client <= 0.0.4
  - boa
  - nodejs >= 18.7.0
  - pydantic
  - pytest
  - networkx
  # - microsoft::playwright
  - pip
  - pip:
    - playwright
conda env create -n emforge --file ci_env.yml
  1. Initialize playwright:
playwright install
  1. Install packages using custom branches:
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed
python -m pip install git+https://github.com/emscripten-forge/pyjs-code-runner.git --no-deps --ignore-installed
  1. Install emsdk:
python -c "from empack.file_packager import download_and_setup_emsdk; download_and_setup_emsdk()"
  1. Create .emsdkdir file:
echo $(python -c "from empack.file_packager import EMSDK_INSTALL_PATH; print(EMSDK_INSTALL_PATH / 'emsdk-3.1.2')") > $HOME/.emsdkdir
  1. Manually build compilers / cross-python packages:
python builder.py build explicit recipes/recipes/emscripten_emscripten-32/
python builder.py build explicit recipes/recipes/cross-python_emscripten-32
  1. Attempt to build a package locally:
(emforge) michaelweinold@Michaels-MacBook-Pro emforge-recipes % python builder.py build explicit recipes/recipes_emscripten/regex  --emscripten-32                   

WITH EM
args namespace(recipe_dir=None, target='recipes/recipes_emscripten/regex', features=None, offline=False, target_platform='emscripten-32', json=False, debug=False, variant_config_files=[], interactive=False, output_folder=None, skip_existing='default', no_test=False, continue_on_failure=False, conda_build_build_id_pat=False, conda_build_remove_work_dir=True, conda_build_keep_old_work=False, conda_build_prefix_length=255, croot=False, pkg_format=1, zstd_compression_level=22, post_build_callback=functools.partial(<function post_build_callback at 0x10c7da320>, skip_tests=False, work_dir='/Users/michaelweinold/github/emforge-recipes'), command='build')

Loading config files: /Users/michaelweinold/github/emforge-recipes/conda_build_config.yaml

No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
WARNING:boa.core.monkeypatch:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
Adding in variants from /Users/michaelweinold/github/emforge-recipes/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /Users/michaelweinold/github/emforge-recipes/conda_build_config.yaml
Updating build index: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld

Recipe validation OK
Found 1 recipe
 - regex

Assembling all recipes and variants

in build_recipe
            Output: regex             
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Package         ┃ Variant versions ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ target_platform │ emscripten-32    │
│ python          │ 3.10.* *_cpython │
│ c_compiler      │ emscripten       │
│ pip             │ 22.0.4           │
└─────────────────┴──────────────────┘

Initializing mamba solver


Downloading source

Source cache directory is: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/src_cache
INFO:conda_build.source:Source cache directory is: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/src_cache
Found source in cache: regex-2022.1.18_97f32dc03a.tar.gz
INFO:conda_build.source:Found source in cache: regex-2022.1.18_97f32dc03a.tar.gz
Extracting download

Preparing environment for regex

Finalizing build for regex
GET SOLVER
https://repo.mamba.pm/emscripten-forge/noarch               Using cache
conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/main/noarch                                              No change
pkgs/main/osx-arm64                                           No change
pkgs/r/osx-arm64                                              No change
pkgs/r/noarch                                                 No change
https://repo.mamba.pm/emscripten-forge/osx-arm64    94.0 B @ 182.0 B/s 404 failed  0.5s
Reloading output folder: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld
opt/homebrew/Caskroom/miniconda/base/envs/emforg..   1.2kB @  26.1MB/s  0.0s
opt/homebrew/Caskroom/miniconda/base/envs/emforg.. 559.0 B @  24.3MB/s  0.0s
subdir=<libmambapy.bindings.SubdirData object at 0x10ce9a4b0> channel={'platform': 'osx-arm64', 'url': 'file:///opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/osx-arm64', 'channel': opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld[osx-arm64,noarch]}
subdir=<libmambapy.bindings.SubdirData object at 0x10cfafc70> channel={'platform': 'noarch', 'url': 'file:///opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/noarch', 'channel': opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld[osx-arm64,noarch]}
Finalizing host for regex
GET SOLVER
https://repo.mamba.pm/emscripten-forge/emscripten-32          Using cache
https://repo.mamba.pm/emscripten-forge/noarch               Using cache
conda-forge/noarch                                          Using cache
pkgs/main/noarch                                            Using cache
pkgs/r/noarch                                               Using cache
pkgs/r/emscripten-32                               283.0 B @   1.4kB/s 404 failed  0.2s
conda-forge/emscripten-32                          356.0 B @   1.7kB/s 404 failed  0.2s
pkgs/main/emscripten-32                            285.0 B @   1.3kB/s 404 failed  0.2s
Reloading output folder: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld
opt/homebrew/Caskroom/miniconda/base/envs/emforg..  ??.?MB @  ??.?MB/s 0 failed  0.0s
opt/homebrew/Caskroom/miniconda/base/envs/emforg.. 559.0 B @  19.3MB/s  0.0s
subdir=<libmambapy.bindings.SubdirData object at 0x10cfb7770> channel={'platform': 'emscripten-32', 'url': 'file:///opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/emscripten-32', 'channel': opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld[emscripten-32,noarch]}
subdir=<libmambapy.bindings.SubdirData object at 0x10cfb7ef0> channel={'platform': 'noarch', 'url': 'file:///opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/noarch', 'channel': opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld[emscripten-32,noarch]}
Finalizing run for regex
Transaction

  Prefix: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/_build_env

  Updating specs:

   - python=3.10[build=*_cpython]
   - cross-python_emscripten-32
   - emscripten_emscripten-32
   - pip=22.0.4


  Package                         Version  Build               Channel                                                                      Size
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  + bzip2                           1.0.8  h3422bc3_4          conda-forge/osx-arm64                                                      Cached
  + ca-certificates             2022.12.7  h4653dfc_0          conda-forge/osx-arm64                                                      Cached
  + coreutils                         9.1  h1c322ee_0          conda-forge/osx-arm64                                                      Cached
  + cross-python_emscripten-32     3.10.1  h0edcd7e_8          /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/osx-arm64     Cached
  + crossenv                        1.4.0  pyhd8ed1ab_0        conda-forge/noarch                                                         Cached
  + emscripten_emscripten-32       3.1.27  h0edcd7e_5          /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/osx-arm64     Cached
  + emsdk                          3.1.34  py310hbe9552e_0     conda-forge/osx-arm64                                                      Cached
  + gettext                        0.21.1  h0186832_0          conda-forge/osx-arm64                                                      Cached
  + icu                              70.1  h6b3803e_0          conda-forge/osx-arm64                                                      Cached
  + libcxx                         15.0.7  h75e25f2_0          conda-forge/osx-arm64                                                      Cached
  + libffi                          3.4.2  h3422bc3_5          conda-forge/osx-arm64                                                      Cached
  + libiconv                         1.17  he4db4b2_0          conda-forge/osx-arm64                                                      Cached
  + libsqlite                      3.40.0  h76d750c_0          conda-forge/osx-arm64                                                      Cached
  + libuv                          1.44.2  he4db4b2_0          conda-forge/osx-arm64                                                      Cached
  + libzlib                        1.2.13  h03a7124_4          conda-forge/osx-arm64                                                      Cached
  + lz4-c                           1.9.4  hb7217d7_0          conda-forge/osx-arm64                                                      Cached
  + ncurses                           6.3  h07bb92c_1          conda-forge/osx-arm64                                                      Cached
  + nodejs                        18.15.0  h26a3f6d_0          conda-forge/osx-arm64                                                      Cached
  + openssl                         3.1.0  h03a7124_0          conda-forge/osx-arm64                                                      Cached
  + pip                            22.0.4  pyhd8ed1ab_0        conda-forge/noarch                                                         Cached
  + popt                             1.16  h61edf1b_2002       conda-forge/osx-arm64                                                      Cached
  + python                         3.10.9  h3ba56d0_0_cpython  conda-forge/osx-arm64                                                      Cached
  + python_abi                       3.10  3_cp310             conda-forge/osx-arm64                                                      Cached
  + readline                        8.1.2  h46ed386_0          conda-forge/osx-arm64                                                      Cached
  + rsync                           3.2.7  hcdef6ba_0          conda-forge/osx-arm64                                                      Cached
  + sed                               4.8  hc6a1b29_0          conda-forge/osx-arm64                                                      Cached
  + setuptools                     59.8.0  py310hbe9552e_1     conda-forge/osx-arm64                                                      Cached
  + tk                             8.6.12  he1e0b03_0          conda-forge/osx-arm64                                                      Cached
  + tzdata                          2022g  h191b570_0          conda-forge/noarch                                                         Cached
  + wheel                          0.40.0  pyhd8ed1ab_0        conda-forge/noarch                                                         Cached
  + xxhash                          0.8.0  h27ca646_3          conda-forge/osx-arm64                                                      Cached
  + xz                              5.2.6  h57fd34a_0          conda-forge/osx-arm64                                                      Cached
  + zlib                           1.2.13  h03a7124_4          conda-forge/osx-arm64                                                      Cached
  + zstd                            1.5.2  hf913c23_6          conda-forge/osx-arm64                                                      Cached

  Summary:

  Install: 34 packages

  Total download: 0 B

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────



Transaction starting
Linking libzlib-1.2.13-h03a7124_4
Linking coreutils-9.1-h1c322ee_0
Linking libffi-3.4.2-h3422bc3_5
Linking ncurses-6.3-h07bb92c_1
Linking xz-5.2.6-h57fd34a_0
Linking ca-certificates-2022.12.7-h4653dfc_0
Linking python_abi-3.10-3_cp310
Linking libiconv-1.17-he4db4b2_0
Linking libcxx-15.0.7-h75e25f2_0
Linking libuv-1.44.2-he4db4b2_0
Linking xxhash-0.8.0-h27ca646_3
Linking bzip2-1.0.8-h3422bc3_4
Linking zlib-1.2.13-h03a7124_4
Linking tk-8.6.12-he1e0b03_0
Linking libsqlite-3.40.0-h76d750c_0
Linking readline-8.1.2-h46ed386_0
Linking openssl-3.1.0-h03a7124_0
Linking popt-1.16-h61edf1b_2002
Linking gettext-0.21.1-h0186832_0
Linking zstd-1.5.2-hf913c23_6
Linking lz4-c-1.9.4-hb7217d7_0
Linking icu-70.1-h6b3803e_0
Linking sed-4.8-hc6a1b29_0
Linking rsync-3.2.7-hcdef6ba_0
Linking nodejs-18.15.0-h26a3f6d_0
Linking tzdata-2022g-h191b570_0
Linking python-3.10.9-h3ba56d0_0_cpython
Linking setuptools-59.8.0-py310hbe9552e_1
Linking emsdk-3.1.34-py310hbe9552e_0
Linking wheel-0.40.0-pyhd8ed1ab_0
Linking crossenv-1.4.0-pyhd8ed1ab_0
Linking pip-22.0.4-pyhd8ed1ab_0
Linking emscripten_emscripten-32-3.1.27-h0edcd7e_5
Linking cross-python_emscripten-32-3.10.1-h0edcd7e_8
Transaction finished
Transaction

  Prefix: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place

  Updating specs:

   - python=3.10[build=*_cpython]
   - python_abi=3.10[build=*_cp310]
   - emscripten-abi=3.1.27


  Package           Version  Build              Channel                                                                   Size
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  + emscripten-abi   3.1.27  h0edcd7e_5         /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/noarch     Cached
  + python           3.10.2  h_hash_26_cpython  repo.mamba.pm/emscripten-forge/emscripten-32                            Cached
  + python_abi         3.10  0_cp310            repo.mamba.pm/emscripten-forge/emscripten-32                            Cached

  Summary:

  Install: 3 packages

  Total download: 0 B

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────



Transaction starting
Linking python_abi-3.10-0_cp310
Linking emscripten-abi-3.1.27-h0edcd7e_5
Linking python-3.10.2-h_hash_26_cpython
Transaction finished

Starting build for regex

source tree in: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work
export 
PREFIX=/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla
cehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place
export BUILD_PREFIX=/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/_build_env
export SRC_DIR=/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work
Found config file /Users/michaelweinold/.emsdkdir
/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/_build_env/etc/conda/activate.d/emscripten_emscripten-32_activate.sh: line 25: /Users/michaelweinold/Library/Caches/empack/emsdk-3.1.2/emsdk_env.sh: No such file or directory
Using EMSCRIPTEN_FORGE_EMSDK_DIR /Users/michaelweinold/.emsdkdir:  /Users/michaelweinold/Library/Caches/empack/emsdk-3.1.2


Work directory: /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work
Try building again with /opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work/conda_build.sh
ERROR: Build failed!
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:665 in build                                                                                   │
│                                                                                                  │
│   662 │   │   │   f.write("\n".join(sorted(list(files_before_script))))                          │
│   663 │   │   │   f.write("\n")                                                                  │
│   664 │   │                                                                                      │
│ ❱ 665 │   │   execute_build_script(m, src_dir, env, provision_only=provision_only)               │
│   666 │   │                                                                                      │
│   667 │   │   if provision_only:                                                                 │
│   668 │   │   │   return                                                                         │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:557 in execute_build_script                                                                    │
│                                                                                                  │
│   554 │   │   │   │   │   del env["CONDA_BUILD"]                                                 │
│   555 │   │   │   │   │   env["PKG_NAME"] = m.get_value("package/name")                          │
│   556 │   │   │   │   │                                                                          │
│ ❱ 557 │   │   │   │   │   utils.check_call_env(                                                  │
│   558 │   │   │   │   │   │   cmd,                                                               │
│   559 │   │   │   │   │   │   env=env,                                                           │
│   560 │   │   │   │   │   │   rewrite_stdout_env=rewrite_env,                                    │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/conda_build/util │
│ s.py:402 in check_call_env                                                                       │
│                                                                                                  │
│    399                                                                                           │
│    400                                                                                           │
│    401 def check_call_env(popenargs, **kwargs):                                                  │
│ ❱  402 │   return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)               │
│    403                                                                                           │
│    404                                                                                           │
│    405 def check_output_env(popenargs, **kwargs):                                                │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/conda_build/util │
│ s.py:382 in _func_defaulting_env_to_os_environ                                                   │
│                                                                                                  │
│    379 │   │   │   out = proc.out.read()                                                         │
│    380 │   │                                                                                     │
│    381 │   │   if proc.returncode != 0:                                                          │
│ ❱  382 │   │   │   raise subprocess.CalledProcessError(proc.returncode, _args)                   │
│    383 │   │                                                                                     │
│    384 │   │   stats.update({'elapsed': proc.elapsed,                                            │
│    385 │   │   │   │   │   'disk': proc.disk,                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work/conda_build.sh']' returned 
non-zero exit status 1.

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/run_bui │
│ ld.py:376 in build_recipe                                                                        │
│                                                                                                  │
│   373 │   │   │   │   f"\n[yellow]Starting build for [bold]{o.name}[/bold][/yellow]\n"           │
│   374 │   │   │   )                                                                              │
│   375 │   │   │                                                                                  │
│ ❱ 376 │   │   │   final_outputs = build(                                                         │
│   377 │   │   │   │   meta,                                                                      │
│   378 │   │   │   │   None,                                                                      │
│   379 │   │   │   │   allow_interactive=interactive,                                             │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:712 in build                                                                                   │
│                                                                                                  │
│   709 │   │   │   │   sys.exit()                                                                 │
│   710 │   │   else:                                                                              │
│   711 │   │   │   console.print("[red]ERROR: Build failed!")                                     │
│ ❱ 712 │   │   │   raise RuntimeError("Build failed")                                             │
│   713                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Build failed
Build failed
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:665 in build                                                                                   │
│                                                                                                  │
│   662 │   │   │   f.write("\n".join(sorted(list(files_before_script))))                          │
│   663 │   │   │   f.write("\n")                                                                  │
│   664 │   │                                                                                      │
│ ❱ 665 │   │   execute_build_script(m, src_dir, env, provision_only=provision_only)               │
│   666 │   │                                                                                      │
│   667 │   │   if provision_only:                                                                 │
│   668 │   │   │   return                                                                         │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:557 in execute_build_script                                                                    │
│                                                                                                  │
│   554 │   │   │   │   │   del env["CONDA_BUILD"]                                                 │
│   555 │   │   │   │   │   env["PKG_NAME"] = m.get_value("package/name")                          │
│   556 │   │   │   │   │                                                                          │
│ ❱ 557 │   │   │   │   │   utils.check_call_env(                                                  │
│   558 │   │   │   │   │   │   cmd,                                                               │
│   559 │   │   │   │   │   │   env=env,                                                           │
│   560 │   │   │   │   │   │   rewrite_stdout_env=rewrite_env,                                    │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/conda_build/util │
│ s.py:402 in check_call_env                                                                       │
│                                                                                                  │
│    399                                                                                           │
│    400                                                                                           │
│    401 def check_call_env(popenargs, **kwargs):                                                  │
│ ❱  402 │   return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)               │
│    403                                                                                           │
│    404                                                                                           │
│    405 def check_output_env(popenargs, **kwargs):                                                │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/conda_build/util │
│ s.py:382 in _func_defaulting_env_to_os_environ                                                   │
│                                                                                                  │
│    379 │   │   │   out = proc.out.read()                                                         │
│    380 │   │                                                                                     │
│    381 │   │   if proc.returncode != 0:                                                          │
│ ❱  382 │   │   │   raise subprocess.CalledProcessError(proc.returncode, _args)                   │
│    383 │   │                                                                                     │
│    384 │   │   stats.update({'elapsed': proc.elapsed,                                            │
│    385 │   │   │   │   │   'disk': proc.disk,                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/opt/homebrew/Caskroom/miniconda/base/envs/emforge/conda-bld/regex-0_1679128758529/work/conda_build.sh']' returned 
non-zero exit status 1.

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/michaelweinold/github/emforge-recipes/builder.py:176 in explicit                          │
│                                                                                                  │
│   173 │   if emscripten_32:                                                                      │
│   174 │   │   print("WITH EM")                                                                   │
│   175 │   │   platform = "emscripten-32"                                                         │
│ ❱ 176 │   boa_build(                                                                             │
│   177 │   │   work_dir=work_dir,                                                                 │
│   178 │   │   target=recipe_dir,                                                                 │
│   179 │   │   platform=platform,                                                                 │
│                                                                                                  │
│ /Users/michaelweinold/github/emforge-recipes/builder.py:132 in boa_build                         │
│                                                                                                  │
│   129 │   │   post_build_callback, skip_tests=skip_tests, work_dir=work_dir                      │
│   130 │   )                                                                                      │
│   131 │                                                                                          │
│ ❱ 132 │   py_build(                                                                              │
│   133 │   │   target=target,                                                                     │
│   134 │   │   recipe_dir=recipe_dir,                                                             │
│   135 │   │   target_platform=target_platform,                                                   │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/pyapi.py:96  │
│ in py_build                                                                                      │
│                                                                                                  │
│   93 │                                                                                           │
│   94 │   from boa.core.run_build import run_build                                                │
│   95 │                                                                                           │
│ ❱ 96 │   run_build(args)                                                                         │
│   97                                                                                             │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/run_bui │
│ ld.py:529 in run_build                                                                           │
│                                                                                                  │
│   526 │   │   │   │   rerun_build = True                                                         │
│   527 │   │   │   except Exception as e:                                                         │
│   528 │   │   │   │   print(e)                                                                   │
│ ❱ 529 │   │   │   │   raise e                                                                    │
│   530 │   │   │   else:                                                                          │
│   531 │   │   │   │   break                                                                      │
│   532                                                                                            │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/run_bui │
│ ld.py:504 in run_build                                                                           │
│                                                                                                  │
│   501 │   for recipe in all_recipes:                                                             │
│   502 │   │   while True:                                                                        │
│   503 │   │   │   try:                                                                           │
│ ❱ 504 │   │   │   │   sorted_outputs,final_names = build_recipe(                                 │
│   505 │   │   │   │   │   args.command,                                                          │
│   506 │   │   │   │   │   recipe["recipe_file"],                                                 │
│   507 │   │   │   │   │   cbc,                                                                   │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/run_bui │
│ ld.py:419 in build_recipe                                                                        │
│                                                                                                  │
│   416 │   │   │   │   raise e                                                                    │
│   417 │   │   │   else:                                                                          │
│   418 │   │   │   │   console.print_exception(show_locals=False)                                 │
│ ❱ 419 │   │   │   │   raise e                                                                    │
│   420 │                                                                                          │
│   421 │   for o in sorted_outputs:                                                               │
│   422 │   │   if o in failed_outputs:                                                            │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/run_bui │
│ ld.py:376 in build_recipe                                                                        │
│                                                                                                  │
│   373 │   │   │   │   f"\n[yellow]Starting build for [bold]{o.name}[/bold][/yellow]\n"           │
│   374 │   │   │   )                                                                              │
│   375 │   │   │                                                                                  │
│ ❱ 376 │   │   │   final_outputs = build(                                                         │
│   377 │   │   │   │   meta,                                                                      │
│   378 │   │   │   │   None,                                                                      │
│   379 │   │   │   │   allow_interactive=interactive,                                             │
│                                                                                                  │
│ /opt/homebrew/Caskroom/miniconda/base/envs/emforge/lib/python3.10/site-packages/boa/core/build.p │
│ y:712 in build                                                                                   │
│                                                                                                  │
│   709 │   │   │   │   sys.exit()                                                                 │
│   710 │   │   else:                                                                              │
│   711 │   │   │   console.print("[red]ERROR: Build failed!")                                     │
│ ❱ 712 │   │   │   raise RuntimeError("Build failed")                                             │
│   713                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Build failed
@wolfv
Copy link
Contributor

wolfv commented Mar 18, 2023

Thanks for trying @michaelweinold, and sorry for the hard time you're having.

The error is here: /Users/michaelweinold/Library/Caches/empack/emsdk-3.1.2/emsdk_env.sh: No such file or directory

I setup a Apple Silicon computer yesterday, and I installed emsdk from the official instructions, something like

cd ~/Programs # that's just a personal preference

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk

# Fetch the latest version of the emsdk (not needed the first time you clone)
git pull

# Download and install the latest SDK tools. (if you want to be exact, 3.1.27 is the er
./emsdk install 3.1.27

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate 3.1.27

# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh

Then, when emscripten was installed, I changed the ~/.emsdkdir file to contain:

/Users/wolfv/Programs/emsdk

You could do that e.g. with

cd ~/Programs/emsdk
echo $(pwd) > ~/.emsdkdir
# and to make sure, check with 
cat ~/.emsdkdir

It's a bit annoying that there are still so many manual steps ... hopefully we can streamline this further soon!

@michaelweinold
Copy link
Contributor Author

That did the trick, thank you @wolfv.

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

No branches or pull requests

2 participants