CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
179 stars 65 forks source link

Cannot build for iOS with XCode 13.3.1 on MacOS 12.4 #498

Closed asdafa3 closed 2 years ago

asdafa3 commented 2 years ago

At the moment I am unable to build the SDK on my M1 Mac, maybe you have some ideas on this?

Issue

If I run

python build-ios.py --profile standard --use-metalangle

on a fresh clone of the repo (current master, following the instructions in BUILDING.md), I get C++ include errors like the following:

/Applications/IDEs/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/usr/include/c++/v1/__algorithm/is_permutation.h:41:21: error:
      no member named 'distance' in namespace 'std::__1'
  _D1 __l1 = _VSTD::distance(__first1, __last1);
             ~~~~~~~^

In the recent past I had no issues with the building process at all. My guess would be that the most recent MacOS update 13.2.x -> 13.3.x messed something up. Therefore I am pretty sure this is not related to anything in the project itself, but rather my own MacOS / XCode setup. But maybe you could help me based on related experience?

Configuration

XCode 13.3.1 MacOS 12.4 Clang 13.1.6 and newest CLT at the time of writing

mtehver commented 2 years ago

We are still on XCode 13.2.1 on our builds. XCode 13.3 moved to a newer LLVM version, which may have backward compatibility issues with older XCode versions. Thus we are sticking to 13.2.1 for patch-level releases.

We will likely move to XCode 13.3 in a month or so, but until then I do not expect us to investigate this.