classification
Title: Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/
Type: behavior Stage:
Components: Installation Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cooperlees, terry.reedy, tkandell, vstinner
Priority: normal Keywords:

Created on 2018-07-06 00:53 by tkandell, last changed 2019-06-12 14:13 by cooperlees.

Files
File name Uploaded Description Edit
configure.log tkandell, 2018-07-07 08:28 Output of ./configure for Python 3.7.0 on linux 4.4.114-42-default openSUSE 42.3
make.log tkandell, 2018-07-07 08:47 The output of make with no parameters (after make clean)
Messages (11)
msg321145 - (view) Author: Ted Kandell (tkandell) * Date: 2018-07-06 00:53
The default Python 3.7 install (./configure with no parameters) does not work (at least) on openSUSE Leap 42.3. 

Python3 gives a ModuleNotFoundError: No module named 'readline'
 error, and pip3 has a ModuleNotFoundError: No module named '_socket' error, because the site libraries cannot be found.

The fix is to manually:
sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload

The same problem should also be present with a PYTHONHOME other than the default /usr/local .

I suspect this is a more widespread problem than just openSUSE Leap 42.3, and may exist in other distros as well.

The fix should be for make install to automatically create the symbolic link for the  $PYTHONHOME/lib64/python3.7/lib-dynload directory in $PYTHONHOME/lib/python3.7/ .
msg321199 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-07-07 02:19
A crash, for the tracker, is failed execution without a Python exception and trackback.

Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently green.  We don't have one for SUSE, open or other wise.

If you have not yet reported the issue to openSUSE, I would do so in case this is something they should deal with.

Victor, do you have anything to add?
msg321200 - (view) Author: Ted Kandell (tkandell) * Date: 2018-07-07 02:46
This isn't for the OpenSUSE official build itself, just compiling and installing from source on OpenSUSE 42.3. Without the symlink, and also with a wrong PYTHONHOME, pip coredumps.
msg321204 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-07-07 05:21
Did you get the source from openSUSE or from python.org?
msg321205 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-07 07:09
Can we please recommpile Python from scratch and attach the output of make? Example:

./configure
make 2>&1 | tee log

And attach log to this ticket.
msg321206 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-07 07:10
For readline, you probably have to install a dependency like: libreadline-dev.
msg321207 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-07 07:13
> Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently
green.  We don't have one for SUSE, open or other wise.

We have SLES buildbots, that's OpenSUSE no?
msg321208 - (view) Author: Ted Kandell (tkandell) * Date: 2018-07-07 08:21
I got the source directly from www.python.org
msg321209 - (view) Author: Ted Kandell (tkandell) * Date: 2018-07-07 08:28
./configure output
default, no parameters
msg321211 - (view) Author: Ted Kandell (tkandell) * Date: 2018-07-07 08:47
The output of make after a make clean is attached.

For readline, on openSUSE 42.3 you have to install ncurses-devel, not libreadline-dev. The instructions aren't clear about this either, or the fact that an ncurses or readline development library has to be installed separately. However, this didn't cause the "readline" problem, since the shared libraries were in /usr/local/lib64 instead of /usr/local/lib, and so they couldn't be found in any case.
msg345363 - (view) Author: Cooper Lees (cooperlees) * Date: 2019-06-12 14:13
I also have the same problem with _socket that was Fixed on the latest version of CentOS 7 building with gcc 4.8.5.

Adding:
sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload

Allowed the .so to be found and the import to work.
History
Date User Action Args
2019-06-12 14:13:23cooperleessetnosy: + cooperlees
messages: + msg345363
2018-07-07 08:47:26tkandellsetfiles: + make.log

messages: + msg321211
2018-07-07 08:28:49tkandellsetfiles: + configure.log

messages: + msg321209
2018-07-07 08:21:42tkandellsetmessages: + msg321208
2018-07-07 07:13:24vstinnersetmessages: + msg321207
2018-07-07 07:10:43vstinnersetmessages: + msg321206
2018-07-07 07:09:53vstinnersetmessages: + msg321205
2018-07-07 05:21:03terry.reedysetmessages: + msg321204
2018-07-07 02:46:15tkandellsetmessages: + msg321200
2018-07-07 02:19:23terry.reedysetnosy: + vstinner, terry.reedy
type: crash -> behavior
messages: + msg321199
2018-07-06 00:53:40tkandellcreate