[php-src] Issue #10659: Undefined symbols: "_static_assert"
| From: | ryandesign | Date: | Wed, 22 Feb 2023 05:07:52 +0000 |
| Subject: | [php-src] Issue #10659: Undefined symbols: "_static_assert" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243775@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10659
Author: ryandesign
### Description
php 8.2.3 doesn't compile with some older clang compilers on some older macOS versions. The
error is:
```
Undefined symbols for architecture x86_64:
"_static_assert", referenced from:
_PHP_XXH32Final in hash_xxhash.o
_PHP_XXH64Final in hash_xxhash.o
_PHP_XXH3_64_Final in hash_xxhash.o
_PHP_XXH3_128_Init in hash_xxhash.o
_PHP_XXH3_128_Final in hash_xxhash.o
_XXH3_initCustomSecret_sse2 in hash_xxhash.o
_XXH3_update in hash_xxhash.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
Here is a full build log:
https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/215003/steps/install-port/logs/stdio
Here is the upstream xxhash bug report:
https://github.com/Cyan4973/xxHash/issues/671
Here is the fix:
https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1
Can this patch please be applied to ext/hash/xxhash/xxhash.h?
It may need to be backported to the php 8.1 branch as well.
### PHP Version
8.2.3
### Operating System
OS X 10.10