#67898 closed defect (fixed)

php +universal: php-config: unexpected EOF while looking for matching `"', syntax error: unexpected end of file

Reported by: thomashohn Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 Cc:
Port: php

Description (last modified by thomashohn)

Hi

I'm trying to install php82-gd on a Mac with M2 processor (ARM). I tend to get this error:

:info:archivefetch --->  php82-gd-8.2.8_0.darwin_22.arm64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
:msg:archivefetch --->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-gd
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404
:msg:archivefetch --->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-gd
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404
:msg:archivefetch --->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://nue.de.packages.macports.org/php82-gd

So is the archive missing or ??

Attachments (3)

main.log-trace-option (77.1 KB) - added by thomashohn 14 months ago.
Main log with trace option
main.log-no-trace-option (69.9 KB) - added by thomashohn 14 months ago.
Main log with no trace option
php-config82-broken (3.0 KB) - added by thomashohn 14 months ago.
Broken php-config82

Download all attachments as: .zip

Change History (18)

comment:1 Changed 14 months ago by thomashohn

Description: modified (diff)

comment:2 Changed 14 months ago by jmroot (Joshua Root)

Owner: set to ryandesign
Status: newassigned

comment:3 Changed 14 months ago by jmroot (Joshua Root)

Yes, there is no binary available in this case, but that shouldn't prevent installation. See wiki:FAQ#fromsource

comment:4 Changed 14 months ago by thomashohn

Thx for your answers - unfortunately it does not build and dies with the following - any clue?

:notice:configure --->  Configuring php82-gd
:debug:configure Preferred compilers: clang macports-clang-15 macports-clang-14 macports-clang-13 macports-clang-12 macports-clang-11
:debug:configure Using compiler 'Xcode Clang'
:debug:configure Tracelib Sandbox is:
:debug:configure        /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work=+
:debug:configure        /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/php=+
:debug:configure        /opt/local/var/macports/distfiles/php82=+
:debug:configure        /bin=+
:debug:configure        /sbin=+
:debug:configure        /dev=+
:debug:configure        /usr/bin=+
:debug:configure        /usr/sbin=+
:debug:configure        /usr/include=+
:debug:configure        /usr/lib=+
:debug:configure        /usr/libexec=+
:debug:configure        /usr/share=+
:debug:configure        /System/Library=+
:debug:configure        /Library/Frameworks=-
:debug:configure        /Library=+
:debug:configure        /etc=+
:debug:configure        /private/etc=+
:debug:configure        /tmp=+
:debug:configure        /private/tmp=+
:debug:configure        /var/tmp=+
:debug:configure        /private/var/tmp=+
:debug:configure        /var/folders=+
:debug:configure        /private/var/folders=+
:debug:configure        /var/empty=+
:debug:configure        /private/var/empty=+
:debug:configure        /var/run=+
:debug:configure        /private/var/run=+
:debug:configure        /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work/.tmp=+
:debug:configure        /var/db/timezone/zoneinfo=+
:debug:configure        /private/var/db/timezone/tz/2023c.1.0/zoneinfo=+
:debug:configure        /var/db/mds/system=+
:debug:configure        /private/var/db/mds/system=+
:debug:configure        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk=+
:debug:configure        /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk=+
:debug:configure        /var/db/xcode_select_link=-
:debug:configure        /private/var/db/xcode_select_link=-
:debug:configure        /var/db/mds=-
:debug:configure        /private/var/db/mds=-
:debug:configure        /opt/local/var/macports/home/Library/Preferences/com.apple.dt.Xcode.plist=-
:debug:configure        /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work/.home/Library/Preferences/com.apple.dt.Xcode.plist=-
:debug:configure        /Applications/Xcode.app=-
:debug:configure        /var/db/launchd.db=+
:debug:configure        /private/var/db/launchd.db=+
:debug:configure        /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work/.home/.ccache=+
:debug:configure        /opt/local/var/macports/build/.ccache=+
:debug:configure        /opt/local/var/macports/sip-workaround=+
:debug:configure        /opt/local=?
:debug:configure Tracemode will respect recursively collected port dependencies: argon2 autoconf brotli bzip2 db48 freetype gdbm gettext-runtime giflib gsed icu lerc libdeflate libedit libiconv libjpeg-turbo libpng libxml2 lz4 m4 mhash ncurses pcre2 perl5.34 php82 php_select pkgconfig readline texinfo tiff webp xz zlib zstd
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:error:configure Failed to configure php82-gd: child process exited abnormally
:debug:configure Error code: NONE
:debug:configure Backtrace: child process exited abnormally
:debug:configure     while executing
:debug:configure "$pre $targetname"

Version 0, edited 14 months ago by thomashohn (next)

comment:5 in reply to:  4 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to thomashohn:

:info:extract Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/php82/php-8.2.8.tar.xz' | /usr/bin/tar -xf - php-8.2.8/ext/gd 
:debug:extract system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/php82/php-8.2.8.tar.xz' | /usr/bin/tar -xf - php-8.2.8/ext/gd 
:info:extract Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/php82/php-8.2.8.tar.xz' | /usr/bin/tar -xf - php-8.2.8/ext/gd 
:info:extract Killed by signal: 9

I wonder which of the three commands was killed and why. I'm guessing it's not cd. Do /opt/local/bin/xz and /usr/bin/tar work normally if you use them outside of MacPorts?

It's not possible to provide a binary?

That's right, as far as I know. According to our port_binary_distributable.tcl script, "php82-gd" is not distributable because its license "php" conflicts with license "GPL-2+" of dependency "lerc".

comment:6 Changed 14 months ago by thomashohn

So tried to su as the macport user and execute the command and that seems to work. What is also weird is that the port could be compiled for php81. There is no elder versin then this I could try to install?

comment:7 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

You can install older versions but there's no reason why that should work better. All versions of php, including the SAPI ports and the modules, are handled by one giant Portfile. And, like over 99% of all ports, extraction is not done by code in the Portfile but by common code in MacPorts base. php55 and later use xz tarballs, so if you encounter an extracting problem with php82-gd, I'd expect you to encounter the same problem with any other module of php82, all the way down to php55, and any other port whose source is in an xz tarball. That's assuming the problem is with the xz executable. If the problem is with the tar executable instead, then you'd experience problems with tons more ports than that.

Does this problem always happen with php82-gd or is it intermittent? Be sure to sudo port clean php82-gd before trying again to ensure your test is accurate. Does the problem ever happen with any other port?

comment:8 Changed 14 months ago by thomashohn

Hi again

I have some other (a lot) of php82 modules installed. I would guess that i would need a module that needs to be compiled like php82-gd.

php82 @8.2.3_0+libedit+universal
  php82 @8.2.4_0+libedit+universal
  php82 @8.2.5_0+libedit+universal
  php82 @8.2.5_1+libedit+universal
  php82 @8.2.7_0+libedit+universal
  php82 @8.2.8_0+libedit+universal (active)
  php82-APCu @5.1.22_0 (active)
  php82-curl @8.2.4_0
  php82-curl @8.2.5_0
  php82-curl @8.2.7_0
  php82-curl @8.2.8_0 (active)
  php82-fpm @8.2.4_0
  php82-fpm @8.2.5_0
  php82-fpm @8.2.7_0
  php82-fpm @8.2.8_0 (active)
  php82-geoip @1.1.1_0 (active)
  php82-iconv @8.2.4_0
  php82-iconv @8.2.5_0
  php82-iconv @8.2.7_0
  php82-iconv @8.2.8_0 (active)
  php82-intl @8.2.4_0
  php82-intl @8.2.5_0
  php82-intl @8.2.5_1
  php82-intl @8.2.7_0
  php82-intl @8.2.8_0 (active)
  php82-lzf @1.7.0_0 (active)
  php82-mbstring @8.2.4_0
  php82-mbstring @8.2.5_0
  php82-mbstring @8.2.7_0
  php82-mbstring @8.2.8_0 (active)
  php82-mysql @8.2.4_0
  php82-mysql @8.2.5_0
  php82-mysql @8.2.7_0
  php82-mysql @8.2.8_0 (active)
  php82-openssl @8.2.4_0
  php82-openssl @8.2.5_0
  php82-openssl @8.2.7_0
  php82-openssl @8.2.8_0 (active)
  php82-posix @8.2.4_0
  php82-posix @8.2.5_0
  php82-posix @8.2.7_0
  php82-posix @8.2.8_0 (active)
  php82-redis @5.3.7_0 (active)
  php82-soap @8.2.4_0
  php82-soap @8.2.5_0
  php82-soap @8.2.7_0
  php82-soap @8.2.8_0 (active)
  php82-ssh2 @1.4_0 (active)
  php82-zip @1.21.1_0
  php82-zip @1.22.0_0
  php82-zip @1.22.1_0 (active)

Tried some extra modules - php82-xdebug seems to fail where others do install:

 sudo port clean php82-gd
Password:
--->  Cleaning php82-gd
❯ sudo port install  php82-gd
--->  Computing dependencies for php82-gd
--->  Fetching archive for php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-gd
--->  Fetching distfiles for php82-gd
--->  Verifying checksums for php82-gd
--->  Extracting php82-gd
--->  Configuring php82-gd
Error: Failed to configure php82-gd: child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-gd failed




 sudo port install php82-xdebug
--->  Computing dependencies for php82-xdebug
--->  Fetching archive for php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-xdebug
--->  Configuring php82-xdebug
Error: Failed to configure php82-xdebug: can't read "php.extension_dir": child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_php_php-xdebug/php82-xdebug/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-xdebug failed
❯ sudo port install php82-lzf
--->  Computing dependencies for php82-lzf
--->  Fetching archive for php82-lzf
--->  Attempting to fetch php82-lzf-1.7.0_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-lzf
--->  Attempting to fetch php82-lzf-1.7.0_0.darwin_22.arm64.tbz2.rmd160 from https://fra.de.packages.macports.org/php82-lzf
--->  Installing php82-lzf @1.7.0_0
--->  Activating php82-lzf @1.7.0_0
--->  Cleaning php82-lzf
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

Could it maybe be a virus scanner killing the process?

comment:9 Changed 14 months ago by thomashohn

So only seems to be the 82 version - just installed PHP 83 and php83-gd:

 sudo port install php83
--->  Computing dependencies for php83
--->  Fetching archive for php83
--->  Attempting to fetch php83-8.3.0beta1_0+libedit.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php83
--->  Attempting to fetch php83-8.3.0beta1_0+libedit.darwin_22.arm64.tbz2.rmd160 from https://fra.de.packages.macports.org/php83
--->  Installing php83 @8.3.0beta1_0+libedit
--->  Activating php83 @8.3.0beta1_0+libedit
--->  Cleaning php83
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  php83 has the following notes:
    php83 @8.3.0beta1 is a development preview—do not use it in production!
    To customize php83, copy /opt/local/etc/php83/php.ini-development (if this is a development server) or /opt/local/etc/php83/php.ini-production (if this is a
    production server) to /opt/local/etc/php83/php.ini and then make changes.
❯ sudo port install php83-gd
--->  Computing dependencies for php83-gd
--->  Fetching archive for php83-gd
--->  Attempting to fetch php83-gd-8.3.0beta1_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php83-gd
--->  Attempting to fetch php83-gd-8.3.0beta1_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php83-gd
--->  Attempting to fetch php83-gd-8.3.0beta1_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php83-gd
--->  Fetching distfiles for php83-gd
--->  Attempting to fetch php-8.3.0beta1.tar.xz from https://distfiles.macports.org/php83
--->  Verifying checksums for php83-gd                                               
--->  Extracting php83-gd
--->  Configuring php83-gd
--->  Building php83-gd                                  
--->  Staging php83-gd into destroot                     
--->  Installing php83-gd @8.3.0beta1_0                  
--->  Activating php83-gd @8.3.0beta1_0
--->  Cleaning php83-gd
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

Drives me nuts..

comment:10 in reply to:  8 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to thomashohn:

I have some other (a lot) of php82 modules installed. I would guess that i would need a module that needs to be compiled like php82-gd.

The problem you originally reported was an extraction problem, not a compilation problem.

  php82 @8.2.8_0+libedit+universal (active)

Good to know that you're using the universal variant for php82. Non-default variants are not as well tested, so this can sometimes cause some problems. I don't yet know if it relates to any of the problems you're experiencing. I don't see how it could cause an extract problem.

 sudo port clean php82-gd
Password:
--->  Cleaning php82-gd
❯ sudo port install  php82-gd
--->  Computing dependencies for php82-gd
--->  Fetching archive for php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-gd
--->  Fetching distfiles for php82-gd
--->  Verifying checksums for php82-gd
--->  Extracting php82-gd
--->  Configuring php82-gd
Error: Failed to configure php82-gd: child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-gd failed

This is not the same as the problem you originally reported. Here, extraction succeeded and configuration failed. Please attach (not paste) the main.log and config.log files so we can see what happened here. The config.log will be somewhere within the directory identified by the command port work php82-gd.

 sudo port install php82-xdebug
--->  Computing dependencies for php82-xdebug
--->  Fetching archive for php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-xdebug
--->  Attempting to fetch php82-xdebug-3.2.2_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-xdebug
--->  Configuring php82-xdebug
Error: Failed to configure php82-xdebug: can't read "php.extension_dir": child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_php_php-xdebug/php82-xdebug/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-xdebug failed

Same here: please attach these main.log and config.log files.

Could it maybe be a virus scanner killing the process?

I have no idea what your virus scanner might do. Try turning it off.

Last edited 14 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 14 months ago by thomashohn

Attachment: main.log-trace-option added

Main log with trace option

Changed 14 months ago by thomashohn

Attachment: main.log-no-trace-option added

Main log with no trace option

comment:11 Changed 14 months ago by thomashohn

The seems to be a difference depending on of the -t trace option is applied or not. If applied the extraction fails, if not applied the configuration fails. No signs of config.log files

With trace:

❯ sudo port clean php82-gd
--->  Cleaning php82-gd
❯ sudo port install -t php82-gd
--->  Computing dependencies for php82-gd
--->  Fetching archive for php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-gd
--->  Fetching distfiles for php82-gd
--->  Verifying checksums for php82-gd
--->  Extracting php82-gd
Error: Failed to extract php82-gd: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-gd failed

Without trace:

❯ sudo port clean php82-gd
--->  Cleaning php82-gd
❯ sudo port install php82-gd
--->  Computing dependencies for php82-gd
--->  Fetching archive for php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://packages.macports.org/php82-gd
--->  Attempting to fetch php82-gd-8.2.8_0.darwin_22.arm64.tbz2 from https://cph.dk.packages.macports.org/php82-gd
--->  Fetching distfiles for php82-gd
--->  Verifying checksums for php82-gd
--->  Extracting php82-gd
--->  Configuring php82-gd
Error: Failed to configure php82-gd: child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port php82-gd failed

comment:12 in reply to:  11 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to thomashohn:

The seems to be a difference depending on of the -t trace option is applied or not. If applied the extraction fails, if not applied the configuration fails.

MacPorts trace mode is broken in macOS 13 and later, so don't use it until that's fixed.

No signs of config.log files

It would be at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php82-gd/work/php-8.2.8/ext/gd/config.log if configuration had failed. However, looking at your main.log, I see that configuration did not even start because the failure happened in a pre-configure block:

:debug:configure Executing proc-pre-org.macports.configure-configure-0
:error:configure Failed to configure php82-gd: child process exited abnormally
:debug:configure Error code: NONE
:debug:configure Backtrace: child process exited abnormally
:debug:configure     while executing
:debug:configure "$pre $targetname"

proc-pre-org.macports.configure-configure-0 means the first pre-configure block, and for the php82-gd port, that should be this block from the php Portfile:

    pre-configure {
        set php_version [exec ${php.config} --version 2>/dev/null]
        if {${version} ne ${php_version}} {
            ui_error "${subport} @${version} requires ${php} @${version} but you have ${php} @${php_version}."
            return -code error "incompatible ${php} installation"
        }
    }

The only child process being run within that block is php-config82 --version. What happens if you run that command manually?

Changed 14 months ago by thomashohn

Attachment: php-config82-broken added

Broken php-config82

comment:13 Changed 14 months ago by thomashohn

So for some weird reason the php-config82 file was broken :-( I have attached the broken filen - the output from the calling the file was:

/opt/local/bin/php-config82-broken: line 47: unexpected EOF while looking for matching `"'
/opt/local/bin/php-config82-broken: line 99: syntax error: unexpected end of file

No clue how it got broken - but after replacing it with the correct file - everything works !!!

comment:14 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: arm64 added
Port: php added; php82-gd removed
Summary: Issue with PHP 8.2 Arm version of GDphp +universal: php-config: unexpected EOF while looking for matching `"', syntax error: unexpected end of file

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.

diffing 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 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 this port 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.

Last edited 14 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:15 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 3688b879dc21908c240a0ecdad8b28669731b269/macports-ports (master):

muniversal: Remove quoted arch flags correctly

When removing architecture-specific flags, account for the fact that
sometimes (as in php-config) they are in quotation marks.

Also, do not collapse multiple spaces into one because that could result
in erroneous presentation of output (as in php-config) or an
IndentationError (in the case of python scripts).

Fixes and partially reverts c9a6e03fc195486bbc91148a44393ae9f333f109.

Closes: #64758
Closes: #67898

Note: See TracTickets for help on using tickets.