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

feat: Use conda-forge cross-compilation to improve the build process #6

Merged

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented May 10, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@matthewfeickert matthewfeickert self-assigned this May 10, 2024
@conda-forge-webservices
Copy link

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.

I do have some suggestions for making it better though...

For recipe:

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-webservices
Copy link

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.

@conda-forge-webservices
Copy link

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.

I do have some suggestions for making it better though...

For recipe:

@matthewfeickert
Copy link
Member Author

@conda-forge/help-python trying to add the requested

   build:
     - {{ compiler('c') }}
     - {{ compiler('cxx') }}
+    - {{ stdlib("c") }}
     - cross-python_{{ target_platform }}    # [build_platform != target_platform]
     - python                                # [build_platform != target_platform]
     - autoconf

results in the following "nothing provides requested c_linux-64" traceback :

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/boa/cli/mambabuild.py", line 142, in mamba_get_package_records
    _, link_precs = solver.solve_for_unlink_link_precs(_specs, prefix)
  File "/opt/conda/lib/python3.10/site-packages/boa/core/solver.py", line 244, in solve_for_unlink_link_precs
    t = self.solve(specs)
  File "/opt/conda/lib/python3.10/site-packages/boa/core/solver.py", line 234, in solve
    raise RuntimeError("Solver could not find solution." + error_string)
RuntimeError: Solver could not find solution.Mamba failed to solve:
 - gcc_linux-64 12.*
 - automake
 - make
 - c_linux-64
 - libtool
 - autoconf
 - gxx_linux-64 12.*
 - patch
 - swig

with channels:

The reported errors are:
- Encountered problems while solving:
-   - nothing provides requested c_linux-64
-

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/bin/conda-mambabuild", line 10, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.10/site-packages/boa/cli/mambabuild.py", line 301, in main
    call_conda_build(action, config)
  File "/opt/conda/lib/python3.10/site-packages/boa/cli/mambabuild.py", line 273, in call_conda_build
    result = api.build(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/api.py", line 250, in build
    return build_tree(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 3762, in build_tree
    packages_from_this = build(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 2436, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/opt/conda/lib/python3.10/site-packages/conda_build/render.py", line 923, in expand_outputs
    for output_dict, m in deepcopy(_m).get_output_metadata_set(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/metadata.py", line 2613, in get_output_metadata_set
    conda_packages = finalize_outputs_pass(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/metadata.py", line 949, in finalize_outputs_pass
    fm = finalize_metadata(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/render.py", line 645, in finalize_metadata
    build_unsat, host_unsat = add_upstream_pins(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/render.py", line 460, in add_upstream_pins
    build_deps, build_unsat, extra_run_specs_from_build = _read_upstream_pin_files(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/render.py", line 439, in _read_upstream_pin_files
    deps, precs, unsat = get_env_dependencies(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/render.py", line 152, in get_env_dependencies
    precs = environ.get_package_records(
  File "/opt/conda/lib/python3.10/site-packages/boa/cli/mambabuild.py", line 151, in mamba_get_package_records
    raise err
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {MatchSpec("c_linux-64")}

Do you have any advice here?

@matthewfeickert matthewfeickert marked this pull request as ready for review May 10, 2024 19:52
@conda-forge-webservices
Copy link

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.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@matthewfeickert
Copy link
Member Author

matthewfeickert commented May 10, 2024

Ah okay, this required a rerender to work. In that case, I want to keep things atomic, so I'm going to put this back into draft, and open up a seperate PR (PR #7) that is just doing the stdlib c bit.

@matthewfeickert matthewfeickert marked this pull request as draft May 10, 2024 20:00
* Use the cross-compilation selector, '[build_platform != target_platform]', to
  simplify the build process by just doing a pip install.
   - c.f. https://conda-forge.org/docs/maintainer/knowledge_base/#details-about-cross-compiled-python-packages
* Add the cross-python and python build dependency.
* Remove the python-build host dependency.
* Bump the build number.
@matthewfeickert matthewfeickert marked this pull request as ready for review May 10, 2024 20:33
@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please lint

@conda-forge-webservices
Copy link

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.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

Copy link
Contributor

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

I tried to rerender for you, but it looks like there was nothing to do.

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

@matthewfeickert
Copy link
Member Author

@conda-forge/fastjet This is actually ready for review now.

@matthewfeickert matthewfeickert merged commit 156f8b0 into conda-forge:main May 10, 2024
7 checks passed
@matthewfeickert matthewfeickert deleted the feat/improve-build branch May 10, 2024 23:04
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.

1 participant