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

[BPT] Setting SDKROOT/MACOSX_DEPLOYMENT_TARGET on macOS (APPLE_CLANG) #1413

Open
jmarrec opened this issue Aug 23, 2021 · 0 comments
Open

[BPT] Setting SDKROOT/MACOSX_DEPLOYMENT_TARGET on macOS (APPLE_CLANG) #1413

jmarrec opened this issue Aug 23, 2021 · 0 comments
Labels

Comments

@jmarrec
Copy link

jmarrec commented Aug 23, 2021

Hello, I'm having trouble with bincrafters-package-tools for APPLE_CLANG 10 on Github Actions. I'm getting an error that seem to imply the SDK root and/or Mac OS deployment target or something should be set.

ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

BPT issues xcode-select --switch:

https://github.com/bincrafters/bincrafters-package-tools/blob/dcbcab93cdec66a89b95c0c8b67069a88a7617dc/bincrafters/prepare_env.py#L64-L77

I ended up fixing my problem by doing this

if [[ "${{ matrix.build_name }}" == 'Apple-Clang 10' ]]; then
  echo "MACOSX_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV
  echo "SDKROOT=/Applications/Xcode_10.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" >> $GITHUB_ENV
fi

The configure script of the project I'm trying to build (github.com/ruby/ruby) does recognize the SDKROOT environment variable, so does CMake. I think BPT should go that for mac to avoid issues.

Package and Environment Details (include every applicable attribute)

  • Conan version: conan 1.39.0
  • Python version: Python 3.7.4

Logs (Include/Attach if Applicable)

Here is a run that fails. On the run one it just says the "C Compiler cannot compile executables".

https://github.com/NREL/conan-openstudio-ruby/runs/3348070035?check_suite_focus=true#step:5:1558

But later I cat the configure log from ruby, and I see the ld issue mentioned above: https://github.com/NREL/conan-openstudio-ruby/runs/3348070035?check_suite_focus=true#step:6:178

After setting the SDKROOT, the C compiler can now compile executables: https://github.com/NREL/conan-openstudio-ruby/runs/3348346142?check_suite_focus=true#step:5:1569

@jmarrec jmarrec added the bug label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant