Skip to content

AIX build fails with the main branch #98705

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
ayappanec opened this issue Oct 26, 2022 · 5 comments
Closed

AIX build fails with the main branch #98705

ayappanec opened this issue Oct 26, 2022 · 5 comments
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@ayappanec
Copy link
Contributor

ayappanec commented Oct 26, 2022

Python main branch fails to build in AIX operating system with the below error.

gcc -pthread -c -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Objects/typeobject.o Objects/typeobject.c
In file included from ./Include/internal/pycore_runtime.h:13,
                 from ./Include/internal/pycore_pystate.h:11,
                 from ./Include/internal/pycore_call.h:11,
                 from Objects/typeobject.c:4:
./Include/internal/pycore_global_strings.h:674:41: error: 'struct `<anonymous>`' has no member named '__Bool'; did you mean '_hook'?
      (_Py_SINGLETON(strings.identifiers._ ## NAME._ascii.ob_base))
                                                                             ^
./Include/internal/pycore_global_objects.h:24:31: note: in definition of macro '_Py_GLOBAL_OBJECT'
     _PyRuntime.global_objects.NAME
                                                    ^~~~
./Include/internal/pycore_global_strings.h:674:7: note: in expansion of macro '_Py_SINGLETON'
      (_Py_SINGLETON(strings.identifiers._ ## NAME._ascii.ob_base))
       ^~~~~~~~~~~~~
Objects/typeobject.c:8569:38: note: in expansion of macro '_Py_ID'
      PyDoc_STR(DOC), .name_strobj = &_Py_ID(NAME) }
                                                                    ^~~~~~
Objects/typeobject.c:8579:5: note: in expansion of macro 'ETSLOT'
     ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
     ^~~~~~
Objects/typeobject.c:8686:5: note: in expansion of macro 'UNSLOT'
     UNSLOT(__bool__, nb_bool, slot_nb_bool, wrap_inquirypred,
     ^~~~~~
gmake: *** [Makefile:2525: Objects/typeobject.o] Error 1

Linked PRs

@ayappanec ayappanec added the type-bug An unexpected behavior, bug, or error label Oct 26, 2022
@ayappanec
Copy link
Contributor Author

@ayappanec
Copy link
Contributor Author

ayappanec commented Oct 26, 2022

This is what I can see in the preprocessed file

(void *)(slot_nb_bool), wrap_inquirypred, "__bool__" "($self, /)\n--\n\n" "True if self else False", .name_strobj = &(_PyRuntime.global_objects.singletons.strings.identifiers.__Bool._ascii.ob_base) }

@ayappanec
Copy link
Contributor Author

ayappanec commented Oct 26, 2022

In AIX, the standards.h file has __bool__ redefined to "_Bool" which seems to create the problem here.

@ayappanec
Copy link
Contributor Author

Probably a #undef __bool__ is required in pyport.h

ayappanec added a commit to ayappanec/cpython that referenced this issue Oct 27, 2022
ayappanec added a commit to ayappanec/cpython that referenced this issue Oct 27, 2022
ayappanec added a commit to ayappanec/cpython that referenced this issue Feb 2, 2023
@arhadthedev arhadthedev added the build The build process and cross-build label Feb 2, 2023
@ayappanec
Copy link
Contributor Author

Thanks @gpshead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants