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

Building from source with XCode 11.7 fails #179

Closed
rorbech opened this issue Apr 27, 2021 · 1 comment
Closed

Building from source with XCode 11.7 fails #179

rorbech opened this issue Apr 27, 2021 · 1 comment

Comments

@rorbech
Copy link
Contributor

rorbech commented Apr 27, 2021

Building the project from source with XCode 11.7 fails with

> Task :cinterop:capiMacosUniversal FAILED
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - broken
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/claus.rorbech/proj/realm-kotlin/packages/external/core/capi_macos_universal/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/local/bin/gmake cmTC_0a618/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_0a618.dir/build.make CMakeFiles/cmTC_0a618.dir/build
    gmake[1]: Entering directory '/Users/claus.rorbech/proj/realm-kotlin/packages/external/core/capi_macos_universal/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_0a618.dir/testCCompiler.c.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -arch x86_64 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.9 -o CMakeFiles/cmTC_0a618.dir/testCCompiler.c.o -c /Users/claus.rorbech/proj/realm-kotlin/packages/external/core/capi_macos_universal/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_0a618
    /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0a618.dir/link.txt --verbose=1
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc  -arch x86_64 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_0a618.dir/testCCompiler.c.o -o cmTC_0a618 
    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/lib/darwin/libclang_rt.osx.a, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/lib/darwin/libclang_rt.osx.a (3 slices)
    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd
    ld: dynamic main executables must link with libSystem.dylib for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [CMakeFiles/cmTC_0a618.dir/build.make:106: cmTC_0a618] Error 1
    gmake[1]: Leaving directory '/Users/claus.rorbech/proj/realm-kotlin/packages/external/core/capi_macos_universal/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:140: cmTC_0a618/fast] Error 2

Immediate workaround is to remove "-DOSX_ARM64=1" argument in https://github.com/realm/realm-kotlin/blob/master/packages/cinterop/build.gradle.kts#L323

@rorbech
Copy link
Contributor Author

rorbech commented Aug 19, 2022

Closing as outdated

@rorbech rorbech closed this as completed Aug 19, 2022
@sync-by-unito sync-by-unito bot reopened this Aug 19, 2022
@sync-by-unito sync-by-unito bot closed this as completed Aug 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant