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

Setup Local Build instructions fail for both micromamba & conda [apple silicon] #277

Closed
tylere opened this issue Mar 3, 2023 · 8 comments

Comments

@tylere
Copy link

tylere commented Mar 3, 2023

Working through the Setup Local Build docs, I am encountering issues creating the environment.

micromamba create

Using micromamba to create the environment

micromamba create -n emforge -f ci_env.yml

results in

(base) tylere@tylers-mbp recipes % micromamba create -n emforge -f ci_env.yml     

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
microsoft/osx-arm64                                           No change
microsoft/noarch                                              No change
error    libmamba Could not solve for environment specs
    Encountered problems while solving:
      - nothing provides requested patchelf
      - nothing provides requested playwright
    
    The environment can't be solved, aborting the operation
    
critical libmamba Could not solve for environment specs

conda create

Similarly, using conda to create the environment

conda env create -n emforge --file ci_env.yml

results in

(base) tylere@tylers-mbp recipes % conda env create -n emforge --file ci_env.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - playwright
@DerThorsten
Copy link
Contributor

@tylere this is only intended to work for linux64 atm.

@DerThorsten
Copy link
Contributor

playwright / patchelf are not strictly needed for building packages.

Playwright is only for testing the build packages and for patchelf I am confident that we do not use it at all.
But cross-python is not working properly atm on apple silicon..unfortunately..since I also have such a device.
This means that setuptools based builds wont work. But Cmake based things build fine on my m2

@tylere
Copy link
Author

tylere commented Mar 6, 2023

Thanks for the feedback. Confirming that I am encountering this using Apple Silicon (M1) device.

@DerThorsten
Copy link
Contributor

I got most things working on my M2 with the changes here:

#292
I installed playwright via pip and ignored other missing things.

One then needs to build compilers / cross-python packages by hand, as we only have linux variants of them on emscripten-forge atm:

python builder.py build explicit recipes/recipes/emscripten_emscripten-32/
python builder.py build explicit recipes/recipes/cross-python_emscripten-32

and then I can build and test emscripten-32 pkgs locally with:

python builder.py build explicit recipes/recipes_emscripten/regex  --emscripten-32

it should then compile and at the very end you should see:

============================= test session starts ==============================
platform emscripten -- Python 3.10.2, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/web_user/recipe_dir
collecting ...
collected 3 items

test_regex.py
.
.
.
                                                        [100%]

============================== 3 passed in 0.04s ===============================

@DerThorsten DerThorsten changed the title Setup Local Build instructions fail for both micromamba & conda Setup Local Build instructions fail for both micromamba & conda [apple silicon] Mar 13, 2023
@michaelweinold
Copy link
Contributor

#277 (comment):
One then needs to build compilers / cross-python packages by hand, as we only have linux variants of them on emscripten-forge atm:

python builder.py build explicit recipes/recipes/emscripten_emscripten-32/
python builder.py build explicit recipes/recipes/cross-python_emscripten-32#292

@DerThorsten, thank you for the fantastic work around M1/M2 compatibility. Unfortunately, having installed the emforge conda environment (with playwright through pip), running:

python builder.py build explicit recipes/recipes/emscripten_emscripten-32/   

on my M1 MacBook returns the error:

Traceback (most recent call last):
  File "/Users/michaelweinold/github/emforge-recipes/builder.py", line 3, in <module>
    from boa.pyapi import py_build
ModuleNotFoundError: No module named 'boa.pyapi'

@DerThorsten
Copy link
Contributor

the best thing to do is usualy just check what we are doing in the ci =)

we use a particular branch of boa

https://github.com/emscripten-forge/recipes/blob/main/.github/workflows/build_recipes.yaml#L83

@michaelweinold
Copy link
Contributor

the best thing to do is usualy just check what we are doing in the ci =)

🫡 apologies, I missed the @python_api part of the

python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed

command!

@DerThorsten
Copy link
Contributor

no worries..this all very complicated atm =)

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

3 participants