[MacPorts] #73955: expat +universal: muniversal merge of expat_config.hproduces anar archive when cross-compiling arm64 from an x86_64 host

MacPorts noreply at macports.org
Sat May 2 17:37:03 UTC 2026


#73955: expat +universal: muniversal merge of expat_config.hproduces anar archive
when cross-compiling arm64 from an x86_64 host
----------------------+--------------------
 Reporter:  ajkessel  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:
 Keywords:            |       Port:  expat
----------------------+--------------------
 On Intel macOS (Tahoe 26.4.1), sudo port install expat +universal installs
 /opt/local/include/expat_config.h containing a BSD ar archive (!<arch>
 magic) instead of a C header, which then breaks every consumer that
 includes it. The arch-specific expat_config.h files differ only in
 HAVE_MMAP: defined for x86_64, undefined for arm64. The arm64 build is
 cross-compiled from x86_64, so autoconf's AC_FUNC_MMAP runtime test cannot
 execute and falls through to "no" — the file isn't actually missing mmap
 support, it's an autoconf cross-compile limitation.

 Two distinct bugs: (a) muniversal's text-merge fallback wrote a binary
 archive instead of an #ifdef-merged header; (b) for this specific case the
 per-arch divergence is a false negative — both archs have mmap on Darwin
 and HAVE_MMAP should be defined unconditionally. Setting
 ac_cv_func_mmap_fixed_mapped=yes (or whatever the relevant cache var is)
 at configure time would suppress the divergence and avoid the merge
 failing-mode entirely.

 May be similar to #31459

-- 
Ticket URL: <https://trac.macports.org/ticket/73955>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list