Installing Delphes in macOS 11 or above

Even though this comment is not strictly about ROOT, it is closely related since Delphes relies on ROOT. I assume people would look for help here.

I’ve seen many unsolved tickets (see, for example, here and here) reporting problems when installing Delphes on Mac with macOS 11 or 12. As discussed on StackExchange, the problem seems to be the fact that the installation files assume macOS is always 10.X so they only look at MACOS_MINOR: MACOSXTARGET := 10.$(MACOSX_MINOR).

One way to fix the issue is modifying the doc/Makefile.arch file by changing these lines

ifeq ($(PLATFORM),macosx)
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
ifeq ($(MACOSX_DEPLOYMENT_TARGET),)
MACOSXTARGET := 10.$(MACOSX_MINOR)
else
MACOSXTARGET := $(MACOSX_DEPLOYMENT_TARGET)
endif
endif

to

ifeq ($(PLATFORM),macosx)
MACOSX_MAJOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -f 2 | cut -d . -f 1)
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
ifeq ($(MACOSX_DEPLOYMENT_TARGET),)
MACOSXTARGET := $(MACOSX_MAJOR).$(MACOSX_MINOR)
else
MACOSXTARGET := $(MACOSX_DEPLOYMENT_TARGET)
endif
endif

Not quite sure how this can be solved sustainably, though.

As far as I can see, it is already the case in Makefile.arch

Indeed, but the file available on the Delphes repo is not this one. Thank you for the confirmation!