Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Emerging Python fails due to dev-libs/openssl-1.1.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fusion809
n00b
n00b


Joined: 15 Oct 2015
Posts: 71

PostPosted: Sat Dec 23, 2017 5:04 pm    Post subject: [SOLVED] Emerging Python fails due to dev-libs/openssl-1.1.0 Reply with quote

Hi,

I'm trying to install Gentoo (testing, i.e. with the ~amd64 keyword) and:

Code:

emerge --ask --update --deep --newuse @world


draws in Python 2.7, 3.5 and 3.6, their rebuild fails with errors like:

Code:

x86_64-pc-linux-gnu-gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=haswell -fwrapv -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DCONFIG_64=1 -DASM=1 -I/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec -I./Include -I. -I/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Include -I/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3 -c /var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/transpose.c -o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/transpose.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=haswell -fwrapv build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/_decimal.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/basearith.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/constants.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/context.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/convolute.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/crt.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/difradix2.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/fnt.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/fourstep.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/io.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/memory.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/mpdecimal.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/numbertheory.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/sixstep.o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Modules/_decimal/libmpdec/transpose.o -L. -L/usr/local/lib64 -lm -lpython3.6m -o build/lib.linux-x86_64-3.6/_decimal.cpython-36m-x86_64-linux-gnu.so
*** WARNING: renaming "_hashlib" since importing it failed: build/lib.linux-x86_64-3.6/_hashlib.cpython-36m-x86_64-linux-gnu.so: undefined symbol: OPENSSL_add_all_algorithms_noconf

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_sqlite3              _tkinter              nis               
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:
atexit                pwd                   time               

Failed to build these modules:
_ssl                                                           


Following modules built successfully but were removed because they could not be imported:
_hashlib                                                       

running build_scripts
creating build/scripts-3.6
copying and adjusting /var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /var/tmp/portage/dev-lang/python-3.6.3-r1/work/Python-3.6.3/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
make: *** [Makefile:586: sharedmods] Error 1


Based on the hashlib part I guessed the problem was probably with OpenSSL (and yes Python is built with the ssl USE flag). I found that emerging them BEFORE upgrading OpenSSL to 1.1.0g-r2 went without a hitch (which I tested by deleting the first Gentoo install in which I upgrade OpenSSL first). Unfortunately the world update emerged the new OpenSSL and then Python, hence the error returned. I've considered reporting this as a bug but had issues with logging in to the Bugzilla so I thought I'd ask here if anyone has any ideas on how to fix this and whether it really is a true 'bug'. I did search for relevant bugs at the Bugzilla first and it does not seem to have been reported.

Code:

emerge -pqv dev-python/python-3.6.3-r1 dev-libs/openssl


returns (so I can show USE flags):

Code:

[ebuild   R   ] dev-libs/openssl-1.1.0g-r2  USE="asm bindist zlib -rfc3779 -sctp -static-libs {-test} -tls-heartbeat -vanilla" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(sse2)"
[ebuild   R   ] dev-lang/python-3.6.3-r1  USE="gdbm ipv6 ncurses readline ssl (threads) xml -build -examples -hardened -libressl -sqlite -tk -wininst"


bindist is only set as I tried setting it in the hope it would fix the problem. I have also tried changing the USE flag on Python to -ssl, but unfortunately world rebuilds will not tolerate this. I have also tried masking this release of OpenSSL in the hope that downgrading would fix things but na, it does not seem to want to work for me.

Thanks for your time,
Brenton
_________________
Open-source advocate with an inquisitive disposition


Last edited by fusion809 on Sat Dec 23, 2017 8:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Sat Dec 23, 2017 8:42 pm    Post subject: Reply with quote

As of my last sync, =dev-libs/openssl-1.1.0g-r2 was hard-masked and for good reason. It should not be installed for you, even on ~amd64. Masking (or, technically, undoing the unmask of it) it is the right approach. What exactly did you do to try to mask it? What did you see that leads you to say it will not work for you?
Back to top
View user's profile Send private message
fusion809
n00b
n00b


Joined: 15 Oct 2015
Posts: 71

PostPosted: Sat Dec 23, 2017 8:49 pm    Post subject: Reply with quote

I found an unmask in package.unmask, which I didn't put in, at least not to knowledge, so I deleted it. Sorry the problem is now fixed, thanks. Sorry for wasting ya time.
_________________
Open-source advocate with an inquisitive disposition
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Sun Dec 24, 2017 1:44 am    Post subject: Reply with quote

No need to apologize. Just learn from it and be more cautious about unmasking packages. :)
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7000
Location: Austria

PostPosted: Mon Dec 25, 2017 9:46 am    Post subject: Reply with quote

Do not trust portage --autounmask.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum