Hi,
Attempting to build scikit-build-core/docs/examples/getting_started/c at main · scikit-build/scikit-build-core
In AIX 7.3 or 7.2 I get core dump when I try import example package mentioned in above link.
Here are the steps:
CC=/opt/freeware/bin/gcc
CXX=/opt/freeware/bin/g++
CFLAGS="-maix64"
CXXFLAGS="-maix64"
OBJECT_MODE=64
AR="ar -X64"
In the directory from above link:
Run the below:
cmake -B ./build
cmake –build ./build –verbose
PYTHONPATH=$(pwd)/build python3.12
import example
The above steps result in a core dump, a simple cmake hello world program works fine, so the issue may be with python itself, 3.11 also has the issue.
Here is a sample
bash-5.2# cmake -DCMAKE_BUILD_TYPE=Debug -B build
-- The C compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/freeware/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /opt/freeware/include/python3.12 (found version "3.12.11") found components: Development.Module
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /path/c/build
bash-5.2# cmake --build ./build/ --verbose
Change Dir: '/path/c/build'
Run Build Command(s): /opt/freeware/bin/cmake -E env VERBOSE=1 /opt/freeware/bin/gmake -f Makefile
/opt/freeware/bin/cmake -S/path/c -B/path/c/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/freeware/bin/cmake -E cmake_progress_start /path/c/build/CMakeFiles /path/c/build//CMakeFiles/progress.marks
/opt/freeware/bin/gmake -f CMakeFiles/Makefile2 all
gmake[1]: Entering directory '/path/c/build'
/opt/freeware/bin/gmake -f CMakeFiles/example.dir/build.make CMakeFiles/example.dir/depend
gmake[2]: Entering directory '/path/c/build'
cd /path/c/build && /opt/freeware/bin/cmake -E cmake_depends "Unix Makefiles" /path/c /path/c /path/c/build /path/c/build /path/c/build/CMakeFiles/example.dir/DependInfo.cmake "--color="
gmake[2]: Leaving directory '/path/c/build'
/opt/freeware/bin/gmake -f CMakeFiles/example.dir/build.make CMakeFiles/example.dir/build
gmake[2]: Entering directory '/path/c/build'
[ 50%] Building C object CMakeFiles/example.dir/example.c.o
/opt/freeware/bin/gcc -Dexample_EXPORTS -isystem /opt/freeware/include/python3.12 -maix64 -g -fPIC -MD -MT CMakeFiles/example.dir/example.c.o -MF CMakeFiles/example.dir/example.c.o.d -o CMakeFiles/example.dir/example.c.o -c /path/c/example.c
[100%] Linking C shared module example.cpython-312.so
/opt/freeware/bin/cmake -E cmake_link_script CMakeFiles/example.dir/link.txt --verbose=1
"/opt/freeware/share/cmake-4.0/Modules/Platform/AIX/ExportImportList" -o CMakeFiles/example.dir/exports.exp -c /opt/freeware/bin/gcc CMakeFiles/example.dir/example.c.o
/opt/freeware/bin/gcc -fPIC -Wl,-bE:CMakeFiles/example.dir/exports.exp -maix64 -g -Wl,-b,erok -shared -Wl,-bnoipath -o example.cpython-312.so CMakeFiles/example.dir/example.c.o -Wl,-blibpath:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/13/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/13:/opt/freeware/lib:/usr/lib:/lib:
gmake[2]: Leaving directory '/path/c/build'
[100%] Built target example
gmake[1]: Leaving directory '/path/c/build'
/opt/freeware/bin/cmake -E cmake_progress_start /path/c/build/CMakeFiles 0
bash-5.2# echo $PYTHONPATH
/path/c/build
bash-5.2# gdb --args python3.12 -c 'import example;'
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "powerpc64-ibm-aix7.1.0.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python3.12...
(gdb) run
Starting program: /opt/freeware/bin/python3.12 -c import\ example\;
Program received signal SIGILL, Illegal instruction.
0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x090000000867cbc0 in ?? ()
No symbol table info available.
#2 0x0900000006c7df78 in _PyImport_LoadDynamicModuleWithSpec () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#3 0x0900000006b4b428 in _imp_create_dynamic () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#4 0x0900000006aaf7f8 in cfunction_vectorcall_FASTCALL () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#5 0x0900000006ab3b08 in _PyVectorcall_Call () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#6 0x0900000006ab41a8 in PyObject_Call () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#7 0x0900000006b7efc8 in _PyEval_EvalFrameDefault () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#8 0x0900000006b00194 in _PyEval_Vector () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#9 0x0900000006ab0fd4 in _PyFunction_Vectorcall () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#10 0x0900000006ab1ac4 in object_vacall () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#11 0x0900000006ab1cc8 in PyObject_CallMethodObjArgs () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#12 0x0900000006b4dea4 in PyImport_ImportModuleLevelObject () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#13 0x0900000006b87a94 in _PyEval_EvalFrameDefault () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#14 0x0900000006b00194 in _PyEval_Vector () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#15 0x0900000006b0027c in PyEval_EvalCode () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#16 0x0900000006cb2364 in run_eval_code_obj () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#17 0x0900000006cb2518 in run_mod () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#18 0x0900000006cb72d8 in PyRun_StringFlags () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#19 0x0900000006cb73d4 in PyRun_SimpleStringFlags () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#20 0x0900000006d174b8 in Py_RunMain () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#21 0x0900000006d18190 in pymain_main () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#22 0x0900000006d182c0 in Py_BytesMain () from /opt/freeware/lib64/libpython3.12.a(libpython3.12.so)
No symbol table info available.
#23 0x0000000100000538 in main ()
No symbol table info available.
(gdb) quit
A debugging session is active.
The reason for this exercise was I was trying to install pyzmq which actually kept core dumping when I do import zmq, then old versions of pyzmq25.1.2 on AIX 7.3 seem to core dump randomly after 20 or 30 hours.
I feel python interpreter may have a problem
Regards,
Avinesh Benjamin.
-------------------------------------------