Skip to content

Add C compiler to conda environments / recipes #1141

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

Merged
merged 4 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions continuous_integration/environment-3.10-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- c-compiler
Copy link
Collaborator Author

@charlesbluca charlesbluca May 10, 2023

Choose a reason for hiding this comment

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

Despite this being tightly pinned in conda builds, I don't think there's an easy way to pin gcc in the conda environments? c-compiler brings in different compiler packages based on platform, and without the use of conditional selectors I don't think there's a way to pin all of those compiler packages in a single conda environment without causing conflict on at least one platform.

cc @jakirkham if you know of a way to achieve this, happy to punt if not

Copy link
Contributor

Choose a reason for hiding this comment

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

Could have different environment files per platform

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that makes sense - I think that for the sake of minimizing environment files to manage, I'm going to leave things as is since CI seems to be passing with GCC left unpinned. If we do run into failures at some point due to leaving it this way, I'd imagine that platform-specific environment files is the best workaround.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that makes sense. Would probably do the same thing

Happy to revisit if it becomes more relevant

- dask>=2022.3.0
# FIXME: handling is needed for httpx-based fastapi>=0.87.0
- fastapi>=0.69.0,<0.87.0
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/environment-3.8-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- c-compiler
- dask=2022.3.0
- fastapi=0.69.0
- fugue=0.7.3
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/environment-3.9-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- c-compiler
- dask>=2022.3.0
# FIXME: handling is needed for httpx-based fastapi>=0.87.0
- fastapi>=0.69.0,<0.87.0
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/gpuci/environment-3.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- c-compiler
- dask>=2022.3.0
# FIXME: handling is needed for httpx-based fastapi>=0.87.0
- fastapi>=0.69.0,<0.87.0
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/gpuci/environment-3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- c-compiler
- dask>=2022.3.0
# FIXME: handling is needed for httpx-based fastapi>=0.87.0
- fastapi>=0.69.0,<0.87.0
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ build:

requirements:
build:
- {{ compiler('c') }} =11
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I set this pin somewhat arbitrarily, but it seems like GCC 11 successfully built the shared object locally for me

Copy link
Contributor

Choose a reason for hiding this comment

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

Would do this by adding a conda_build_config.yaml file with c_compiler_version specified (like so)

- {{ compiler('rust') }} >=1.65.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Also would move this to conda_build_config.yaml and use rust_compiler_version (similar to c_compiler_version) above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are we still able to specify a lower bound like thing with something like

rust_compiler_version:
    - '>=1.65'

Tried this locally and things seemed to work fine, but not sure if this is just because the compiler version is invalid and getting ignored

Copy link
Contributor

Choose a reason for hiding this comment

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

Think that would work

Though it could also make sense to pick a version for reproducibility reasons

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's fair, I'll go with the latest version being picked up for now (1.69) and we can revisit if there are any issues around that.

- setuptools-rust >=1.5.2
host:
Expand Down