-
Notifications
You must be signed in to change notification settings - Fork 37
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
iOS平台 Travis CI 打包出错 #17
Comments
你是用这里的方法集成cmake的?
https://docs.conan.io/en/latest/getting_started.html
… On Mar 23, 2020, at 8:24 PM, CocodingLee ***@***.***> wrote:
Applying build-requirement: ***@***.***/stable
***@***.***/stable: WARN: Build folder is dirty, removing it: /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24
***@***.***/stable: Configuring sources in /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/source
***@***.***/stable: Copying previously cached scm sources
***@***.***/stable: Copying sources to build folder
***@***.***/stable: Building your package in /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24
***@***.***/stable: Generator cmake created conanbuildinfo.cmake
***@***.***/stable: Calling build()
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- broken
CMake Error at /usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/Applications/Xcode-10.0.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/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_54c3a/fast && /Applications/Xcode-10.0.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_54c3a.dir/build.make CMakeFiles/cmTC_54c3a.dir/build
Building C object CMakeFiles/cmTC_54c3a.dir/testCCompiler.c.o
/Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --sysroot=/Applications/Xcode-10.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -isysroot/Applications/Xcode-10.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -mios-version-min=9.0 -fembed-bitcode -arch armv7 -isysroot /Applications/Xcode-10.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=9.0 -o CMakeFiles/cmTC_54c3a.dir/testCCompiler.c.o -c /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeTmp/testCCompiler.c
clang: error: invalid argument '-mmacosx-version-min=9.0' not allowed with '-miphoneos-version-min=9.0'
clang: error: invalid version number in '-mmacosx-version-min=9.0'
make[1]: *** [CMakeFiles/cmTC_54c3a.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_54c3a/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeOutput.log".
See also "/Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeError.log".
我在CMakeLists.txt文件加了:
use libc++
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${EXTRA_SANITIZE_OPTIONS}")
set(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++ -fno-rtti")
和
ios target definition
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
if (CMAKE_TARGET_SYSTEM STREQUAL "ios")
set(IOS_DEPLOYMENT_TARGET "9.0")
if ((CMAKE_OSX_ARCHITECTURES STREQUAL "armv7") OR (CMAKE_OSX_ARCHITECTURES STREQUAL "armv7s") OR (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64"))
set(XCODE_IOS_PLATFORM "iphoneos")
else ()
set(XCODE_IOS_PLATFORM "iphonesimulator")
endif ()
set(XCODE_IOS_PLATFORM_VERSION_FLAG "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XCODE_IOS_PLATFORM_VERSION_FLAG}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XCODE_IOS_PLATFORM_VERSION_FLAG}")
elseif (CMAKE_TARGET_SYSTEM STREQUAL "mac")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
endif ()
endif ()
貌似还是不起作用。
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#17>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJ2MLEI2Z4N6TCLQ5WSZO3RI5IHFANCNFSM4LR2S5LQ>.
|
我没有去修改 conan相关的文件, 只是修改了CMakeLists.txt。不知道这么做是否OK? |
我也不确定,你可以去Conan的网站看一下iOS编译的toolchain config,可能有一些变化吧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Applying build-requirement: darwin-toolchain/1.0@theodelrieu/stable
libnekit/0.0.1@zhuhaow/stable: WARN: Build folder is dirty, removing it: /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24
libnekit/0.0.1@zhuhaow/stable: Configuring sources in /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/source
libnekit/0.0.1@zhuhaow/stable: Copying previously cached scm sources
libnekit/0.0.1@zhuhaow/stable: Copying sources to build folder
libnekit/0.0.1@zhuhaow/stable: Building your package in /Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24
libnekit/0.0.1@zhuhaow/stable: Generator cmake created conanbuildinfo.cmake
libnekit/0.0.1@zhuhaow/stable: Calling build()
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- broken
CMake Error at /usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/Applications/Xcode-10.0.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/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeTmp
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeOutput.log".
See also "/Users/travis/.conan/data/libnekit/0.0.1/zhuhaow/stable/build/a33d378deb1c91d921dc7bad923109152f0a9a24/CMakeFiles/CMakeError.log".
我在CMakeLists.txt文件加了:
use libc++
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${EXTRA_SANITIZE_OPTIONS}")
set(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++ -fno-rtti")
和
ios target definition
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
if (CMAKE_TARGET_SYSTEM STREQUAL "ios")
set(IOS_DEPLOYMENT_TARGET "9.0")
if ((CMAKE_OSX_ARCHITECTURES STREQUAL "armv7") OR (CMAKE_OSX_ARCHITECTURES STREQUAL "armv7s") OR (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64"))
set(XCODE_IOS_PLATFORM "iphoneos")
else ()
set(XCODE_IOS_PLATFORM "iphonesimulator")
endif ()
set(XCODE_IOS_PLATFORM_VERSION_FLAG "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XCODE_IOS_PLATFORM_VERSION_FLAG}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XCODE_IOS_PLATFORM_VERSION_FLAG}")
elseif (CMAKE_TARGET_SYSTEM STREQUAL "mac")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
endif ()
endif ()
iOS平台打包貌似还是不起作用。
MacOS平台打包貌似很顺利,依赖库构建好,编译一次过。
The text was updated successfully, but these errors were encountered: