'Python3.10.4 cross compilation for HP-UX
Trying to cross compile python3.10.4 on a Linux machine with gcc-9.3.0 for HP-UX IA64 and running into following errors. Did not find the setenv/unsetenv in stdlib.h for HP-UX.
*Python/pylifecycle.c: In function '_coerce_default_locale_settings':
Python/pylifecycle.c:319:9: error: implicit declaration of function 'setenv'; did you mean 'getenv'? [-Werror=implicit-function-declaration]
319 | if (setenv("LC_CTYPE", newloc, 1)) {
| ^~~~~~
| getenv
cc1: some warnings being treated as errors
./Modules/posixmodule.c: In function 'os_putenv_impl':
./Modules/posixmodule.c:10969:9: error: implicit declaration of function 'setenv'; did you mean 'getenv'? [-Werror=implicit-function-declaration]
10969 | if (setenv(name_string, value_string, 1)) {
| ^~~~~~
| getenv
./Modules/posixmodule.c: In function 'os_unsetenv_impl':
./Modules/posixmodule.c:11014:15: error: implicit declaration of function 'unsetenv'; did you mean 'getenv'? [-Werror=implicit-function-declaration]
11014 | int err = unsetenv(PyBytes_AS_STRING(name));
| ^~~~~~~~
| getenv*
Looks like this is implemented in 3.9 and does not have any config to skip this. Need help addressing this issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
