Skip to content
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

GCC 14 build issue (c_atomic) #13215

Closed
remicollet opened this issue Jan 22, 2024 · 1 comment
Closed

GCC 14 build issue (c_atomic) #13215

remicollet opened this issue Jan 22, 2024 · 1 comment

Comments

@remicollet
Copy link
Contributor

Description

Noticed during Fedora 40 mass rebuild using GCC 14

In file included from /builddir/build/BUILD/php-8.3.2/Zend/zend_globals.h:30,
                 from /builddir/build/BUILD/php-8.3.2/Zend/zend_compile.h:769,
                 from /builddir/build/BUILD/php-8.3.2/Zend/zend_modules.h:24,
                 from /builddir/build/BUILD/php-8.3.2/Zend/zend_API.h:25,
                 from /builddir/build/BUILD/php-8.3.2/main/php.h:35,
                 from /builddir/build/BUILD/php-8.3.2/ext/bcmath/bcmath.c:21:
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h: In function 'zend_atomic_bool_exchange_ex':
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h:88:16: error: implicit declaration of function '__c11_atomic_exchange'; did you mean '__atomic_exchange'? [-Wimplicit-function-declaration]
   88 |         return __c11_atomic_exchange(&obj->value, desired, __ATOMIC_SEQ_CST);
      |                ^~~~~~~~~~~~~~~~~~~~~
      |                __atomic_exchange
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h: In function 'zend_atomic_bool_load_ex':
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h:92:16: error: implicit declaration of function '__c11_atomic_load'; did you mean '__atomic_load'? [-Wimplicit-function-declaration]
   92 |         return __c11_atomic_load(&obj->value, __ATOMIC_SEQ_CST);
      |                ^~~~~~~~~~~~~~~~~
      |                __atomic_load
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h: In function 'zend_atomic_bool_store_ex':
/builddir/build/BUILD/php-8.3.2/Zend/zend_atomic.h:96:9: error: implicit declaration of function '__c11_atomic_store'; did you mean '__atomic_store'? [-Wimplicit-function-declaration]
   96 |         __c11_atomic_store(&obj->value, desired, __ATOMIC_SEQ_CST);
      |         ^~~~~~~~~~~~~~~~~~
      |         __atomic_store

Full build log
https://kojipkgs.fedoraproject.org//work/tasks/8789/112128789/build.log

Also breaks packages using PHP, ex: SWIG
See swig/swig#2765

PHP Version

N/A

Operating System

No response

remicollet added a commit to remicollet/php-src that referenced this issue Jan 22, 2024
remicollet added a commit that referenced this issue Jan 22, 2024
* PHP-8.2:
  NEWS
  Fix GH-13215 GCC 14 build
remicollet added a commit that referenced this issue Jan 22, 2024
* PHP-8.3:
  NEWS
  NEWS
  Fix GH-13215 GCC 14 build
@thesamesam
Copy link

There's a more thorough fix at #12821.

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

2 participants