Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529484 - www-client/firefox - ImportError: cannot import name HTTPSHandler
Summary: www-client/firefox - ImportError: cannot import name HTTPSHandler
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 556092 585430 592306 610872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-16 13:03 UTC by Paul Roland
Modified: 2017-08-26 17:57 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
old, cannot delete (info.txt,222.86 KB, text/plain)
2014-11-16 13:03 UTC, Paul Roland
Details
build log (buildlog.txt,17.77 KB, text/plain)
2014-11-16 16:19 UTC, Paul Roland
Details
emerge -pqv '=www-client/firefox-33.0-r1::gentoo (emerge.txt,1.39 KB, text/plain)
2014-11-16 16:19 UTC, Paul Roland
Details
environment (env.txt,199.85 KB, text/plain)
2014-11-16 16:21 UTC, Paul Roland
Details
emerge --info '=www-client/firefox-33.0-r1::gentoo' (info.txt,4.51 KB, text/plain)
2014-11-16 16:22 UTC, Paul Roland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Roland 2014-11-16 13:03:43 UTC
Created attachment 389482 [details]
old, cannot delete

Latest Firefox with ~amd64 keyword fails to build. Tried adding and removing use flags to no avail.
Comment 1 Alex Xu (Hello71) 2014-11-16 13:20:48 UTC
Please split them into separate files.
Comment 2 Paul Roland 2014-11-16 16:19:03 UTC
Created attachment 389512 [details]
build log
Comment 3 Paul Roland 2014-11-16 16:19:54 UTC
Created attachment 389514 [details]
emerge -pqv '=www-client/firefox-33.0-r1::gentoo
Comment 4 Paul Roland 2014-11-16 16:21:09 UTC
Created attachment 389516 [details]
environment
Comment 5 Paul Roland 2014-11-16 16:22:03 UTC
Created attachment 389518 [details]
emerge --info '=www-client/firefox-33.0-r1::gentoo'
Comment 6 Paul Roland 2014-11-16 16:22:21 UTC
Comment on attachment 389482 [details]
old, cannot delete

old
Comment 7 Paul Roland 2014-11-16 16:23:21 UTC
Done
Comment 8 Paul Roland 2014-11-16 16:24:15 UTC
Comment on attachment 389482 [details]
old, cannot delete

cannot delete.
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-11-16 16:36:07 UTC
Sounds like you built Python without SSL.
Comment 10 Paul Roland 2014-11-16 16:40:06 UTC
Yes make more sense to me now, I am rebuilding world with ssl as we speak. I am sure that is the issue, even so perhaps we can put an condition for it? Like when somebody does the same mistake that I did it would instruct to build python with ssl.
Comment 11 Paul Roland 2014-11-16 16:40:45 UTC
Python was build without ssl.
Comment 12 Jory A. Pratt gentoo-dev 2014-11-16 16:59:53 UTC
please do not close, we will adjust the dep in the eclass.
Comment 13 Brian Evans (RETIRED) gentoo-dev 2015-07-30 19:33:20 UTC
*** Bug 556092 has been marked as a duplicate of this bug. ***
Comment 14 MickKi 2015-07-30 19:57:56 UTC
My python is alredy built with USE="ssl", so is the fix proposed here related to the problem I reported in bug #556092?


