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

Add toolchain cb3 compilers #34

Merged
merged 5 commits into from
Apr 28, 2018
Merged

Add toolchain cb3 compilers #34

merged 5 commits into from
Apr 28, 2018

Conversation

isuruf
Copy link
Member

@isuruf isuruf commented Apr 27, 2018

@conda-forge-linter
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.

@isuruf
Copy link
Member Author

isuruf commented Apr 27, 2018

@conda-forge-admin, please rerender.

@conda-forge-linter
Copy link

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:

  • The recipe must have some tests.

@msarahan
Copy link
Member

This looks good to me. I simplified it a few ways, but the general concepts are all correct.

recipe/meta.yaml Outdated
run_exports:
strong:
- libstdcxx-ng >=4.9 # [linux]
- libcxx >=4.0 # [osx]
Copy link
Member

Choose a reason for hiding this comment

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

So we currently don't ship these things as we have been using system libraries. Guess we could start doing that with Linux and that would probably help some people who have been wanting this functionality. As we use devtoolset-2, all code is compatible with 4.4+. The LLVM version is based off of 3.6. So would assume the libcxx version matches, but am having trouble finding conformation. Given there are some symbols removed in 4.0, we might want to be a little more cautious here.

ref: https://abi-laboratory.pro/tracker/compat_report/libcxx/3.9.1/4.0.0/54f71/abi_compat_report.html

Copy link
Member

Choose a reason for hiding this comment

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

Maybe @mingwandroid can tell me that I'm being too paranoid here. ;)

- name: toolchain_fort_{{ target_platform }}
requirements:
- {{ pin_subpackage('toolchain', exact=True) }}
- gcc # [osx]
Copy link
Member

Choose a reason for hiding this comment

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

Should we consider this for Linux as well? Personally am of two minds about it. Some low-level packages like scipy avoid the gcc package to avoid some very old issues we use to have regarding the compiler runtime not always being shipped. While the rest of the stack has no problem using gcc for Fortran on either platform.

Copy link
Member Author

Choose a reason for hiding this comment

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

If we don't add this for Linux, we should install gfortran in the docker image. I didn't want to install gcc because I remember issues about gcc not working sometimes due to bugs in it. Shall I send a PR to install gfortran in docker image? or add gcc for Linux here?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah adding gfortran to the docker image seems like the least troublesome option. Let's go with that. It shouldn't affect anyone using the gcc package with libgcc already as those will take priority. Also with this change to toolchain anyone using the docker-image gfortran will just get the run time libraries added.

@jakirkham
Copy link
Member

So what happens if we merge this and someone installs toolchain as is (i.e. as a build requirement)?

Also what happens on the Windows front given we add a no-op Windows compiler? Does that override, supplements, something else to what defaults provides? If it supplements, what would the order be?

@isuruf
Copy link
Member Author

isuruf commented Apr 27, 2018

So what happens if we merge this and someone installs toolchain as is (i.e. as a build requirement)?

No change

Also what happens on the Windows front given we add a no-op Windows compiler? Does that override, supplements, something else to what defaults provides? If it supplements, what would the order be?

We are not adding a no-op windows compiler. We'd be using,

c_compiler:
  - vs2008                     # [win]
  - vs2015                     # [win]
  - vs2015                     # [win]
  - toolchain_c               # [unix]

So {{ compiler('c') }} would expand to toolchain_c_linux-64 (which is from this PR) for linux and vs2008_win-64 (which is from defaults) for windows.

@isuruf
Copy link
Member Author

isuruf commented Apr 27, 2018

See conda-forge/conda-forge-pinning-feedstock#48 for how this would be used.

@isuruf isuruf merged commit c7f12bb into conda-forge:master Apr 28, 2018
@isuruf isuruf deleted the compiler branch April 28, 2018 03:39
@jakirkham
Copy link
Member

Thanks @isuruf.

@jakirkham
Copy link
Member

Guess the next step is to start educating people about this change by updating examples and docs.

@mingwandroid
Copy link

Can anyone give me a high level overview of what's going on here?

@isuruf
Copy link
Member Author

isuruf commented Apr 28, 2018

{{ compiler('c') }} is expanded to toolchain_c which is just toolchain + libgcc.

This is done so that we can merge AnacondaRecipes recipes back to conda-forge. To use the new compilers we only have to change conda_build_config.yaml, which we will do once all the packages are rebuilt. This was @msarahan's idea. He can give you more details.

- {{ pin_subpackage('toolchain', exact=True) }}
run_exports:
strong:
- libstdcxx-ng >=4.9 # [linux]
Copy link
Member

Choose a reason for hiding this comment

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

Should this use

        - libcxx >=???  # [osx]

?

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.

7 participants