-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
PHP_TEST_BUILD macro false negatives with -Werror=strict-prototypes #13727
Labels
Comments
devnexen
added a commit
to devnexen/php-src
that referenced
this issue
Mar 16, 2024
devnexen
added a commit
to devnexen/php-src
that referenced
this issue
Mar 17, 2024
devnexen
added a commit
to devnexen/php-src
that referenced
this issue
Mar 18, 2024
autoconf/libtool generating code to test features missed `void` for C calls prototypes w/o arguments. Note that specific changes related to libtool have to upstreamed.
petk
added a commit
to petk/php-src
that referenced
this issue
Apr 21, 2024
This is addon to the phpGH-13727 bug fix. When configuring the build with: ./configure CFLAGS=-Werror=strict-prototypes libtool check for parsing nm command would fail: checking command to parse /usr/bin/nm -B output from cc object... failed Upstream libtool has this specific check already fixed. Note that this works only with Autoconf version 2.72 and later and is preparation for future compilers that might have this error enabled by default.
petk
added a commit
to petk/php-src
that referenced
this issue
Apr 22, 2024
This is addon to the phpGH-13727 bug fix. When configuring the build with: ./configure CFLAGS=-Werror=strict-prototypes libtool check for parsing nm command would fail: checking command to parse /usr/bin/nm -B output from cc object... failed Upstream libtool has this specific check already fixed. Note that this works only with Autoconf version 2.72 and later and is preparation for future compilers that might have this error enabled by default.
petk
added a commit
that referenced
this issue
Apr 22, 2024
This is addon to the GH-13727 bug fix. When configuring the build with: ./configure CFLAGS=-Werror=strict-prototypes libtool check for parsing nm command would fail: checking command to parse /usr/bin/nm -B output from cc object... failed Upstream libtool has this specific check already fixed. Note that this works only with Autoconf version 2.72 and later and is preparation for future compilers that might have this error enabled by default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The contents of the
PHP_TEST_BUILD
macro are,The
char $1();
runs afoul of-Wstrict-prototypes
, so when that warning is turned into an error viaCFLAGS
, it can cause the build test to fail even if the function/library it's checking for is present.I found this accidentally while testing ext/gd with
-Werror=strict-prototypes
in myCFLAGS
(from working on an unrelated problem):The generated program is,
and the compiler error was,
For now, "don't do that" is a valid response, but in a few years we'll start seeing newer compilers enable these things by default. The result here is not too bad because the build dies, but in the worst case, features could quietly be disabled.
PHP Version
git HEAD
Operating System
No response
The text was updated successfully, but these errors were encountered: