[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx

New submission from Redcxx :

Python failed `make` when building from source if `--enabled-share` is pass in 
when running `./configure`.


...(some output which seem irrevelent)
/bin/ld: /home/e38160wl/Python3.7.4/local/lib/libssl.a(s3_meth.o): relocation 
R_X86_64_32 against `.rodata' can not be used when making a shared object; 
recompile with -fPIC
/home/e38160wl/Python3.7.4/local/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
ln: failed to access ‘libpython3.7m.so.1.0’: No such file or directory
make: *** [libpython3.7m.so] Error 1



I tried adding `CFLAGS="-fPIC"` as parameter of `./configure` but it does not 
make any changes

--
components: Build
messages: 351880
nosy: Redcxx
priority: normal
severity: normal
status: open
title: Error while building Python from source
type: crash
versions: Python 3.7

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



[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx


Redcxx  added the comment:

Sorry for that,

Heres are my os infomation:
LSB Version:
:core-4.1-amd64:core-4.1-ia32:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-ia32:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-ia32:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Scientific
Description:Scientific Linux release 7.3 (Nitrogen)
Release:7.3
Codename:   Nitrogen

I am using Linux as follows:
Linux e-c07kilf3145.it.manchester.ac.uk 3.10.0-514.el7.x86_64 #1 SMP Thu Nov 3 
15:10:49 CDT 2016 x86_64 x86_64 x86_64 GNU/Linux

I am using the latest openssl release:
2019-Sep-10 13:53:14openssl-1.0.2t.tar.gz

*I made a change in the Modules/Setup.dist as my openssl is not in the default 
location:
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/home/e38160wl/local/openssl
ssl_path=/home/e38160wl/local
_ssl _ssl.c \
-DUSE_SSL -I$(ssl_path)/include -I$(ssl_path)/include/openssl \
-L$(ssl_path)/lib -lssl -lcrypto

--
type: compile error -> crash

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



[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx


Change by Redcxx :


--
type: crash -> compile error

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



[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx


Redcxx  added the comment:

Sorry I mistype the changes I made in Modules/Setup.dist, this is the correct 
one:
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/home/e38160wl/Python3.7.4/local/openssl
ssl_path=/home/e38160wl/Python3.7.4/local
_ssl _ssl.c \
-DUSE_SSL -I$(ssl_path)/include -I$(ssl_path)/include/openssl \
-L$(ssl_path)/lib -lssl -lcrypto

--

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



[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx


Redcxx  added the comment:

That works, but I notice some message somewhere near the end of running `make`:
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2  _hashlib  _lzma  
_sqlite3  _ssl  _tkinter   
_uuid readline 
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time   


Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with 
X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, 
https://github.com/libressl-portable/portable/issues/381

And after `make install`, python is not running as expected:
$ python3
python3: error while loading shared libraries: libpython3.7m.so.1.0: cannot 
open shared object file: No such file or directory

--

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



[issue38111] Error while building Python from source

2019-09-11 Thread Redcxx


Redcxx  added the comment:

not sure if it is related but I am installing Python in a different directory 
and I have added that to the prefix option when runnning configure.

--

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