conda-forge / aesara-feedstock

A conda-smithy repository for aesara.
BSD 3-Clause "New" or "Revised" License
4 stars 9 forks source link

Add build for linux-aarch64 #127

Closed jeffreyenos closed 1 year ago

jeffreyenos commented 1 year ago

Checklist

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

jeffreyenos commented 1 year ago

@conda-forge-admin, please rerender

jeffreyenos commented 1 year ago

@conda-forge-admin, please rerender

jeffreyenos commented 1 year ago

@conda-forge-admin, please rerender

brandonwillard commented 1 year ago

The generated build scripts aren't installing the Aesara package correctly?

jeffreyenos commented 1 year ago

Looks like the import aesara issue only appears in the aarch pypy builds.

I'm not sure what's causing this. I'll start by looking for differences in the test environments for linux_aarch64_python3.8.____73_pypy and linux_aarch64_python3.8.____cpython using conda debug.

The other issue appears to be a Windows-specific test script bug.

Looks like this has been addressed in https://github.com/conda-forge/conda-smithy/pull/1724 and so should be fixed in the next release of conda-smithy (I temporarily reverted the breaking changes so the builds succeed).

jeffreyenos commented 1 year ago

I noticed in the logs for the build process that only 1 file was being bundled during post-processing.

In the pypy build the problem seems to be related to pip installing Aesara in the wrong place.

There are two environments activated before Aesara is installed in output_script.sh, e.g.:

eval "$('/opt/conda/bin/python3.10' -m conda shell.bash hook)"
conda activate "/home/conda/feedstock_root/build_artifacts/aesara-suite_1678654328814/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol"
conda activate --stack "/home/conda/feedstock_root/build_artifacts/aesara-suite_1678654328814/_build_env"

python -m pip install . --no-deps -vv

The environment variables PREFIX and BUILD_PREFIX correspond to the first and second environments above, respectively:

PREFIX=/home/conda/feedstock_root/build_artifacts/aesara-suite_1678654328814/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
BUILD_PREFIX=/home/conda/feedstock_root/build_artifacts/aesara-suite_1678654328814/_build_env

In the cpython aarch64 builds, Aesara is installed to PREFIX, while in the pypy aarch64 builds it's installed to BUILD_PREFIX, and is subsequently ignored during bundling. I'm not sure why this is happening, but I was able to fix the issue by explicitly setting --prefix ${PREFIX} when running pip.

Of course, this breaks the Windows builds.

brandonwillard commented 1 year ago

In the cpython aarch64 builds, Aesara is installed to PREFIX, while in the pypy aarch64 builds it's installed to BUILD_PREFIX, and is subsequently ignored during bundling. I'm not sure why this is happening, but I was able to fix the issue by explicitly setting --prefix ${PREFIX} when running pip.

That's a great find! I'll take a look at it from the Aesara side; there might be some special platform-specific handling involved.

brandonwillard commented 1 year ago

All right, I don't see anything pypy-specific in Aesara that could be involved. I'm guessing that this is all conda-forge build script problems.

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

maresb commented 1 year ago

Very nicely done, @jeffreyenos!

Do you have an explanation for 78c7b82? Namely, is this a conda-forge bug, and if so, has it been reported? (I'm mainly wondering if we'll have to revert this file each time we rerender.)

jeffreyenos commented 1 year ago

Very nicely done, @jeffreyenos!

Thank you!

Do you have an explanation for 78c7b82? Namely, is this a conda-forge bug, and if so, has it been reported? (I'm mainly wondering if we'll have to revert this file each time we rerender.)

The batch file issue should be fixed in the next release of conda-smithy (see https://github.com/conda-forge/aesara-feedstock/pull/127#issuecomment-1465051416) so going forward shouldn't be an issue.

maresb commented 1 year ago

Thanks so much for the contribution @jeffreyenos! (Sorry I didn't properly read your previous comment.)

jeffreyenos commented 1 year ago

Thanks so much for the contribution @jeffreyenos! (Sorry I didn't properly read your previous comment.)

No worries of course -- thanks for merging!