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

Resolve more cases of 'C compiler cannot compile executables' #26167

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Oct 30, 2024

Sometimes when building Chapel the build system will report something like 'C compiler cannot compile executable'. This can indicate the users system is missing some dependencies, or it can mean that extra arguments are needed to work. This PR improves the ability of chplenv to provide those arguments when needed.

Specifically this PR infers when --sysroot or -Wl,-dynamic-linker need to be passed to clang on linux systems.

Testing

  • tested that MacOS is unaffected
  • tested on various Linux systems that the output is correct (4 systems: two different linux clusters, hpe-cray-ex, and hpe-apollo)
  • tested that this patch resolves the issues on the original system that motivated this

[Reviewed by @mppf]

@jabraham17 jabraham17 marked this pull request as ready for review October 30, 2024 15:26
@jabraham17 jabraham17 requested a review from mppf October 30, 2024 15:41
Copy link
Member

@mppf mppf left a comment

Choose a reason for hiding this comment

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

LGTM. I think it would be slightly nicer to have if darwin else linux in the code calling get_sysroot_resource_dir_args and get_sysroot_linux_args but it is not a big deal.

Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit 46c2561 into chapel-lang:main Oct 30, 2024
7 checks passed
@jabraham17 jabraham17 deleted the infer-sysroot branch October 30, 2024 18:59
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.

2 participants