[MacPorts] #67898: php +universal: php-config: unexpected EOF while looking for matching `"', syntax error: unexpected end of file (was: Issue with PHP 8.2 Arm version of GD)

MacPorts noreply at macports.org
Sat Aug 12 08:33:27 UTC 2023


#67898: php +universal: php-config: unexpected EOF while looking for matching `"',
syntax error: unexpected end of file
-------------------------+------------------------
  Reporter:  thomashohn  |      Owner:  ryandesign
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:  arm64
      Port:  php         |
-------------------------+------------------------
Changes (by ryandesign):

 * keywords:   => arm64
 * port:  php82-gd => php


Comment:

 Thanks for sharing your broken php-config82. I now see what has happened.
 And it is indeed limited to the +universal variant, and to Apple Silicon
 systems.

 `diff`ing my working non-universal php-config82 with your broken universal
 php-config82, the difference that matters is that my line 20 is:

 {{{
 configure_options=" '--prefix=/opt/local' … '--with-libedit'"
 }}}

 while your line 20 is:

 {{{
 configure_options=" '--prefix=/opt/local' … '--with-libedit' ' '
 }}}

 (I've replaced a lot of identical args with `…` for clarity.)

 So my `configure_options` is set to a proper quoted string while yours
 isn't. The quoted string that begins on your line 20 doesn't end at the
 end of line 20; it continues on until wherever the next quotation mark is
 (on line 21). The parser continues trying to match up mismatched pairs of
 quotation marks until it reaches the final quotation mark on line 47 which
 doesn't have another one to match with it.

 The php CLI SAPI ports (i.e. php82) use the [browser:macports-
 ports/_resources/port1.0/group/muniversal-1.0.tcl muniversal portgroup]
 which, if you request a universal build, builds each architecture
 separately and merges the results. If the files cannot be merged, an error
 is shown. That's what happens for me when I try to install universal on an
 Intel Mac; see #64758.

 I realize now that an attempted fix for #64758 was put into the muniversal
 portgroup which was unfortunately incorrect in such a way that
 installation would succeed for Apple Silicon users but would result in
 this broken php-config script. I've added more notes to #64758 about it.

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


More information about the macports-tickets mailing list