Skip to content

[Bug]: [macOS] PHP 8.4 binary compiled without libjpeg support (Call to undefined function imagejpeg) #1650

@skylarnt

Description

@skylarnt

Platform

macOS

Operating system version

macOS Tahoe 26.0

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.26.1 (BUILD 62)

PHP Version

PHP 8.4

Bug description

The statically compiled php84 binary included in the latest Herd release for macOS (Apple Silicon arm64) is missing JPEG support for the GD extension, resulting in a fatal error when trying to encode or manipulate JPEGs.

This is a regression from php83, where JPEG support works perfectly.

Steps to reproduce

Run the following in the terminal using the php84 binary:

$ php84 -r 'var_dump(function_exists("imagejpeg"));'
 **Outputs**: bool(false)

Comparing against a healthy php83 binary:

$ php83 -r 'var_dump(function_exists("imagejpeg"));'
** Outputs:** bool(true)

Additionally, running php84 -i | grep -i jpeg yields Supported filetypes => JPEG, TIFF but checking via the gd_info() array confirms that JPEG Support actually evaluates to false and the function imagejpeg() is completely missing from the binary.

**Actual behavior**
Attempting to process standard JPEGs natively using GD (e.g. Spatie/Image or Laravel's default base64 encoding tools) throws: Fatal error: Uncaught Error: Call to undefined function imagejpeg()



### Relevant log output

```shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions