Cmake, Xcode 9, MacOS 10.13 and utimensat

Ryan Schmidt ryandesign at macports.org
Tue Jun 27 01:05:59 UTC 2017


On Jun 26, 2017, at 13:58, Vincent Habchi wrote:

> I’ve been installing the new Xcode 9 (beta) and upgrading my ports.
> Cmake got bumped to 3.8.2
> 
> Then, a couple of ports onwards, I got this error:
> 
>> dyld: Symbol not found: _utimensat
>>  Referenced from: /opt/local/bin/cmake
>>  Expected in: /usr/lib/libSystem.B.dylib
> 
> Rolling back to the log of Cmake compilation, I found:
> 
>> Checking whether CXX compiler has utimensat - yes
> 
> Problem is, I can’t find that routine in libSystem.B.dylib, neither in 10.12 nor in 10.13.
> 
> So I’m a bit at a loss here. Could that be a bug in Xcode?
> 
> Thanks for any piece of advice,
> Vincent
> 
> PS : I’m going to uninstall Cmake and reinstall it from binaries.


cmake likes to compile using the macOS SDK in Xcode, even when that's not needed. What version of macOS SDK is in Xcode 9? I would not be surprised if it contains a macOS 10.13 version of the SDK, and that utimensat is new in macOS 10.13, and that there is a bug in the SDK that neglects to hide that symbol when the deployment target is less than 10.13. If so, that would be an Apple bug.





More information about the macports-dev mailing list