Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Possible issue with NoCodeSign.xcconfig #302

Closed
hadronized opened this issue Dec 14, 2018 · 11 comments
Closed

Possible issue with NoCodeSign.xcconfig #302

hadronized opened this issue Dec 14, 2018 · 11 comments

Comments

@hadronized
Copy link
Contributor

Hey,

I made a PR lately to fix a weird signing issue with the ios-nocodesign-* toolchains. While it worked on pretty much all of our CI jobs, one failed when CMake tried to check whether the compiler was okay. I think the problem is due to one extra line in the NoCodeSign.xcconfig file, but I’m unsure and I don’t know whether others reproduce.

The line I deleted on a local fork is:

CODE_SIGN_ENTITLEMENTS=""

leaving the file as:

CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED="NO"
CODE_SIGNING_ALLOWED="NO"

I’m currently testing my patch before opening a new PR. What do you think?

@ruslo
Copy link
Owner

ruslo commented Dec 14, 2018

I’m currently testing my patch before opening a new PR. What do you think?

The version before #300 worked fine for my local machine and on Travis machines. The #300 patch seems to be fine there too. So it's hard to say :)

@ruslo
Copy link
Owner

ruslo commented Dec 14, 2018

I made a PR lately to fix a weird signing issue with the ios-nocodesign-* toolchains. While it worked on pretty much all of our CI jobs, one failed when CMake tried to check whether the compiler was okay

It does make sense to save the error message that you have for the history. What error message was before the #300 was applied and what error message do you have now?

@hadronized
Copy link
Contributor Author

Prior to #300, we had the binary on simulation signed and we had to manually remove the signature after the build. After #300, we had this:

-- Check for working C compiler: /Applications/Xcode-10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- broken
CMake Error at /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

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

  is not able to compile a simple test program.

…

builtin-productPackagingUtility -entitlements -format xml -o /Users/distiller/****/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphonesimulator/cmTC_235b1.build/cmTC_235b1.app-Simulated.xcent
    warning: Falling back to contents of entitlements file """" because it was modified during the build process. Modifying the entitlements file during the build is unsupported.error: The file “""” couldn’t be opened because there is no such file.
    
    ** BUILD FAILED **

@hadronized
Copy link
Contributor Author

I confirm my patch fixes it. I’ll do another PR if you want.

@ruslo
Copy link
Owner

ruslo commented Dec 14, 2018

Prior to #300, we had the binary on simulation signed and we had to manually remove the signature after the build.

Can you post step by step instructions with all details: CMake version, Polly toolchain, Xcode version, log with sign instruction line, the code itself.

@hadronized
Copy link
Contributor Author

Hello,

I’m not sure what to do with the details since it’s code from work. It’s open-source though so I guess it should be okay. I’m adding @KhalilBellakrid and @pollastri-pierre to the discussion for this purpose.

The failible job can be found here.

@ruslo
Copy link
Owner

ruslo commented Dec 17, 2018

I’m not sure what to do with the details since it’s code from work.

There is no need to show the whole project, of course only minimal example would be nice to have.

The failible job can be found here.

Okay, at least some info :) It's Xcode 10 and we are failing while checking that C compiler is not broken.

@hadronized
Copy link
Contributor Author

Yes, and I think it’s due to the empty entitlements. I only a few about iOS, so I wrote a sed line to fix that in our circle-ci job. I just wanted you to know. :)

@ruslo
Copy link
Owner

ruslo commented Dec 19, 2018

I've added iOS tests to CI: b14ab7b

CMake 3.13.2, ios-nocodesign-11-4-dep-9-3-armv7, Xcode 9.4.1:

CMake 3.13.2, ios-nocodesign-12-1-dep-9-3-armv7, Xcode 10.1:

The failible job can be found here.

I've noticed that you've used this line:

-G Xcode -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTS=OFF
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DCMAKE_MACOSX_BUNDLE:BOOL=ON
-DCMAKE_OSX_SYSROOT:STRING=iphonesimulator -DCMAKE_TOOLCHAIN_FILE=/Users/distiller/lib-ledger-core/toolchains/polly/ios-nocodesign-11-2-dep-9-3.cmake

CMAKE_OSX_ARCHITECTURES and CMAKE_OSX_SYSROOT should not be used here. If you want to limit architectures to 64 bit variants then you should use another toolchain like ios-10-3-dep-9-3-x86-64-arm64. Also last time I've tried simulator-only toolchain I had CMake issues, so all Polly toolchains with simulator have ARM-device part.

@hadronized
Copy link
Contributor Author

Interesting, thanks for your feedback!

@ruslo
Copy link
Owner

ruslo commented Mar 26, 2019

Closing inactive discussion.

@ruslo ruslo closed this as completed Mar 26, 2019
jdonald added a commit to rrbpalm/polly that referenced this issue Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants