Skip to content

Undefined symbols: "_static_assert" #10659

Closed
@ryandesign

Description

@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:

Cyan4973/xxHash#671

Here is the fix:

Cyan4973/xxHash@6189ecd

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 does not appear to affect the php 8.1 branch (which was not updated to xxhash 0.8.1).

PHP Version

8.2.3

Operating System

OS X 10.10

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions