[MacPorts] #71699: harfbuzz @10.1.0_2+universal: ninja: error: unknown target 'CFLAGS+=-arch x86_64'

MacPorts noreply at macports.org
Sun May 25 01:39:35 UTC 2025


#71699: harfbuzz @10.1.0_2+universal: ninja: error: unknown target 'CFLAGS+=-arch
x86_64'
------------------------------+-------------------------------
  Reporter:  thetrial         |      Owner:  mascguy
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.10.5
Resolution:                   |   Keywords:  legacy-os, sierra
      Port:  harfbuzz, ninja  |
------------------------------+-------------------------------

Comment (by Sabine-Schnabeltier):

 I've encountered this problem as well when trying to install a universal
 Cairo. The problem is that gobject_introspection is adding the environment
 variables to the ninja arguments rather than to the environment as was
 done with muniversal PG 1.0.

 {{{
 :debug:build system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_harfbuzz/harfbuzz/work
 /build-arm64" && /opt/local/bin/ninja -j8 CFLAGS+="-arch arm64"
 LDFLAGS+="-arch arm64" -v
 :info:build ninja: error: unknown target 'CFLAGS+=-arch arm64'
 }}}

 I took a stab at modifying gobject_introspection by replacing:
 {{{
                     build.args.${arch}-append
 ${env_var}+="[muniversal::get_archflag ${tool} ${arch}]"
 }}}
 with:
 {{{
                     lappend merger_build_args(${arch})
 ${env_var}+="[muniversal::get_archflag ${tool} ${arch}]"
 }}}

 which allowed harfbuzz to compile, but something is going wrong during
 link.

-- 
Ticket URL: <https://trac.macports.org/ticket/71699#comment:25>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list