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

Switched to cc pattern in compiler detection #15664

Merged

Conversation

hansenms
Copy link
Contributor

@hansenms hansenms commented Feb 13, 2024

Changelog: Fix: Fix gcc detection in conda environments.
Docs: Omit

In a conda environment, the CC and CXX variables point to /opt/conda/envs//bin/x86_64-conda-linux-gnu-cc and /opt/conda/envs//bin/x86_64-conda-linux-gnu-c++ and the command searched for pattern ends up being /opt/conda/envs//bin/x86_64-conda-linux-gnu-cc and thus _gcc_compiler(command) is never called.

Fixes #14575

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Thanks very much for the contribution @hansenms

Please have a look to the comment. 2.1 is about to be branched, if ready it could be in, otherwise might need to wait until next release.

conan/internal/api/detect_api.py Outdated Show resolved Hide resolved
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution and the review!

@memsharded memsharded added this to the 2.1 milestone Feb 14, 2024
@memsharded memsharded self-assigned this Feb 14, 2024
@memsharded memsharded merged commit 63c3526 into conan-io:develop2 Feb 15, 2024
2 checks passed
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.

Conan fails to detect the compiler although CC and CXX are set
3 participants