-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
php-ctypes: cannot build (Do not inherit LC_CTYPE from environment [tests/lc_ctype_inheritance.phpt]) #398486
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
Comments
Installing PHP from |
Is there an issue opened upstream about this issue? Perhaps @nielsdos knows something? edit: in the meantime, I made a PR to disable that test to unblock the situation. |
Neither on my Linux machine or on the macOS Ventura machine do I get a failure. |
@nielsdos here you go: edit: and my env: Details
|
@cornedor Can you please run the following PHP script and share its output?
|
|
I don't understand this. So that would mean the C locale on your system somehow considers "\xe4" as lowercase, which seems wrong to me. Is this something that maybe changed in more recent macOS versions? |
|
I tried to do the same using C++ with my very limited knowledge of the language and this setup, but it seems to have the same behavior if I set the locale to C.UTF-8. #include <iostream>
#include <clocale>
#include <cctype>
#include <cstring>
int main() {
// Create a string with the character \xe4 (ä)
const unsigned char test_char = '\xe4';
const char* result = std::setlocale(LC_CTYPE, "C");
std::cout << "setlocale(LC_CTYPE, \"C\") returned: " << (result ? result : "NULL") << std::endl;
// Check if the character is lowercase using ctype
bool is_lower = islower(test_char);
std::cout << "islower(\"\\xe4\") returned: " << (is_lower ? "true" : "false") << std::endl;
const char* result2 = std::setlocale(LC_CTYPE, "C.UTF-8");
std::cout << "setlocale(LC_CTYPE, \"C.UTF-8\") returned: " << (result2 ? result2 : "NULL") << std::endl;
// Check if the character is lowercase using ctype
bool is_lower2 = islower(test_char);
std::cout << "islower(\"\\xe4\") returned: " << (is_lower2 ? "true" : "false") << std::endl;
return 0;
}
EDIT: This looks fine, ä is lower case. |
(I decided to merge the patch removing the test only for |
I've opened php/php-src#18324 |
@drupol The test is still being run, and thus still failing. This should be available on unstable by now right? Details
|
@drupol thanks for the link. Using master indeed works now 👌
|
Nixpkgs version
Describe the bug
php-ctypes
could not be built, preventing the installation of PHP-related packages likelaravel
.For reference, the working version is nixpkgs version 18dd725, while version afb73c8 does not work.
Steps to reproduce
Run
nix shell nixpkgs#laravel
on my macOS (arm64) and this error can be just reproduced.Expected behaviour
It should be built.
Screenshots
Relevant log output
Additional context
No response
System metadata
"aarch64-darwin"
Darwin 24.4.0, macOS 15.4
yes
no
nix-env (Nix) 2.26.2
/nix/store/0cic1diia69573akxcmqr4vd9jx86yf3-source
Notify maintainers
@aanderse @drupol @Ma27 @piotrkwiecinski @talyz
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: