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

MNT: rerender #349

Conversation

conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I've started rerendering the recipe as instructed in #348.

If I find any needed changes to the recipe, I'll push them to this PR shortly. Thank you for waiting!

Here's a checklist to do before merging.

Fixes #348

Copy link
Contributor

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/meta.yaml) and found it was in an excellent condition.

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the latest webservices GitHub actions workflow run for errors. You can also ping conda-forge/core for further assistance or you can try rerendering locally.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/conda-forge-ci-setup-feedstock/actions/runs/11042286022.

@beckermr
Copy link
Member

@jakirkham rerendering is failing too

This might be conda-build 24.9

@beckermr
Copy link
Member

The rerender is still broken in conda-build 24.7 which is fun.

@jakirkham
Copy link
Member

jakirkham commented Sep 25, 2024

Here is the error message from CI:

Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_build/metadata.py", line 2003, in _get_contents
    rendered = template.render(environment=env)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/tmp/tmpzes4vsc5/conda-forge-ci-setup-feedstock/recipe/meta.yaml", line 24, in top-level template code
    - cp {{ os.environ["FEEDSTOCK_ROOT"] }}/LICENSE.txt ${RECIPE_DIR}/LICENSE.txt            # [linux]
^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'os._Environ object' has no attribute 'FEEDSTOCK_ROOT'

Edit: This points to this line

- cp {{ os.environ["FEEDSTOCK_ROOT"] }}/LICENSE.txt ${RECIPE_DIR}/LICENSE.txt # [linux]

@beckermr
Copy link
Member

beckermr commented Sep 25, 2024

Yeah this change fixes it locally:

- cp {{ os.environ.get("FEEDSTOCK_ROOT", "..") }}/LICENSE.txt ${RECIPE_DIR}/LICENSE.txt  # [linux]

What's weird is that I have no idea when this broke. That line of code has not been touched for ~4 years.

@jakirkham
Copy link
Member

Yeah does seem like a conda-build thing. That said, am confused why we have 3 different approaches for this use case

- cp {{ os.environ["FEEDSTOCK_ROOT"] }}/LICENSE.txt ${RECIPE_DIR}/LICENSE.txt # [linux]
- cp ${RECIPE_DIR}/../LICENSE.txt ${RECIPE_DIR}/LICENSE.txt # [osx]
- COPY "%RECIPE_DIR%\\..\\LICENSE.txt" "%RECIPE_DIR%\\LICENSE.txt" # [win]

@beckermr
Copy link
Member

I doubt it is conda-build though with the change here. Now the cross-compile jobs are failing when they did not before.

@beckermr
Copy link
Member

The build envs are radically different from this morning to this job. IDK what is going on but it is a lot.

cc @isuruf @h-vetinari who have been doing work on compilers lately. Any ideas on why cross-python is failing?

@beckermr
Copy link
Member

beckermr commented Sep 25, 2024

failing build env

