Skip to content

If ${SDKROOT} is set - use it instead of calling xcrun - #2656

Merged
willend merged 2 commits into
mainfrom
minor-develtool-update
Sep 12, 2026
Merged

If ${SDKROOT} is set - use it instead of calling xcrun#2656
willend merged 2 commits into
mainfrom
minor-develtool-update

Conversation

@willend

@willend willend commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:

Compilation issues on macOS:

  • After my mac upgraded to a new version of command-line tools for Xcode, the xcrun resolved to
xcrun --sdk macosx --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

... which broke my compilation completely - see below.

  • This seems to new for current conda-forge builds... The workaround is to set:
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk/

This PR provides a workaround by allowing the devel tool allows to use an existing SDKROOT if already set.


Compile log before the PR changes

ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd:4:20: error: unknown architecture
                   arm64e.x1-macos, arm64e.x1-maccatalyst ]
                   ^~~~~~~~~~~~~~~

ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd, malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd:4:20: error: unknown architecture
                   arm64e.x1-macos, arm64e.x1-maccatalyst ]
                   ^~~~~~~~~~~~~~~

Undefined symbols for architecture arm64:
  "___error", referenced from:
      _main in cc-370876.o
      ....```

Declaration of use of AI-tools

  • Please add a checkmark here if you used AI-tools during the work for this contribution
  • Furter, please describe how / where and for what the tools were used:

Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:

  • My contribution contains something else

    • Explanation is added in free form text above or below the checklist

(blocked my local conda-forge compilation after macOS installed
 a new version of the commandline tools for Xcode...)
@willend

willend commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Related to #2657

@willend
willend merged commit cdc2d24 into main Sep 12, 2026
26 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.

1 participant