[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-09 Thread Quellyn Snead


New submission from Quellyn Snead :

Python 3.8 and above fails to build with the IBM XL compiler on Power9 
platforms.

## System and Environment Information

```
$ arch
ppc64le
```

```
$ echo $CC
xlc 
-F/projects/opt/ppc64le/ibm/xlc-16.1.1.7/xlC/16.1.1/etc/xlc.cfg.rhel.7.8.gcc.8.3.0.cuda.10.1
```

```
$ xlc --version
IBM XL C/C++ for Linux, V16.1.1 (5725-C73, 5765-J13)
Version: 16.01.0001.0007
```

## Test Procedure
```
$ git clone g...@github.com:quellyn/cpython.git
$ cd cpython
$ checkout 3.8

$ ./configure --with-pydebug
$ make -j2 | tee -a make.out
```

I tested for 3.7, 3.8, 3.9, 3.10, and master. In all cases the `make` failed 
for versions 3.8+. I've attached both the `config.log` and the make output logs 
for all. 

- Power9 architecture (ppc64le)
- IBM XL C/C++ 16.1.1.7

Python 3.7 builds without issue.

--
components: Installation
files: cpython.tar.gz
messages: 399296
nosy: quellyn
priority: normal
severity: normal
status: open
title: Python > 3.7 build fails with IBM XL compiler
type: compile error
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50207/cpython.tar.gz

___
Python tracker 
<https://bugs.python.org/issue44877>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Quellyn Snead


Quellyn Snead  added the comment:

Hi Eric,

Looks like I didn't get the full output captured before. Sorry about that. The 
error appears when I run the make command:

```
[quellyn@cn2020 cpython]$ make -j
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: take_gil: NULL tstate
Python runtime state: preinitialized

Current thread 0x20045fe0 (most recent call first):
/bin/sh: line 5: 79067 Segmentation fault  (core dumped) ./python -E -S -m 
sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1
```

P.S. The tarball I attached before contains the configure and make output for 
tests on multiple python version branches. I differentiated them by adding a 
version identifier suffix (_3.7, _3.8, _3.9, _3.10, _3.11)

--

___
Python tracker 
<https://bugs.python.org/issue44877>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Quellyn Snead


Quellyn Snead  added the comment:

> As to the actual problem, I think you're going to need to get out a debugger 
> and at least get a stack trace.

Here's my attempt:

$ gdb ./python
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 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 "ppc64le-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /vast/home/quellyn/GIT/cpython/python...done.
(gdb) set args -E -S -m sysconfig --generate-posix-vars
(gdb) run
Starting program: /vast/home/quellyn/GIT/cpython/./python -E -S -m sysconfig 
--generate-posix-vars
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Fatal Python error: take_gil: NULL tstate
Python runtime state: preinitialized

Current thread 0x20045fe0 (most recent call first):

Program received signal SIGSEGV, Segmentation fault.
0x105a3870 in ?? ()
Missing separate debuginfos, use: debuginfo-install 
nss-softokn-freebl-3.53.1-6.el7_9.ppc64le
(gdb) bt
#0  0x105a3870 in ?? ()
#1  0x1021c3a0 in dump_traceback (fd=2, tstate=0x105a3870, 
write_header=0)
at Python/traceback.c:805
#2  0x1021c620 in _Py_DumpTracebackThreads (fd=2, interp=0x105a2b90, 
current_tstate=0x105a3870) at Python/traceback.c:915
#3  0x101ee2ac in _Py_FatalError_DumpTracebacks (fd=2, interp=0x0, 
tstate=0x105a3870)
at Python/pylifecycle.c:1981
#4  0x101ee800 in fatal_error (prefix=0x0, msg=0x1041c7b4 "take_gil: 
NULL tstate", 
status=-1) at Python/pylifecycle.c:2159
#5  0x101ee8b0 in Py_FatalError (msg=0x1041c7b4 "take_gil: NULL tstate")
at Python/pylifecycle.c:2193
#6  0x1017ff04 in take_gil (ceval=0x1055c178 <_PyRuntime+584>, 
tstate=0x0)
at Python/ceval_gil.h:187
#7  0x10191db4 in PyEval_InitThreads () at Python/ceval.c:213
#8  0x101f3490 in pycore_create_interpreter (runtime=0x1055bf30 
<_PyRuntime>, 
config=0x105a2c40, interp_p=0x7fffd3c0) at Python/pylifecycle.c:550
#9  0x101f35e0 in pyinit_config (runtime=0x1055bf30 <_PyRuntime>, 
interp_p=0x7fffd918, 
config=0x7fffd5f0) at Python/pylifecycle.c:674
#10 0x101f3b38 in pyinit_core (runtime=0x1055bf30 <_PyRuntime>, 
src_config=0x7fffdac0, 
interp_p=0x7fffd918) at Python/pylifecycle.c:858
#11 0x101f3dc4 in Py_InitializeFromConfig (config=0x7fffdac0)
at Python/pylifecycle.c:1031
#12 0x1002409c in pymain_init (args=0x7fffde50) at Modules/main.c:78
---Type  to continue, or q  to quit---
#13 0x1002428c in pymain_main (args=0x7fffde50) at 
Modules/main.c:710
#14 0x10024394 in Py_BytesMain (argc=6, argv=0x7fffe2d8) at 
Modules/main.c:743
#15 0x10021e18 in main (argc=6, argv=0x7fffe2d8) at 
./Programs/python.c:16
(gdb)

--

___
Python tracker 
<https://bugs.python.org/issue44877>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com