2024-09-25T22:33:40.7526970Z     _libgcc_mutex:                             0.1-conda_forge            conda-forge
2024-09-25T22:33:40.7527576Z     _openmp_mutex:                             4.5-2_gnu                  conda-forge
2024-09-25T22:33:40.7528179Z     _sysroot_linux-ppc64le_curr_repodata_hack: 4-h43410cf_16              conda-forge
2024-09-25T22:33:40.7528817Z     binutils_impl_linux-ppc64le:               2.43-h28622da_0            conda-forge
2024-09-25T22:33:40.7529402Z     bzip2:                                     1.0.8-h4bc722e_7           conda-forge
2024-09-25T22:33:40.7530264Z     ca-certificates:                           2024.8.30-hbcca054_0       conda-forge
2024-09-25T22:33:40.7530961Z     cross-python_linux-ppc64le:                3.11-43_cpython            conda-forge
2024-09-25T22:33:40.7531563Z     crossenv:                                  1.4.0-pyhd8ed1ab_0         conda-forge
2024-09-25T22:33:40.7532154Z     gcc_impl_linux-ppc64le:                    14.1.0-hb63d528_1          conda-forge
2024-09-25T22:33:40.7532778Z     gxx_impl_linux-ppc64le:                    14.1.0-he81d928_1          conda-forge
2024-09-25T22:33:40.7533371Z     kernel-headers_linux-ppc64le:              3.10.0-h23d7e6c_16         conda-forge
2024-09-25T22:33:40.7533872Z     ld_impl_linux-64:                          2.43-h712a8e2_0            conda-forge
2024-09-25T22:33:40.7534319Z     ld_impl_linux-ppc64le:                     2.43-hf0bc666_0            conda-forge
2024-09-25T22:33:40.7534760Z     libexpat:                                  2.6.3-h5888daf_0           conda-forge
2024-09-25T22:33:40.7535211Z     libffi:                                    3.4.2-h7f98852_5           conda-forge
2024-09-25T22:33:40.7535710Z     libgcc:                                    14.1.0-h77fa898_1          conda-forge
2024-09-25T22:33:40.7536170Z     libgcc-devel_linux-ppc64le:                14.1.0-habf6d70_1          conda-forge
2024-09-25T22:33:40.7536618Z     libgcc-ng:                                 14.1.0-h69a702a_1          conda-forge
2024-09-25T22:33:40.7537347Z     libgomp:                                   14.1.0-h77fa898_1          conda-forge
2024-09-25T22:33:40.7537782Z     libiconv:                                  1.17-hd590300_2            conda-forge
2024-09-25T22:33:40.7538231Z     libnsl:                                    2.0.1-hd590300_0           conda-forge
2024-09-25T22:33:40.7538660Z     libsqlite:                                 3.46.1-hadc24fc_0          conda-forge
2024-09-25T22:33:40.7539089Z     libstdcxx:                                 14.1.0-hc0a3c3a_1          conda-forge
2024-09-25T22:33:40.7539534Z     libstdcxx-devel_linux-ppc64le:             14.1.0-habf6d70_1          conda-forge
2024-09-25T22:33:40.7540170Z     libstdcxx-ng:                              14.1.0-h4852527_1          conda-forge
2024-09-25T22:33:40.7540630Z     libuuid:                                   2.38.1-h0b41bf4_0          conda-forge
2024-09-25T22:33:40.7541060Z     libxcrypt:                                 4.4.36-hd590300_1          conda-forge
2024-09-25T22:33:40.7541493Z     libzlib:                                   1.3.1-h4ab18f5_1           conda-forge
2024-09-25T22:33:40.7541915Z     lz4-c:                                     1.9.4-hcb278e6_0           conda-forge
2024-09-25T22:33:40.7542340Z     ncurses:                                   6.5-he02047a_1             conda-forge
2024-09-25T22:33:40.7542764Z     openssl:                                   3.3.2-hb9d3cd8_0           conda-forge
2024-09-25T22:33:40.7543208Z     popt:                                      1.16-h0b475e3_2002         conda-forge
2024-09-25T22:33:40.7543635Z     python:                                    3.11.10-hc5c86c4_1_cpython conda-forge
2024-09-25T22:33:40.7544227Z     readline:                                  8.2-h8228510_1             conda-forge
2024-09-25T22:33:40.7544660Z     rsync:                                     3.3.0-he6cb5fe_0           conda-forge
2024-09-25T22:33:40.7545081Z     sed:                                       4.8-he412f7d_0             conda-forge
2024-09-25T22:33:40.7545513Z     sysroot_linux-ppc64le:                     2.17-h23d7e6c_16           conda-forge
2024-09-25T22:33:40.7545973Z     tk:                                        8.6.13-noxft_h4845f30_101  conda-forge
2024-09-25T22:33:40.7546401Z     tzdata:                                    2024a-h8827d51_1           conda-forge
2024-09-25T22:33:40.7546822Z     xxhash:                                    0.8.2-hd590300_0           conda-forge
2024-09-25T22:33:40.7547243Z     xz:                                        5.2.6-h166bdaf_0           conda-forge
2024-09-25T22:33:40.7547660Z     zstd:                                      1.5.6-ha6fb4c9_0           conda-forge

@beckermr
Copy link
Member

beckermr commented Sep 25, 2024

passing build env