[I] dev-lang/python
     Available versions:  
     (2.6)
       **   2.6.9	[-berkdb build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"]
     (2.7)
            2.7.9-r1	[-berkdb build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"]
       ~    2.7.9-r2	[-berkdb build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"]
       ~    2.7.10	[-berkdb build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"]
     (3.2)
            3.2.5-r6	[build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"]
     (3.3)
            3.3.5-r1	[build doc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml ELIBC="uclibc"]
     (3.4)
       ~    3.4.0	[build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml ELIBC="uclibc"]
            3.4.1	[build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml ELIBC="uclibc"]
       ~    3.4.2	[build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml ELIBC="uclibc"]
       ~    3.4.3	[build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml ELIBC="uclibc"]
     Installed versions:  2.7.9-r1(2.7)(09:10:14 12/25/14)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -build -doc -examples -hardened -tk -wininst ELIBC="-uclibc")
                          3.3.5-r1(3.3)(09:00:09 08/22/14)(gdbm ipv6 ncurses readline sqlite ssl threads xml -build -doc -examples -hardened -tk -wininst ELIBC="-uclibc")
                          3.4.1(3.4)(00:44:46 10/14/14)(gdbm ipv6 ncurses readline sqlite ssl threads xml -build -examples -hardened -tk -wininst ELIBC="-uclibc")
     Homepage:            http://www.python.org/
     Description:         An interpreted, interactive, object-oriented programming language

-- 
Regards,
Mick
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2015-07-30 21:02:56 UTC
(In reply to MickKi from comment #14)
> My python is alredy built with USE="ssl", so is the fix proposed here
> related to the problem I reported in bug #556092?


It certainly looks like the same bug...  Here's a quick check, it should work as a test:

cat >/tmp/test.py <<EOF
from urllib2 import HTTPSHandler
EOF

/usr/bin/python2.7 /tmp/test.py

/var/tmp/portage/www-client/firefox-31.8.0/work/mozilla-esr31/obj*/_virtualenv/bin/python2.7 /tmp/test.py


If the latter is the only one that fails, then the issue is (for whatever strange reason) within the firefox build system.  If both fails, then something's wrong with your python:2.7 install.
Comment 16 MickKi 2015-07-30 21:42:10 UTC
Thank you Ian,

This is what I get:

/usr/bin/python2.7 /tmp/test.py
Traceback (most recent call last):
  File "/tmp/test.py", line 1, in <module>
    from urllib2 import HTTPSHandler
ImportError: cannot import name HTTPSHandler

Hmm ... what should I do?  Rebuild python and try again?

-- 
Regards,
Mick
Comment 17 MickKi 2015-07-31 12:10:31 UTC
(In reply to MickKi from comment #16)
> Thank you Ian,
> 
> This is what I get:
> 
> /usr/bin/python2.7 /tmp/test.py
> Traceback (most recent call last):
>   File "/tmp/test.py", line 1, in <module>
>     from urllib2 import HTTPSHandler
> ImportError: cannot import name HTTPSHandler
> 
> Hmm ... what should I do?  Rebuild python and try again?


I've rebuilt python, but no success.

-- 
Regards,
Mick
Comment 18 Ian Stakenvicius (RETIRED) gentoo-dev 2015-07-31 14:34:57 UTC
(In reply to MickKi from comment #16)
> Thank you Ian,
> 
> This is what I get:
> 
> /usr/bin/python2.7 /tmp/test.py
> Traceback (most recent call last):
>   File "/tmp/test.py", line 1, in <module>
>     from urllib2 import HTTPSHandler
> ImportError: cannot import name HTTPSHandler
> 
> Hmm ... what should I do?  Rebuild python and try again?
> 


I don't know.  CC'ing python herd, hopefully they can advise.

python@ -- if this is a bug in python2.7 please feel free to adjust $SUBJECT
Comment 19 Ian Delaney (RETIRED) gentoo-dev 2015-08-01 15:14:44 UTC
It's 99% not python2.7
from urllib2 import HTTPSHandler
says the urllib2 seems to be installed but it lacks a module HTTPSHandler. Suggests to me a version conflict.  The module present in one  but not the one you have installed.  Such things occur between versions.
Comment 20 MickKi 2015-08-02 09:49:03 UTC
(In reply to Ian Delaney from comment #19)
> It's 99% not python2.7
> from urllib2 import HTTPSHandler
> says the urllib2 seems to be installed but it lacks a module HTTPSHandler.
> Suggests to me a version conflict.  The module present in one  but not the
> one you have installed.  Such things occur between versions.

Thank you Ian, it seems that it may be an openssl recerse dependency on python after all, more particularly openssl and its bindist flag.  :-/

At more or less the same time with the FF problem I noticed a different problem with layman, which was complaining about its cache and an https address every time I tried to sync an overlay.  I happened to have the bindist flag set on this box because I was testing EC algos on openssh and this also had me set it on openssl.  Anyway, the solution was to remove the bindist USE flag, rebuild openssl AND python:2.7, which then fixed both the layman problem and the firefox HTTPSHandler.
-- 
Regards,
Mick
Comment 21 Mark 2015-08-19 15:01:31 UTC
Recompiling python 2.7 fixed this issue with firefox-38.1.1.

I had an issue with layman due to missing symbol in python 3.4's ssl lib; recompiling python 3.4 fixed that, and recompiling python 2.7 fixed this. I'd seen an ssl news item about some weak encryption algo (IIRC), so I suspect both were caused by removal of that algo and libs depending on it not getting rebuilt.
Comment 22 Coacher 2016-06-11 14:51:11 UTC
*** Bug 585430 has been marked as a duplicate of this bug. ***
Comment 23 Ian Stakenvicius (RETIRED) gentoo-dev 2016-06-13 15:35:49 UTC
This issue keeps getting hit randomly by people..  I know it's not actually a bug in firefox but is there anything I can do in firefox et. al.'s DEPEND to try and prevent it?  I'm wondering about perhaps adding a gratuitous DEPEND="!dev-libs/openssl[bindist]", for instance...?
Comment 24 Coacher 2016-08-28 11:44:49 UTC
*** Bug 592306 has been marked as a duplicate of this bug. ***
Comment 25 Mike Gilbert gentoo-dev 2016-08-28 14:34:38 UTC
(In reply to Ian Stakenvicius from comment #23)

There's nothing you can/should do via DEPEND. ABI breakage when moving from openssl[-bindist] to openssl[bindist] is a known problem, but further proliferation of that bindist USE flag is not a good solution.

If you want to give people a useful error message, you could perform that python test in the ebuild instead of relying on configure to catch it.

Something like this:

> "${PYTHON}" -c "from urllib2 import HTTPSHandler" || die "Please rebuild ${EPYTHON}"

However, even this seems like overkill for an issue that affects very few people on the whole.
Comment 26 Coacher 2017-02-25 11:17:08 UTC
*** Bug 610872 has been marked as a duplicate of this bug. ***
Comment 27 Jory A. Pratt gentoo-dev 2017-08-26 17:57:25 UTC
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system.

Thank You for your support and understanding
The Mozilla Team