Opened 4 weeks ago

Last modified 2 weeks ago

#63824 assigned defect

iTerm2: error: property 'safeAreaInsets' not found on object of type 'iTermRootTerminalView *'

Reported by: szhorvat (Szabolcs Horvát) Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: mojave Cc: i0ntempest, mascguy (Christopher Nielsen)
Port: iTerm2


iTerm2 fails to build on my system, and no binaries seem to be available. Build log is attached.

I am using:

macOS 10.14.6 18G9323 x86_64 Xcode 11.3.1 11C504

Attachments (1)

main.log (1.6 MB) - added by szhorvat (Szabolcs Horvát) 4 weeks ago.

Download all attachments as: .zip

Change History (9)

Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

Attachment: main.log added

comment:1 Changed 4 weeks ago by ryandesign (Ryan Schmidt)

Cc: markemer removed
Keywords: mojave added
Owner: set to markemer
Status: newassigned
Summary: iTerm2 fails to buildiTerm2: error: property 'safeAreaInsets' not found on object of type 'iTermRootTerminalView *'
Version: 2.7.1

The error in the log is:

error: property 'safeAreaInsets' not found on object of type 'iTermRootTerminalView *'

According to Apple safeAreaInsets is an iOS / iPadOS / tvOS / Mac Catalyst function that is not available on macOS so its use in a Mac project like iTerm2 surprises me. According to the iTerm2 source code, it should only be used on macOS 12 or later. Maybe the function became available in macOS 12 and Apple hasn't updated the documentation. But this means iTerm2 needs the macOS 12 SDK to build, which is of course not available on macOS 10.14.

comment:2 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

I asked the developer if building on 10.14 is still meant to be supported:

comment:3 Changed 4 weeks ago by markemer (Mark Anderson)

I'll check it out, but I bet it is - the latest shipping version was built on XCode 13 with the macOS 12 SDK. So it may not be buildable on less than macOS 11 with Xcode 13 - soon to be macOS 12 only I bet. It might still run on older hardware thanks to @available(macOS 12, *)

comment:4 Changed 4 weeks ago by markemer (Mark Anderson)

I'm certain of it now from the release notes:


This is a bugfix release to correct a problem with version 3.4.11 on Macs with a notch.

... snip ...

In order to fix that bug, you're going to need Xcode 13. I'm thinking that maybe we should do build or binary on macOS 12 and maybe just a binary install on 10.14 - 11, and then the last known working version before 10.12 - iTerm2 is getting progressively harder to support building on older machines. There is a part of me that only wants to make it available if you have Xcode 13, but that's against the spirit of macports supporting back to 10.old, so if anyone has a good idea, let me know - the older version is getting trickier to build as well.

Seems this is the version landscape:

  • Latest (OS 10.14+) only builds on 11 or 12
  • Unknown Version (OS 10.14+) will build on 10.14/10.15
  • iTerm2 3.3.12 (OS 10.12+) Does it build on 10.12?
  • iTerm2 3.1.7 (OS 10.10+)
  • iTerm2 3.0.15 (OS 10.8+)
  • iTerm2 2.1.4 (OS 10.7+, Intel-only)
  • iTerm2 2.0 (OS 10.5, Intel, PPC)

Do we maybe want to use last checkouts that build on 10.X, 11.X, and latest on latest?

I'm honestly not certain exactly. We officially support back to where in MacPorts? I don't want to support version 2 of iTerm2, but going back to 10.10 would be semi-manageable.

comment:5 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

Shouldn't it be easy to restore compatibility by making that if (@available(macOS 12, *)) section compile conditionally on the SDK version? Maybe the maintainer of iTerm2 is willing to do it? If not, maybe it can be patched in MacPorts?

comment:6 Changed 4 weeks ago by markemer (Mark Anderson)

I'm willing to bet that's already in there. The problem is that Xcode still compiles those bits - it just leaves them out of the runtime. This comes down to the big problem with building macOS apps in general on unknown - we can get them to run as low as 10.9 (oof) using Xcode 13 - but we can't run Xcode 13 on anything but 11 and maybe soon just 12. And if your app only builds on Xcode 13 - then you're stuck only building them there.

comment:7 Changed 2 weeks ago by szhorvat (Szabolcs Horvát)

It seems the iTerm2 author may not respond to the issue I opened, so the solution has to come from MacPorts. I'd be happy with any solution that keeps iTerm2 installable with MacPorts, even if just an older version.

comment:8 Changed 2 weeks ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.