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

Can't compile runtime with CMake 3.14 #1097

Closed
DiThi opened this issue Mar 16, 2019 · 4 comments
Closed

Can't compile runtime with CMake 3.14 #1097

DiThi opened this issue Mar 16, 2019 · 4 comments
Assignees
Milestone

Comments

@DiThi
Copy link

DiThi commented Mar 16, 2019

Followed readme instructions to the letter. Linked cmake and llvm-config to /usr/local/bin/.

We want to compile the runtime to then modify with custom features like we did with Android's. But maybe I'm not doing it right... I selected the project "NativeScript" in Xcode.

Fails with this message:

echo "Performing configure step for 'WebKit'"
Performing configure step for 'WebKit'
cd /Users/dev/ios-runtime/cmake-build/WebKit-prefix/src/WebKit-build && /Applications/CMake.app/Contents/bin/cmake --debug=all -DCMAKE_SYSTEM_PROCESSOR=arm "-DCMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS=iphoneos iphonesimulator" -DCMAKE_XCODE_EFFECTIVE_PLATFORMS=-iphoneos -iphonesimulator -DPORT=Mac -DENABLE_REMOTE_INSPECTOR=OFF -DENABLE_INTL=OFF -DJSC_OBJC_API_ENABLED=OFF -DUCONFIG_NO_COLLATION=ON -Wno-dev -DCMAKE_C_COMPILER_WORKS=YES -DCMAKE_CXX_COMPILER_WORKS=YES -DHAVE_QOS_CLASSES=ON -DENABLE_WEBCORE=OFF -DENABLE_WEBKIT_LEGACY=OFF -DENABLE_WEBKIT=OFF -DENABLE_STATIC_JSC=1 -DENABLE_JIT=ON -DENABLE_EXCEPTION_SCOPE_VERIFICATION=ON -DUSE_CAPSTONE=ON -DCMAKE_C_COMPILER_ID=AppleClang -DCMAKE_CXX_COMPILER_ID=AppleClang -DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DCMAKE_CXX_STANDARD_REQUIRED=ON "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG -O3" -GXcode /Users/dev/ios-runtime/src/WebKit
-- The CMake build type is: RelWithDebInfo
CMake Error at Source/cmake/WebKitCompilerFlags.cmake:115 (message):
  Compiler with C++17 support is required
Call Stack (most recent call first):
  Source/cmake/WebKitCommon.cmake:57 (include)
  CMakeLists.txt:157 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/dev/ios-runtime/cmake-build/WebKit-prefix/src/WebKit-build/CMakeFiles/CMakeOutput.log".
See also "/Users/dev/ios-runtime/cmake-build/WebKit-prefix/src/WebKit-build/CMakeFiles/CMakeError.log".
make: *** [/Users/dev/ios-runtime/cmake-build/WebKit-prefix/src/WebKit-stamp/Debug-iphoneos/WebKit-configure] Error 1
Command /bin/sh failed with exit code 2
@mbektchiev
Copy link
Contributor

I think that you may have missed this step:
sudo ./src/webkit/Tools/Scripts/configure-xcode-for-ios-development

Can you try repeating it? Also, it may help if you attach the CMakeOutput.log and CMakeError.log files if the issue persists.

@DiThi
Copy link
Author

DiThi commented Mar 18, 2019 via email

@mbektchiev
Copy link
Contributor

I noticed that you are using CMake version 3.13.4, but we currently require version 3.3.2. Can you please switch to it and see how it goes?

mbektchiev added a commit that referenced this issue Mar 20, 2019
It turns out that with recent versions of CMake the C++ feature tests
project fails to build correctly when some of the environment variables
inherited by the Xcode build of the NativeScript project are present.
Clear the environment before starting the subproject build

The variables affecting the build are:
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk"
export CODE_SIGNING_REQUIRED="YES"

If any of those is present the configuration step of WebKit fails with
`Compiler with C++17 support is required` with the following error
present in `CMakeError.log`:

```
Code Signing Warning: "cmTC_635cc" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code Signing Error: Code signing is required for product type 'Command-line Tool' in SDK 'iOS 12.1'
```

refs #1097
mbektchiev added a commit that referenced this issue Mar 20, 2019
It turns out that with recent versions of CMake the C++ feature tests
project fails to build correctly when some of the environment variables
inherited by the Xcode build of the NativeScript project are present.
Clear the environment before starting the subproject build.

The variables affecting the build are:
```
SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk"
CODE_SIGNING_REQUIRED="YES"
```
If any of them is present the environment, the configuration step of WebKit
fails with error `Compiler with C++17 support is required` and the following
present in `CMakeError.log`:

```
Code Signing Warning: "cmTC_635cc" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code Signing Error: Code signing is required for product type 'Command-line Tool' in SDK 'iOS 12.1'
```

refs #1097
@mbektchiev mbektchiev self-assigned this Mar 20, 2019
@mbektchiev mbektchiev added the bug label Mar 20, 2019
@mbektchiev mbektchiev added this to the 5.3.0 milestone Mar 20, 2019
@mbektchiev
Copy link
Contributor

iOS Runtime should now build correctly with the latest version of CMake

mbektchiev added a commit that referenced this issue Mar 20, 2019
It turns out that with recent versions of CMake the C++ feature tests
project fails to build correctly when some of the environment variables
inherited by the Xcode build of the NativeScript project are present.
Clear the environment before starting the subproject build.

The variables affecting the build are:
```
SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk"
CODE_SIGNING_REQUIRED="YES"
```
If any of them is present the environment, the configuration step of WebKit
fails with error `Compiler with C++17 support is required` and the following
present in `CMakeError.log`:

```
Code Signing Warning: "cmTC_635cc" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code Signing Error: Code signing is required for product type 'Command-line Tool' in SDK 'iOS 12.1'
```

refs #1097
@Natalia-Hristova Natalia-Hristova self-assigned this Mar 20, 2019
@mbektchiev mbektchiev changed the title Can't compile runtime in MacOS High Sierra Can't compile runtime with CMake 3.14 Mar 22, 2019
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

4 participants