2024-09-25T11:25:02.8718143Z     _libgcc_mutex:                             0.1-conda_forge            conda-forge
2024-09-25T11:25:02.8719143Z     _openmp_mutex:                             4.5-2_gnu                  conda-forge
2024-09-25T11:25:02.8722013Z     _sysroot_linux-64_curr_repodata_hack:      3-h69a702a_16              conda-forge
2024-09-25T11:25:02.8722677Z     _sysroot_linux-ppc64le_curr_repodata_hack: 4-h43410cf_16              conda-forge
2024-09-25T11:25:02.8724868Z     binutils_impl_linux-64:                    2.43-h4bf12b8_0            conda-forge
2024-09-25T11:25:02.8725539Z     binutils_impl_linux-ppc64le:               2.40-hfeb27da_7            conda-forge
2024-09-25T11:25:02.8726178Z     binutils_linux-ppc64le:                    2.40-h487de5a_3            conda-forge
2024-09-25T11:25:02.8727652Z     bzip2:                                     1.0.8-h4bc722e_7           conda-forge
2024-09-25T11:25:02.8739800Z     ca-certificates:                           2024.8.30-hbcca054_0       conda-forge
2024-09-25T11:25:02.8741451Z     cross-python_linux-ppc64le:                3.11-42_cpython            conda-forge
2024-09-25T11:25:02.8741936Z     crossenv:                                  1.4.0-pyhd8ed1ab_0         conda-forge
2024-09-25T11:25:02.8742335Z     gcc_impl_linux-64:                         14.1.0-h3c94d91_1          conda-forge
2024-09-25T11:25:02.8742740Z     gcc_impl_linux-ppc64le:                    14.1.0-hb63d528_1          conda-forge
2024-09-25T11:25:02.8743146Z     gcc_linux-ppc64le:                         14.1.0-hf88291c_3          conda-forge
2024-09-25T11:25:02.8743554Z     kernel-headers_linux-64:                   3.10.0-h4a8ded7_16         conda-forge
2024-09-25T11:25:02.8743971Z     kernel-headers_linux-ppc64le:              3.10.0-h23d7e6c_16         conda-forge
2024-09-25T11:25:02.8744377Z     ld_impl_linux-64:                          2.43-h712a8e2_0            conda-forge
2024-09-25T11:25:02.8744773Z     ld_impl_linux-ppc64le:                     2.40-hd9647e7_7            conda-forge
2024-09-25T11:25:02.8745164Z     libexpat:                                  2.6.3-h5888daf_0           conda-forge
2024-09-25T11:25:02.8745795Z     libffi:                                    3.4.2-h7f98852_5           conda-forge
2024-09-25T11:25:02.8746179Z     libgcc:                                    14.1.0-h77fa898_1          conda-forge
2024-09-25T11:25:02.8746566Z     libgcc-devel_linux-64:                     14.1.0-h5d3d1c9_101        conda-forge
2024-09-25T11:25:02.8746969Z     libgcc-devel_linux-ppc64le:                14.1.0-habf6d70_1          conda-forge
2024-09-25T11:25:02.8747364Z     libgcc-ng:                                 14.1.0-h69a702a_1          conda-forge
2024-09-25T11:25:02.8747750Z     libgomp:                                   14.1.0-h77fa898_1          conda-forge
2024-09-25T11:25:02.8748130Z     libiconv:                                  1.17-hd590300_2            conda-forge
2024-09-25T11:25:02.8748510Z     libnsl:                                    2.0.1-hd590300_0           conda-forge
2024-09-25T11:25:02.8748891Z     libsanitizer:                              14.1.0-hcba0ae0_1          conda-forge
2024-09-25T11:25:02.8751601Z     libsqlite:                                 3.46.1-hadc24fc_0          conda-forge
2024-09-25T11:25:02.8752051Z     libstdcxx:                                 14.1.0-hc0a3c3a_1          conda-forge
2024-09-25T11:25:02.8752477Z     libstdcxx-ng:                              14.1.0-h4852527_1          conda-forge
2024-09-25T11:25:02.8752901Z     libuuid:                                   2.38.1-h0b41bf4_0          conda-forge
2024-09-25T11:25:02.8753324Z     libxcrypt:                                 4.4.36-hd590300_1          conda-forge
2024-09-25T11:25:02.8753884Z     libzlib:                                   1.3.1-h4ab18f5_1           conda-forge
2024-09-25T11:25:02.8754297Z     lz4-c:                                     1.9.4-hcb278e6_0           conda-forge
2024-09-25T11:25:02.8754843Z     ncurses:                                   6.5-he02047a_1             conda-forge
2024-09-25T11:25:02.8755248Z     openssl:                                   3.3.2-hb9d3cd8_0           conda-forge
2024-09-25T11:25:02.8755631Z     popt:                                      1.16-h0b475e3_2002         conda-forge
2024-09-25T11:25:02.8756018Z     python:                                    3.11.10-hc5c86c4_1_cpython conda-forge
2024-09-25T11:25:02.8756389Z     readline:                                  8.2-h8228510_1             conda-forge
2024-09-25T11:25:02.8756765Z     rsync:                                     3.3.0-he6cb5fe_0           conda-forge
2024-09-25T11:25:02.8757139Z     sed:                                       4.8-he412f7d_0             conda-forge
2024-09-25T11:25:02.8757517Z     sysroot_linux-64:                          2.17-h4a8ded7_16           conda-forge
2024-09-25T11:25:02.8757911Z     sysroot_linux-ppc64le:                     2.17-h23d7e6c_16           conda-forge
2024-09-25T11:25:02.8758307Z     tk:                                        8.6.13-noxft_h4845f30_101  conda-forge
2024-09-25T11:25:02.8758694Z     tzdata:                                    2024a-h8827d51_1           conda-forge
2024-09-25T11:25:02.8759158Z     xxhash:                                    0.8.2-hd590300_0           conda-forge
2024-09-25T11:25:02.8759544Z     xz:                                        5.2.6-h166bdaf_0           conda-forge
2024-09-25T11:25:02.8759916Z     zstd:                                      1.5.6-ha6fb4c9_0           conda-forge

@jakirkham
Copy link
Member

Summarizing discussion in PR: #337

We noticed the conda-forge-ci-setup cross-compiled architectures are failing (for example)

__main__.py: error: argument --sysroot: expected one argument

This led us to the cross-python package, which has this logic in its activation script:

    $BUILD_PREFIX/bin/python -m crossenv $PREFIX/bin/python \
        --sysroot $CONDA_BUILD_SYSROOT \
        --without-pip $BUILD_PREFIX/venv \
        --sysconfigdata-file "$sysconfigdata_fn" \
	--machine ${machine} \
        --cc ${CC:-@CC@} \
        --cxx ${CXX:-@CXX@}

So for some reason $CONDA_BUILD_SYSROOT is now undefined

@jakirkham
Copy link
Member

Also saw this issue ( conda-forge/binutils-feedstock#76 ) earlier. Could that be related or is it something else?

@beckermr
Copy link
Member

I doubt it is the binutils issue. We need to figure out what sets CONDA_BUILD_SYSROOT. A google search did not yield anything.

@beckermr
Copy link
Member

@jakirkham
Copy link
Member

We set CONDA_BUILD_SYSROOT in the compilers

  "CONDA_BUILD_SYSROOT,${CONDA_PREFIX}@LIBRARY_PREFIX@/@CHOST@/sysroot" \

Not sure if that is the only place though

@beckermr
Copy link
Member

jinx!

@jakirkham
Copy link
Member

Well the binutils case is interesting as we were missing activation scripts there. Am a little fuzzy on what those activation scripts would do, but maybe they set some environment variables like these?

@beckermr
Copy link
Member

The failing jobs skip activation of the compilers all together.

recipe/meta.yaml Outdated
Comment on lines 24 to 29
# Copy feedstock license file to recipe directory
- pushd {{ RECIPE_DIR }}
- pushd ..
- cp LICENSE.txt {{ RECIPE_DIR }}
- popd
- popd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we mount the recipe directory and the feedstock directory next to each other...

-v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \

... pushd {{ RECIPE_DIR }}/.. would resolve to /home/conda (not mention not work on Windows)

To avoid that behavior, we pushd to {{ RECIPE_DIR }}. Once in {{ RECIPE_DIR }}, we are within the feedstock directory's recipe directory. So pushd .. resolves to the feedstock directory (instead of /home/conda as it would have in the other case)

Once we are in the feedstock directory, we can copy the feedstock license file and popd back to where we were

This all works around the issue we saw where FEEDSTOCK_ROOT didn't resolve during re-rendering

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah using .get works fine too. No preference on which we use but I am very confused as to why this fails now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it is weird this fails

Though ideally there would be a simple solution so we are not doing different thing for macOS, Linux & Windows

Maybe we can just use recipe-scripts-license.txt

Suggested change
# Copy feedstock license file to recipe directory
- pushd {{ RECIPE_DIR }}
- pushd ..
- cp LICENSE.txt {{ RECIPE_DIR }}
- popd
- popd
# Copy feedstock license file to recipe directory
- pushd {{ RECIPE_DIR }}
- cp recipe-scripts-license.txt LICENSE.txt
- popd

@beckermr
Copy link
Member

Despite the issues here, uploads work fine with the new packages. So let's leave them in place and we can push new builds once someone who knows what is happening can figure out why compilers are not being activated in some jobs.

cc @conda-forge/core

This does the same thing. We are just now relying on conda-smithy to do
it for us.
recipe/meta.yaml Outdated
Comment on lines 59 to 62
- {{ compiler('c') }} # [cuda_compiler_version != "None" or build_platform != target_platform]
- {{ stdlib('c') }} # [cuda_compiler_version != "None" or build_platform != target_platform]
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should only use cross-python when the other compilers are used (so CUDA only)?

Suggested change
- {{ compiler('c') }} # [cuda_compiler_version != "None" or build_platform != target_platform]
- {{ stdlib('c') }} # [cuda_compiler_version != "None" or build_platform != target_platform]
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- {{ compiler('c') }} # [cuda_compiler_version != "None"]
- {{ stdlib('c') }} # [cuda_compiler_version != "None"]
- python # [cuda_compiler_version != "None" and build_platform != target_platform]
- cross-python_{{ target_platform }} # [cuda_compiler_version != "None" and build_platform != target_platform]

- COPY "%RECIPE_DIR%\\..\\LICENSE.txt" "%RECIPE_DIR%\\LICENSE.txt" # [win]
# Copy feedstock license file to recipe directory
- pushd {{ RECIPE_DIR }}
- cp recipe-scripts-license.txt LICENSE.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this rely on an implementation detail in smithy? It is also very opaque since this file appears nowhere in the actual recipe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am ok going back to the previous approach. Was just trying this to see if we could simplify

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we should go back and add a .get

Comment on lines -60 to +62
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python # [cuda_compiler_version != "None" and build_platform != target_platform]
- cross-python_{{ target_platform }} # [cuda_compiler_version != "None" and build_platform != target_platform]
Copy link
Member

@beckermr beckermr Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is wrong. even when cuda compiler version is none we need the cross-python tools for cross-builds of the python package in this recipe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the osx-arm64 build failures with this change for example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah was just trying stuff. Agree this isn't working

Should we consider moving this to noarch using virtual OS packages?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can but i'd like to understand why this is failing when it did not this morning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, do you know why we need all of the cuda variants?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It is odd

The CUDA variants are for testing ( #93 ). There have been a few rounds of cleanup of these ( for example: #191 ). At this point only CUDA pre-12 uses this, which is only CUDA 11.8. It will go away whenever we drop CUDA 11.8

@beckermr
Copy link
Member

I put a clean Pr for the rerendering bug here: #350 (comment)

@beckermr
Copy link
Member

My best guess is that it was this PR: conda-forge/ctng-compiler-activation-feedstock#133

@beckermr
Copy link
Member

I bet the new binutils packages with the activation scripts moved into them (so 2.43 build 1) are incompatible with the compiler packages that have the same output activation scripts (e.g., gcc 14.1.0 build < 4).

@beckermr
Copy link
Member

I am trying to test this idea in #351

@jakirkham jakirkham mentioned this pull request Sep 26, 2024
5 tasks
@jakirkham
Copy link
Member

Seems this has been superseded by PRs:

Given this, should we close?

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 this pull request may close these issues.

@conda-forge-admin rerender
3 participants