Skip to content

Undefined symbols: "_static_assert" #10659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryandesign opened this issue Feb 22, 2023 · 0 comments
Closed

Undefined symbols: "_static_assert" #10659

ryandesign opened this issue Feb 22, 2023 · 0 comments

Comments

@ryandesign
Copy link
Contributor

ryandesign commented Feb 22, 2023

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

@devnexen devnexen self-assigned this Feb 24, 2023
devnexen added a commit to devnexen/php-src that referenced this issue Feb 24, 2023
ref: Cyan4973/xxHash@6189ecd

replacing the C++ compile time assert for C11 one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants