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

iOS Examples fail at FastCDR Building #9

Open
caelinsutch opened this issue Jul 15, 2020 · 2 comments
Open

iOS Examples fail at FastCDR Building #9

caelinsutch opened this issue Jul 15, 2020 · 2 comments

Comments

@caelinsutch
Copy link

Output log of failure after running the ament.py build command:

Process package 'fastcdr' with context:
--------------------------------------------------------------------------------
 source_space => /Users/caelinsutch/ros2_ios_ws/src/eProsima/Fast-CDR
  build_space => /Users/caelinsutch/ros2_ios_ws/build/fastcdr
install_space => /Users/caelinsutch/ros2_ios_ws/install
   make_flags => -sdk, iphonesimulator, -j4, -l4
  build_tests => False
--------------------------------------------------------------------------------
+++ Building 'fastcdr'
==> '. /Users/caelinsutch/ros2_ios_ws/build/fastcdr/cmake__build.sh && /usr/local/bin/cmake -DBUILD_TESTING=0 -DTHIRDPARTY=ON -DINSTALL_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=/Users/caelinsutch/ros2_ios_ws/src/ruslo/polly/ios-nocodesign.cmake -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO -DCMAKE_INSTALL_PREFIX=/Users/caelinsutch/ros2_ios_ws/install -G Xcode /Users/caelinsutch/ros2_ios_ws/src/eProsima/Fast-CDR' in '/Users/caelinsutch/ros2_ios_ws/build/fastcdr'
-- [polly] Used toolchain: iOS 13.2 Universal (iphoneos + iphonesimulator) / clang / c++14 support
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - broken
CMake Error at /usr/local/Cellar/cmake/3.17.3/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
  The 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/caelinsutch/ros2_ios_ws/build/fastcdr/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_35bae -configuration Debug -hideShellScriptEnvironment && User defaults from command line:
        HideShellScriptEnvironment = YES
    
    Build settings from configuration file '/Users/caelinsutch/ros2_ios_ws/src/ruslo/polly/scripts/NoCodeSign.xcconfig':
        CODE_SIGNING_REQUIRED = NO
    
    Prepare build
    note: Using legacy build system
    === BUILD TARGET cmTC_35bae OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
    
    Check dependencies
    Code Signing Error: Signing for "cmTC_35bae" requires a development team. Select a development team in the Signing & Capabilities editor.
    
    ** BUILD FAILED **
    
    
    The following build commands failed:
        Check dependencies
    (1 failure)
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:84 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/caelinsutch/ros2_ios_ws/build/fastcdr/CMakeFiles/CMakeOutput.log".
See also "/Users/caelinsutch/ros2_ios_ws/build/fastcdr/CMakeFiles/CMakeError.log".

<== Command '. /Users/caelinsutch/ros2_ios_ws/build/fastcdr/cmake__build.sh && /usr/local/bin/cmake -DBUILD_TESTING=0 -DTHIRDPARTY=ON -DINSTALL_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=/Users/caelinsutch/ros2_ios_ws/src/ruslo/polly/ios-nocodesign.cmake -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO -DCMAKE_INSTALL_PREFIX=/Users/caelinsutch/ros2_ios_ws/install -G Xcode /Users/caelinsutch/ros2_ios_ws/src/eProsima/Fast-CDR' failed in '/Users/caelinsutch/ros2_ios_ws/build/fastcdr' with exit code '1'
<== Command '. /Users/caelinsutch/ros2_ios_ws/build/fastcdr/cmake__build.sh && /usr/local/bin/cmake -DBUILD_TESTING=0 -DTHIRDPARTY=ON -DINSTALL_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=/Users/caelinsutch/ros2_ios_ws/src/ruslo/polly/ios-nocodesign.cmake -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO -DCMAKE_INSTALL_PREFIX=/Users/caelinsutch/ros2_ios_ws/install -G Xcode /Users/caelinsutch/ros2_ios_ws/src/eProsima/Fast-CDR' failed in '/Users/caelinsutch/ros2_ios_ws/build/fastcdr' with exit code '1'

I'm guessing this is related to this polly issue but I'm not sure in which cmake file to set the variable for developer ID

@esteve
Copy link
Owner

esteve commented Jul 16, 2020

@caelinsutch thanks for trying out ros2_objc. What version of XCode are you using? CI uses Xcode 10 IIRC, but it seems that later versions have issues with code signing and CMake:

https://gitlab.kitware.com/cmake/cmake/-/issues/20571

Could you try adding the following arguments to the ament.py command? That is:

src/ament/ament_tools/scripts/ament.py build \
  --use-xcode \
  --cmake-args \
  -DTHIRDPARTY=ON \
  -DINSTALL_EXAMPLES=OFF \
  -DBUILD_SHARED_LIBS=OFF \
  -DCMAKE_TOOLCHAIN_FILE=$HOME/ros2_ios_ws/src/ruslo/polly/ios-nocodesign.cmake \
  -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
  -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
  -DCODE_SIGNING_ALLOWED=NO \
  -- \
  --make-flags -sdk iphoneos

Thanks!

@caelinsutch
Copy link
Author

Are there signing variables we need to export? I remember reading somewhere about the need for developer ID's to build this stuff now.

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

No branches or pull requests

2 participants