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

Specify CMAKE_OSX_DEPLOYMENT_TARGET when building llvm #285

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Jan 11, 2023

The version 11.0 is chosen because Apple seems providing support for two previous releases.
(As of writing this, the latest is 13.)

REVISIT: as we don't need any brand-new OS features, it might make more sense to specify even older version.

This might explain the following error i've seen with wasi-sdk-17.0 release binary on macos-11.0:

    Run Build Command(s):/usr/bin/make -f Makefile cmTC_254ef/fast && /Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_254ef.dir/build.make CMakeFiles/cmTC_254ef.dir/build
    Building C object CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj
    /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang    -o CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj -c /Users/runner/work/toywasm/toywasm/build.wasm/CMakeFiles/CMakeScratch/TryCompile-aWXHXM/testCCompiler.c
    dyld: Symbol not found: __ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE
      Referenced from: /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang (which was built for Mac OS X 12.0)
      Expected in: /usr/lib/libc++.1.dylib
     in /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang
    make[1]: *** [CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj] Abort trap: 6
    make: *** [cmTC_254ef/fast] Error 2

References:
https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html

The version 11.0 is chosen because Apple seems providing
support for two previous releases.
(As of writing this, the latest is 13.)

REVISIT: as we don't need any brand-new OS features, it
might make more sense to specify even older version.

This might explain the following error i've seen with wasi-sdk-17.0
release binary on macos-11.0:
```
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_254ef/fast && /Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_254ef.dir/build.make CMakeFiles/cmTC_254ef.dir/build
    Building C object CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj
    /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang    -o CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj -c /Users/runner/work/toywasm/toywasm/build.wasm/CMakeFiles/CMakeScratch/TryCompile-aWXHXM/testCCompiler.c
    dyld: Symbol not found: __ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE
      Referenced from: /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang (which was built for Mac OS X 12.0)
      Expected in: /usr/lib/libc++.1.dylib
     in /Users/runner/work/toywasm/toywasm/.wasi-sdk-17.0/bin/clang
    make[1]: *** [CMakeFiles/cmTC_254ef.dir/testCCompiler.c.obj] Abort trap: 6
    make: *** [cmTC_254ef/fast] Error 2
```

References:
https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html
@yamt
Copy link
Contributor Author

yamt commented Jan 11, 2023

i confirmed that a copy of the macos artifact of this PR worked fine on a macos-11 github runner. https://github.com/yamt/toywasm/actions/runs/3892506797/jobs/6643994100

@yamt yamt marked this pull request as ready for review January 11, 2023 11:59
@sunfishcode sunfishcode merged commit 8870214 into WebAssembly:main Jan 11, 2023
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.

4 participants