← All tasks
cppOGRECave/ogre #3093Not a task: not reproduced

【OSX】Android Compiled error on MAC M1

envgap__OGRECave__ogre-3093

01 / FAILURE SIGNATURE

As reported upstream

clang: error: linker command failed with exit code 1 (use -v to see invocation)
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
26c02c910dcc3c90580111403e6e40285ee785ad
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

OGRECave/ogre #3093 · read the original issue
<!--

If you have a question rather than reporting a bug please go to

- https://gitter.im/OGRECave/ogre or

- https://forums.ogre3d.org/

where you get much faster responses.



This is a template helping you to create an issue which can be processed as quickly as possible.

-->

#### System Information

- Ogre Version: v14.2.4

- Operating System / Platform: OSX

- RenderSystem:  opengl



#### Detailled description

<!-- your description -->

run `cmake -DCMAKE_TOOLCHAIN_FILE=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DANDROID_NDK=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/21.4.7075529   ..  ` then error occured



#### Ogre.log

```



wangjunjie05@baruideMacBook-Pro android % cmake -DCMAKE_TOOLCHAIN_FILE=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DANDROID_NDK=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/21.4.7075529   ..                                   

CMake Warning at /Users/wangjunjie05/Downloads/android-sdk-mac/ndk/19.2.5345600/build/cmake/android.toolchain.cmake:65 (message):

  Using custom NDK path (ANDROID_NDK is set):

  /Users/wangjunjie05/Downloads/android-sdk-mac/ndk/21.4.7075529

Call Stack (most recent call first):

  CMakeFiles/3.29.0/CMakeSystem.cmake:6 (include)

  CMakeLists.txt:50 (enable_language)





-- ANDROID_PLATFORM not set. Defaulting to minimum supported version

16.

-- The OBJC compiler identification is AppleClang 15.0.0.15000309

-- Detecting OBJC compiler ABI info

-- Detecting OBJC compiler ABI info - failed

-- Check for working OBJC compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

-- Check for working OBJC compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - broken

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.29/Modules/CMakeTestOBJCCompiler.cmake:64 (message):

  The Objective-C compiler



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



  is not able to compile a simple test program.



  It fails with the following output:



    Change Dir: '/Users/wangjunjie05/Documents/Github/ogre/CMakeFiles/CMakeScratch/TryCompile-PjKa4V'

    

    Run Build Command(s): /Applications/CMake.app/Contents/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_44496/fast

    /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_44496.dir/build.make CMakeFiles/cmTC_44496.dir/build

    Building OBJC object CMakeFiles/cmTC_44496.dir/testObjCCompiler.m.o

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --sysroot=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64/sysroot   -x objective-c -fPIE -MD -MT CMakeFiles/cmTC_44496.dir/testObjCCompiler.m.o -MF CMakeFiles/cmTC_44496.dir/testObjCCompiler.m.o.d -o CMakeFiles/cmTC_44496.dir/testObjCCompiler.m.o -c /Users/wangjunjie05/Documents/Github/ogre/CMakeFiles/CMakeScratch/TryCompile-PjKa4V/testObjCCompiler.m

    Linking OBJC executable cmTC_44496

    /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_44496.dir/link.txt --verbose=1

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --sysroot=/Users/wangjunjie05/Downloads/android-sdk-mac/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections   CMakeFiles/cmTC_44496.dir/testObjCCompiler.m.o -o cmTC_44496

    ld: unknown options: --exclude-libs --exclude-libs --build-id --warn-shared-textrel --fatal-warnings --exclude-libs --no-undefined -z -z -z --gc-sections 

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    make[1]: *** [cmTC_44496] Error 1

    make: *** [cmTC_44496/fast] Error 2

    

    



  



  CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

  CMakeLists.txt:50 (enable_language)



```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]