iOS Build Environment Help Center

il2cpp error - 'cmath' file not found

append delete nensl

• Windows version: Win 10 Home
• Builder version: 3.59
• iOS SDK version: 14.4
• Unity 2022.3.7f1

The error I'm getting when running the builder:
[...]/2022.3.7f1/Editor/Data/il2cpp/libil2cpp\codegen/il2cpp-codegen-common.h:7:10: fatal error: 'cmath' file not found
#include <cmath>
[...]
Error: the Unity il2cpp compiler returned a non-success exit status.

My guess is that I'm using a way old Mac Book Air running macOS Catalina and Xcode 12.4.
Had that error with Builder version 3.57 first, than updated to 3.59 and re-ran the migration assistent without issues.

The 'cmath' file actually is missing in '[...]\builder\SDK\usr\include'.

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

If the file is indeed missing it’s a strong hint that you need a more recent iOS SDK.

If your Mac is too old to support the latest SDK, it’s not too old to unpack the latest Xcode, even if it can’t run it.

Download the latest Xcode’s .xip file, double-click it to unpack it, this will produce a Xcode.app folder with a "forbidden" sign overlay. Move that Xcode.app folder to your /Applications directory, and then run the Migration Assistant : it will detect the latest Xcode (even though your Mac can’t run it) and collect the iOS SDK from it.

:: @Pierre-Marie Baty added on 11 Aug ’23 · 09:00

*edit* Link: https://developer.apple.com/download/all/?q=xcode (requires login with Apple ID)

:: @Pierre-Marie Baty added on 11 Aug ’23 · 09:02

*edit 2* P.S. <cmath> being a C++ include file, it should be in SDK/usr/include/c++/v1, not in SDK/usr/include

append delete #2. nensl

Hey Pierre,

thanks a lot, that worked like a charm! The build was successful and over the air deployment as well.

Keep up the great work. Your asset is just crazy useful. Especially with extras like the debug-console :)

Cheers!

append delete #3. Pierre-Marie Baty

Glad to hear that. I don’t have as much time as I’d like to unfortunately to improve it and port it to other engines, I hope it’ll change next year :)

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty