# [solved] firefox compile error

## luna80

I get this error while compile firefox

```
File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/virtualenv.py", line 147, in create

    raise Exception('Error creating virtualenv.')

Exception: Error creating virtualenv.

------ config.log ------

This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

configure:1177: checking host system type

configure:1198: checking target system type

configure:1216: checking build system type

configure:1295: checking for mawk

configure:1295: checking for gawk

*** Fix above errors and then restart with\

               "make -f client.mk build"

client.mk:361: recipe for target 'configure' failed

make: *** [configure] Error 1

 * ERROR: www-client/firefox-38.8.0::gentoo failed (configure phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=www-client/firefox-38.8.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=www-client/firefox-38.8.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/environment'.

 * Working directory: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

 * S: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

>>> Failed to emerge www-client/firefox-38.8.0, Log file:

>>>  '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'

 * Messages for package www-client/firefox-38.8.0:

 * You are enabling official branding. You may not redistribute this build

 * to any users on your network or the internet. Doing so puts yourself into

 * a legal problem with Mozilla Foundation

 * You can disable it by emerging firefox _with_ the bindist USE-flag

 * ERROR: www-client/firefox-38.8.0::gentoo failed (configure phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=www-client/firefox-38.8.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=www-client/firefox-38.8.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/environment'.

 * Working directory: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

 * S: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

```

localhost ~ # emerge --info '=www-client/firefox-38.8.0::gentoo'

```

Portage 2.2.28 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.22-r4, 4.4.6-gentoo-surfacepro3 x86_64)

=================================================================

                         System Settings

=================================================================

System uname: Linux-4.4.6-gentoo-surfacepro3-x86_64-Intel-R-_Core-TM-_i5-4300U_CPU_@_1.90GHz-with-gentoo-2.2

KiB Mem:     3949620 total,     96568 free

KiB Swap:     524284 total,    522692 free

sh bash 4.3_p42-r1

ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1

app-shells/bash:          4.3_p42-r1::gentoo

dev-lang/perl:            5.20.2::gentoo

dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo

dev-util/cmake:           3.3.1-r1::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.2::gentoo

sys-apps/openrc:          0.19.1::gentoo

sys-apps/sandbox:         2.10-r1::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo

sys-devel/binutils:       2.25.1-r1::gentoo

sys-devel/gcc:            4.9.3::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6::gentoo

sys-devel/make:           4.1-r1::gentoo

sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)

sys-libs/glibc:           2.22-r4::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-Os -march=native -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-Os -march=native -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/"

LANG="it_CH.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/var/tmp"

USE="X acl alsa amd64 berkdb build bzip2 cli cracklib crypt cxx dri fortran gdbm gif iconv ipv6 jpeg mmx mmxext modules multilib ncurses nls nptl openmp pam pcmcia pcre png readline seccomp session sse sse2 ssl tcpd truetype unicode usb xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="i915 intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

```

any suggestion? thanks in advance

----------

## audiodef

It seems to throw an error at gawk. 

1. Re-emerge gawk?

2. Down/upgrade Firefox, might be a problem version.

3. Use firefox-bin. The few binary pkgs available in portage are there because those are known trouble pkgs for compilation.

4. Sync and update @system and @world, sometimes that fixes old/outdated issues.

----------

## luna80

thanks a lot for your reply   :Very Happy:  , but nothing seems to fix the problem

I'll emerge firefox-bin if I don't find any solution

----------

## Syl20

Could you wgetpaste the hole emerge output please ? I think the real error is above the lines you already pasted.

----------

## luna80

```
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Running pre-merge checks for www-client/firefox-38.8.0

 * Checking for at least 4 GiB disk space at "/var/tmp/portage/www-client/firefox-38.8.0/temp" ...                                                       [ ok ]

>>> Emerging (1 of 1) www-client/firefox-38.8.0::gentoo

 * firefox-38.8.0esr-en-GB.xpi SHA256 SHA512 size ;-) ...                [ ok ]

 * firefox-38.8.0esr-it.xpi SHA256 SHA512 size ;-) ...                   [ ok ]

 * firefox-38.0-patches-04.tar.xz SHA256 SHA512 size ;-) ...             [ ok ]

 * firefox-38.8.0esr.source.tar.bz2 SHA256 SHA512 size ;-) ...           [ ok ]

 * 

 * You are enabling official branding. You may not redistribute this build

 * to any users on your network or the internet. Doing so puts yourself into

 * a legal problem with Mozilla Foundation

 * You can disable it by emerging firefox _with_ the bindist USE-flag

>>> Unpacking source...

>>> Unpacking firefox-38.8.0esr-en-GB.xpi to /var/tmp/portage/www-client/firefox-38.8.0/work

unpack firefox-38.8.0esr-en-GB.xpi: file format not recognized. Ignoring.

>>> Unpacking firefox-38.8.0esr-it.xpi to /var/tmp/portage/www-client/firefox-38.8.0/work

unpack firefox-38.8.0esr-it.xpi: file format not recognized. Ignoring.

>>> Unpacking firefox-38.0-patches-04.tar.xz to /var/tmp/portage/www-client/firefox-38.8.0/work

>>> Unpacking firefox-38.8.0esr.source.tar.bz2 to /var/tmp/portage/www-client/firefox-38.8.0/work

 * Unpacking firefox-38.8.0esr-it.xpi to /var/tmp/portage/www-client/firefox-38.8.0/work

 * Unpacking firefox-38.8.0esr-en-GB.xpi to /var/tmp/portage/www-client/firefox-38.8.0/work

 * Selected language packs (first will be default): it en-GB

>>> Source unpacked in /var/tmp/portage/www-client/firefox-38.8.0/work

>>> Preparing source in /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38 ...

 * Applying various patches (bugfixes/updates) ...

 *   2000-firefox_gentoo_install_dirs.patch ...                          [ ok ]

 *   2002_fix-preferences-gentoo.patch ...                               [ ok ]

 *   5001_allow_locked_prefs_v2.patch ...                                [ ok ]

 *   5002_avoid_spurious_run_items_in_application_handlers.patch ...     [ ok ]

 *   6001_add_alpha_defines_in_ipc.patch ...                             [ ok ]

 *   7000_drop-Wl-build-id_v4.patch ...                                  [ ok ]

 *   7003_freebsd_jscpucfg.patch ...                                     [ ok ]

 *   7004_freebsd_libexecinfo_v3.patch ...                               [ ok ]

 *   7005_dont-hardcode-libc-soname-in-python.patch ...                  [ ok ]

 *   8001_hppa_js_configure.patch ...                                    [ ok ]

 *   8002_jemalloc_configure_unbashify.patch ...                         [ ok ]

 *   8003_gmp_clearkey_sprintf.patch ...                                 [ ok ]

 *   Skipping 8010_bug114311-freetype26.patch due to EPATCH_EXCLUDE ...

 *   Skipping 8011_bug1194520-freetype261_until_moz43.patch due to EPATCH_EXCLUDE ...

 * Done with patching

 * Running eautoreconf in '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38' ...

 * Running autoconf ...                                                  [ ok ]

 * Running elibtoolize in: mozilla-esr38/

 * Running elibtoolize in: mozilla-esr38/intl/icu/source/

 * Running elibtoolize in: mozilla-esr38/ipc/chromium/src/third_party/libevent/

 *   Applying portage/1.2.0 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.4.2 patch ...

 *   Applying target-nm/2.4.2 patch ...

 * Running elibtoolize in: mozilla-esr38/js/src/

 * Running elibtoolize in: mozilla-esr38/js/src/ctypes/libffi/

 *   Applying portage/1.2.0 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.4.2 patch ...

 *   Applying target-nm/2.4.2 patch ...

 * Running elibtoolize in: mozilla-esr38/memory/jemalloc/src/

 * Running elibtoolize in: mozilla-esr38/modules/freetype2/

 * Running elibtoolize in: mozilla-esr38/modules/freetype2/builds/unix/

 *   Applying portage/1.2.0 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.4.3 patch ...

 * Running elibtoolize in: mozilla-esr38/nsprpub/

 * Running elibtoolize in: mozilla-esr38/python/mozbuild/mozbuild/

 * Running elibtoolize in: mozilla-esr38/security/nss/tests/pkcs11/netscape/trivial/

 * Running elibtoolize in: mozilla-esr38/toolkit/crashreporter/google-breakpad/

 * Running elibtoolize in: mozilla-esr38/toolkit/crashreporter/google-breakpad/autotools/

 *   Applying portage/2.2 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.2.6 patch ...

 * Running elibtoolize in: mozilla-esr38/toolkit/crashreporter/google-breakpad/src/third_party/glog/

 *   Applying portage/2.2 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.2.6 patch ...

 *   Applying target-nm/2.4.2 patch ...

 * Running autoconf ...                                                  [ ok ]

 * Running autoconf ...                                                  [ ok ]

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38 ...

==========================================================

Building firefox-38.8.0 with the following configuration

    --enable-application=browser    mozilla.org default

    --enable-optimize               mozilla default

    --disable-pedantic              disable_update_strip

    --disable-updater               disable_update_strip

    --disable-strip                 disable_update_strip

    --disable-install-strip         disable_update_strip

    --disable-installer             disable_update_strip

    --disable-strip-libs            disable_update_strip

    --disable-profilelocking        basic_profile

    --enable-single-profile         basic_profile

    --disable-profilesharing        basic_profile

    --with-system-zlib              system_libs

    --enable-pango                  system_libs

    --enable-svg                    system_libs

    --with-system-bz2               system_libs

    --enable-default-toolkit=cairo-gtk2  mozilla.org default

    --enable-official-branding      +!bindist

    --disable-debug                 -debug

    --disable-tests                 -debug

    --disable-debug-symbols         disabled by Gentoo

    --disable-startup-notification  -startup-notification

    --disable-necko-wifi            -wifi

    --disable-dbus                  -dbus

    --enable-ogg                    required

    --enable-wave                   required

    --enable-ion                    +jit

    --with-system-nspr              mozilla.org default

    --with-nspr-prefix=/usr         mozilla.org default

    --with-system-nss               mozilla.org default

    --with-nss-prefix=/usr          mozilla.org default

    --x-includes=/usr/include       mozilla.org default

    --x-libraries=/usr/lib64        mozilla.org default

    --with-system-libevent=/usr     mozilla.org default

    --prefix=/usr                   mozilla.org default

    --libdir=/usr/lib64             mozilla.org default

    --enable-system-hunspell        Gentoo default

    --disable-gnomevfs              mozilla.org default

    --disable-gnomeui               mozilla.org default

    --enable-gio                    mozilla.org default

    --disable-crashreporter         mozilla.org default

    --with-system-png               Gentoo default

    --enable-system-ffi             mozilla.org default

    --disable-gold                  Gentoo default to honor system linker

    --disable-gconf                 mozilla.org default

    --disable-skia                  Gentoo default

    --with-intl-api                 mozilla.org default

    --enable-jemalloc               mozilla.org default

    --enable-replace-malloc         mozilla.org default

    --target=x86_64-pc-linux-gnu    mozilla.org default

    --build=x86_64-pc-linux-gnu     mozilla.org default

    --disable-gstreamer             mozilla.org default

    --disable-pulseaudio            -pulseaudio

    --disable-system-cairo          -system-cairo

    --disable-system-sqlite         -system-sqlite

    --without-system-jpeg           -system-jpeg

    --without-system-icu            -system-icu

    --without-system-libvpx         -system-libvpx

    --with-google-api-keyfile=/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/google-api-key  mozilla.org default

    --enable-extensions=default     mozilla.org default

    --disable-mailnews              mozilla.org default

    --with-default-mozilla-five-home=/usr/lib64/firefox  mozilla.org default

==========================================================

make -j2 -f client.mk configure 

client.mk:201: /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/.mozconfig.mk: No such file or directory

mkdir -p '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/'

/usr/bin/python2.7 /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/config/pythonpath.py -I /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/testing/mozbase/mozfile \

    /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/controller/clobber.py /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38 /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff

Clobber not needed.

> /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/.mozconfig.mk

cp /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/.mozconfig /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/.mozconfig

cd /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff

/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/configure

Adding configure options from /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/.mozconfig

  --enable-application=browser

  --enable-optimize

  --disable-pedantic

  --disable-updater

  --disable-strip

  --disable-install-strip

  --disable-installer

  --disable-strip-libs

  --disable-profilelocking

  --enable-single-profile

  --disable-profilesharing

  --with-system-zlib

  --enable-pango

  --enable-svg

  --with-system-bz2

  --enable-default-toolkit=cairo-gtk2

  --enable-official-branding

  --disable-debug

  --disable-tests

  --disable-debug-symbols

  --disable-startup-notification

  --disable-necko-wifi

  --disable-dbus

  --enable-ogg

  --enable-wave

  --enable-ion

  --with-system-nspr

  --with-nspr-prefix=/usr

  --with-system-nss

  --with-nss-prefix=/usr

  --x-includes=/usr/include

  --x-libraries=/usr/lib64

  --with-system-libevent=/usr

  --prefix=/usr

  --libdir=/usr/lib64

  --enable-system-hunspell

  --disable-gnomevfs

  --disable-gnomeui

  --enable-gio

  --disable-crashreporter

  --with-system-png

  --enable-system-ffi

  --disable-gold

  --disable-gconf

  --disable-skia

  --with-intl-api

  --enable-jemalloc

  --enable-replace-malloc

  --target=x86_64-pc-linux-gnu

  --build=x86_64-pc-linux-gnu

  --disable-gstreamer

  --disable-pulseaudio

  --disable-system-cairo

  --disable-system-sqlite

  --without-system-jpeg

  --without-system-icu

  --without-system-libvpx

  --with-google-api-keyfile=/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/google-api-key

  --disable-mailnews

  --with-default-mozilla-five-home=/usr/lib64/firefox

  --enable-extensions=default

creating cache ./config.cache

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-pc-linux-gnu

checking build system type... x86_64-pc-linux-gnu

checking for mawk... no

checking for gawk... gawk

Using Python from environment variable $PYTHON

Creating Python environment

New python executable in /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/_virtualenv/bin/python2.7

Also creating executable in /var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/ff/_virtualenv/bin/python

Installing setuptools, pip...

  Complete output from command /var/tmp/portage/www...ualenv/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:

  Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/__init__.py", line 15, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 11, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/download.py", line 30, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 81, in load_module

ImportError: No module named 'pip._vendor.requests'

----------------------------------------

...Installing setuptools, pip...done.

Traceback (most recent call last):

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv.py", line 2352, in <module>

    main()

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv.py", line 825, in main

    symlink=options.symlink)

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv.py", line 993, in create_environment

    install_wheel(to_install, py_executable, search_dirs)

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv.py", line 961, in install_wheel

    'PIP_NO_INDEX': '1'

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv.py", line 903, in call_subprocess

    % (cmd_desc, proc.returncode))

OSError: Command /var/tmp/portage/www...ualenv/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1

Traceback (most recent call last):

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/virtualenv.py", line 475, in <module>

    manager.ensure()

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/virtualenv.py", line 128, in ensure

    return self.build()

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/virtualenv.py", line 371, in build

    self.create()

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/mozbuild/mozbuild/virtualenv.py", line 147, in create

    raise Exception('Error creating virtualenv.')

Exception: Error creating virtualenv.

------ config.log ------

This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

configure:1177: checking host system type

configure:1198: checking target system type

configure:1216: checking build system type

configure:1295: checking for mawk

configure:1295: checking for gawk

*** Fix above errors and then restart with\

               "make -f client.mk build"

client.mk:361: recipe for target 'configure' failed

make: *** [configure] Error 1

 * ERROR: www-client/firefox-38.8.0::gentoo failed (configure phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=www-client/firefox-38.8.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=www-client/firefox-38.8.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/environment'.

 * Working directory: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

 * S: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

>>> Failed to emerge www-client/firefox-38.8.0, Log file:

>>>  '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'

 * Messages for package www-client/firefox-38.8.0:

 * You are enabling official branding. You may not redistribute this build

 * to any users on your network or the internet. Doing so puts yourself into

 * a legal problem with Mozilla Foundation

 * You can disable it by emerging firefox _with_ the bindist USE-flag

 * ERROR: www-client/firefox-38.8.0::gentoo failed (configure phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=www-client/firefox-38.8.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=www-client/firefox-38.8.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-38.8.0/temp/environment'.

 * Working directory: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

 * S: '/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38'

```

thanks syl20

----------

## Buffoon

Have you run python-updater?

----------

## luna80

yes, but doesn't solve the problem

----------

## Syl20

Ok, the problem is here :

```
Installing setuptools, pip...

  Complete output from command /var/tmp/portage/www...ualenv/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:

  Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/__init__.py", line 15, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 11, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/download.py", line 30, in <module>

  File "/var/tmp/portage/www-client/firefox-38.8.0/work/mozilla-esr38/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 81, in load_module

ImportError: No module named 'pip._vendor.requests' 
```

So it's python-related.

I don't have enough time to dig further now, but I'm sure you'll find some clues with these messages.

----------

## Perfect Gentleman

update world, re-emerge openssl

----------

## luna80

nothing to do, I already tried to recompile openssl, python2.7 and python3.4 without solution

I don't find how to fix, 

I found this discussion

https://forums.gentoo.org/viewtopic-t-1014894-highlight-importerror+module+named+pip+vendor+requests.html

but for me is not a solution...

----------

## ChrisJumper

First I really would not use the stable firefox because there are some bug fixes that are, i think only applied as in last available version. Maybe that some Package Maintainers here will downgrade the security fixes, but since there are no -r1, -r2 additions to the packages...

Second: Take a deeper look at your Python-Settings and your PYTHON_TARGETS. I suppose that the package that throw the error is python-related and dev-python/pip could play a role. So if you use python 3.3 for example you need this package build with the updated python_targets. By the way the stable Version is 7.1.2 and you still use 6.0.6...

----------

## luna80

same problem with firefox 47

I tried to emerge pip but this installation fails too

everytime the error

```
cannot import name HTTPSHandler

```

----------

## ChrisJumper

Try to install or update openssl? I am not sure, just a try.

----------

## luna80

 *ChrisJumper wrote:*   

> Try to install or update openssl? I am not sure, just a try.

 

already tried but no success

----------

## khayyam

luna80 ...

it is bug 529484 ... from the comments you should be able to correct the issue with the following:

```
USE="-bindist"
```

```
# emerge --deep --with-bdeps=y --changed-use @world

# emerge www-client/firefox
```

HTH & best ... khay

----------

## luna80

khayyam,

I already have the use flag bindist disabled

----------

## khayyam

 *luna80 wrote:*   

> I already have the use flag bindist disabled

 

luna80 ... compare the above error with those provided in the bug, I'm fairly sure these are the same issue. The fact you say it's not bindist contradicts the resolution provided in that bug ... so, please check:

```
# eix '-Ice#' --installed-with-use bindist
```

Its possible that though disabled, you have --with-bdeps=n, or emerge without --changed-use, or --newuse, and so may have it enabled on some package.

best ... khay

----------

## krinn

lacking bindist presence in make.conf doesn't mean you didn't handle it thru package.use...

look at emerge -pv openssl firefox output.

If you also look equery u openssl you'll see enabling/disabling bindist on openssl mean you must also rebuild any libs and programs that depends on it because of the ABI change. It mean just rebuilding openssl is not enough and you need revdep-rebuild work.

----------

## luna80

```
localhost ~ # eix '-Ice#' --installed-with-use bindist

localhost ~ # 

```

khayyam, as you can see eix return no package

----------

## luna80

 *krinn wrote:*   

> lacking bindist presence in make.conf doesn't mean you didn't handle it thru package.use...
> 
> look at emerge -pv openssl firefox output.
> 
> 

 

```
localhost ~ # emerge -pv openssl firefox

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] dev-libs/openssl-1.0.2h-r2::gentoo  USE="asm sslv3 tls-heartbeat zlib -bindist -gmp -kerberos -rfc3779 -sctp -sslv2 -static-libs {-test} -vanilla" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB

[ebuild  N    ~] www-client/firefox-47.0::gentoo  USE="gmp-autoupdate hwaccel jemalloc3 jit -bindist -custom-cflags -custom-optimization -dbus -debug -gtk2 -hardened (-neon) (-pgo) -pulseaudio (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" LINGUAS="en_GB it -ach -af -an -ar -as -ast -az -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hsb -hu -hy_AM -id -is -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -ms -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -uz -vi -xh -zh_CN -zh_TW" 0 KiB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 KiB
```

 *krinn wrote:*   

> l
> 
> If you also look equery u openssl you'll see enabling/disabling bindist on openssl mean you must also rebuild any libs and programs that depends on it because of the ABI change. It mean just rebuilding openssl is not enough and you need revdep-rebuild work.

 

```
localhost ~ # equery u openssl

[ Legend : U - final flag setting for installation]

[        : I - package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for dev-libs/openssl-1.0.2h-r2:

 U I

 - - abi_x86_32    : 32-bit (x86) libraries

 + + asm           : Support assembly hand optimized crypto functions (i.e.

                     faster run time)

 - - bindist       : Disable EC algorithms (as they seem to be patented) --

                     note: changes the ABI

 - - gmp           : Add support for dev-libs/gmp (GNU MP library)

 - - kerberos      : Add kerberos support

 - - rfc3779       : Enable support for RFC 3779 (X.509 Extensions for IP

                     Addresses and AS Identifiers)

 - - sctp          : Support for Stream Control Transmission Protocol

 - - sslv2         : Support for the old/insecure SSLv2 protocol -- note: not

                     required for TLS/https

 + + sslv3         : Support for the old/insecure SSLv3 protocol -- note: not

                     required for TLS/https

 - - static-libs   : Build static versions of dynamic libraries as well

 - - test          : Workaround to pull in packages needed to run with

                     FEATURES=test. Portage-2.1.2 handles this internally, so

                     don't set it in make.conf/package.use anymore

 + + tls-heartbeat : Enable the Heartbeat Extension in TLS and DTLS

 - - vanilla       : Do not add extra patches which change default behaviour;

                     DO NOT USE THIS ON A GLOBAL SCALE as the severity of the

                     meaning changes drastically

 + + zlib          : Add support for zlib (de)compression
```

----------

## khayyam

 *luna80 wrote:*   

> 
> 
> ```
> localhost ~ # eix '-Ice#' --installed-with-use bindist
> ```
> ...

 

luna80 ... ok, but that doesn't mean that one or other package wasn't built when bindist was enabled, and hasn't yet been rebuilt (because its a bdep, or whatever).

You might try the following:

```
# USE="ssl" emerge --oneshot dev-lang/python:2.7 dev-lang/python:3.4

# eselect python list --python2

# eselect python set --python2 {n}

# eselect python list --python3

# eselect python set --python3 {n}

# python-updater

# cat >/tmp/test.py <<EOF

from urllib2 import HTTPSHandler

EOF

# /usr/bin/python2.7 /tmp/test.py ; echo $?
```

If successful then you should be able to do the following:

```
# USE_PYTHON="2.7" emerge www-client/firefox
```

HTH & best ... khay

----------

## luna80

that's the result

```

localhost ~ # /usr/bin/python2.7 /tmp/test.py ; echo $?

Traceback (most recent call last):

  File "/tmp/test.py", line 1, in <module>

    from urllib2 import HTTPSHandler

ImportError: cannot import name HTTPSHandler

1

localhost ~ #
```

----------

## khayyam

 *luna80 wrote:*   

> 
> 
> ```
> localhost ~ # /usr/bin/python2.7 /tmp/test.py ; echo $?
> 
> ...

 

luna80 ... and the output of the following please:

```
# PYTHONVERBOSE=x /usr/bin/python2.7 /tmp/test.py -vvv
```

best ... khay

----------

## luna80

khayyam, this the output

```
# installing zipimport hook

import zipimport # builtin

# installed zipimport hook

# /usr/lib64/python2.7/site.pyc matches /usr/lib64/python2.7/site.py

import site # precompiled from /usr/lib64/python2.7/site.pyc

# /usr/lib64/python2.7/os.pyc matches /usr/lib64/python2.7/os.py

import os # precompiled from /usr/lib64/python2.7/os.pyc

import errno # builtin

import posix # builtin

# /usr/lib64/python2.7/posixpath.pyc matches /usr/lib64/python2.7/posixpath.py

import posixpath # precompiled from /usr/lib64/python2.7/posixpath.pyc

# /usr/lib64/python2.7/stat.pyc matches /usr/lib64/python2.7/stat.py

import stat # precompiled from /usr/lib64/python2.7/stat.pyc

# /usr/lib64/python2.7/genericpath.pyc matches /usr/lib64/python2.7/genericpath.py

import genericpath # precompiled from /usr/lib64/python2.7/genericpath.pyc

# /usr/lib64/python2.7/warnings.pyc matches /usr/lib64/python2.7/warnings.py

import warnings # precompiled from /usr/lib64/python2.7/warnings.pyc

# /usr/lib64/python2.7/linecache.pyc matches /usr/lib64/python2.7/linecache.py

import linecache # precompiled from /usr/lib64/python2.7/linecache.pyc

# /usr/lib64/python2.7/types.pyc matches /usr/lib64/python2.7/types.py

import types # precompiled from /usr/lib64/python2.7/types.pyc

# /usr/lib64/python2.7/UserDict.pyc matches /usr/lib64/python2.7/UserDict.py

import UserDict # precompiled from /usr/lib64/python2.7/UserDict.pyc

# /usr/lib64/python2.7/_abcoll.pyc matches /usr/lib64/python2.7/_abcoll.py

import _abcoll # precompiled from /usr/lib64/python2.7/_abcoll.pyc

# /usr/lib64/python2.7/abc.pyc matches /usr/lib64/python2.7/abc.py

import abc # precompiled from /usr/lib64/python2.7/abc.pyc

# /usr/lib64/python2.7/_weakrefset.pyc matches /usr/lib64/python2.7/_weakrefset.py

import _weakrefset # precompiled from /usr/lib64/python2.7/_weakrefset.pyc

import _weakref # builtin

# /usr/lib64/python2.7/copy_reg.pyc matches /usr/lib64/python2.7/copy_reg.py

import copy_reg # precompiled from /usr/lib64/python2.7/copy_reg.pyc

# /usr/lib64/python2.7/traceback.pyc matches /usr/lib64/python2.7/traceback.py

import traceback # precompiled from /usr/lib64/python2.7/traceback.pyc

# /usr/lib64/python2.7/sysconfig.pyc matches /usr/lib64/python2.7/sysconfig.py

import sysconfig # precompiled from /usr/lib64/python2.7/sysconfig.pyc

# /usr/lib64/python2.7/re.pyc matches /usr/lib64/python2.7/re.py

import re # precompiled from /usr/lib64/python2.7/re.pyc

# /usr/lib64/python2.7/sre_compile.pyc matches /usr/lib64/python2.7/sre_compile.py

import sre_compile # precompiled from /usr/lib64/python2.7/sre_compile.pyc

import _sre # builtin

# /usr/lib64/python2.7/sre_parse.pyc matches /usr/lib64/python2.7/sre_parse.py

import sre_parse # precompiled from /usr/lib64/python2.7/sre_parse.pyc

# /usr/lib64/python2.7/sre_constants.pyc matches /usr/lib64/python2.7/sre_constants.py

import sre_constants # precompiled from /usr/lib64/python2.7/sre_constants.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_locale.so", 2);

import _locale # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_locale.so

# /usr/lib64/python2.7/_sysconfigdata.pyc matches /usr/lib64/python2.7/_sysconfigdata.py

import _sysconfigdata # precompiled from /usr/lib64/python2.7/_sysconfigdata.pyc

import encodings # directory /usr/lib64/python2.7/encodings

# /usr/lib64/python2.7/encodings/__init__.pyc matches /usr/lib64/python2.7/encodings/__init__.py

import encodings # precompiled from /usr/lib64/python2.7/encodings/__init__.pyc

# /usr/lib64/python2.7/codecs.pyc matches /usr/lib64/python2.7/codecs.py

import codecs # precompiled from /usr/lib64/python2.7/codecs.pyc

import _codecs # builtin

# /usr/lib64/python2.7/encodings/aliases.pyc matches /usr/lib64/python2.7/encodings/aliases.py

import encodings.aliases # precompiled from /usr/lib64/python2.7/encodings/aliases.pyc

# /usr/lib64/python2.7/encodings/utf_8.pyc matches /usr/lib64/python2.7/encodings/utf_8.py

import encodings.utf_8 # precompiled from /usr/lib64/python2.7/encodings/utf_8.pyc

Python 2.7.10 (default, Jun 30 2016, 18:08:56) 

[GCC 4.9.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

# /usr/lib64/python2.7/urllib2.pyc matches /usr/lib64/python2.7/urllib2.py

import urllib2 # precompiled from /usr/lib64/python2.7/urllib2.pyc

# /usr/lib64/python2.7/base64.pyc matches /usr/lib64/python2.7/base64.py

import base64 # precompiled from /usr/lib64/python2.7/base64.pyc

# /usr/lib64/python2.7/struct.pyc matches /usr/lib64/python2.7/struct.py

import struct # precompiled from /usr/lib64/python2.7/struct.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_struct.so", 2);

import _struct # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_struct.so

dlopen("/usr/lib64/python2.7/lib-dynload/binascii.so", 2);

import binascii # dynamically loaded from /usr/lib64/python2.7/lib-dynload/binascii.so

# /usr/lib64/python2.7/hashlib.pyc matches /usr/lib64/python2.7/hashlib.py

import hashlib # precompiled from /usr/lib64/python2.7/hashlib.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_md5.so", 2);

import _md5 # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_md5.so

dlopen("/usr/lib64/python2.7/lib-dynload/_sha.so", 2);

import _sha # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_sha.so

dlopen("/usr/lib64/python2.7/lib-dynload/_sha256.so", 2);

import _sha256 # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_sha256.so

dlopen("/usr/lib64/python2.7/lib-dynload/_sha512.so", 2);

import _sha512 # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_sha512.so

# /usr/lib64/python2.7/httplib.pyc matches /usr/lib64/python2.7/httplib.py

import httplib # precompiled from /usr/lib64/python2.7/httplib.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/array.so", 2);

import array # dynamically loaded from /usr/lib64/python2.7/lib-dynload/array.so

# /usr/lib64/python2.7/socket.pyc matches /usr/lib64/python2.7/socket.py

import socket # precompiled from /usr/lib64/python2.7/socket.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_socket.so", 2);

import _socket # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_socket.so

# /usr/lib64/python2.7/functools.pyc matches /usr/lib64/python2.7/functools.py

import functools # precompiled from /usr/lib64/python2.7/functools.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_functools.so", 2);

import _functools # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_functools.so

dlopen("/usr/lib64/python2.7/lib-dynload/cStringIO.so", 2);

import cStringIO # dynamically loaded from /usr/lib64/python2.7/lib-dynload/cStringIO.so

# /usr/lib64/python2.7/urlparse.pyc matches /usr/lib64/python2.7/urlparse.py

import urlparse # precompiled from /usr/lib64/python2.7/urlparse.pyc

# /usr/lib64/python2.7/collections.pyc matches /usr/lib64/python2.7/collections.py

import collections # precompiled from /usr/lib64/python2.7/collections.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_collections.so", 2);

import _collections # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_collections.so

dlopen("/usr/lib64/python2.7/lib-dynload/operator.so", 2);

import operator # dynamically loaded from /usr/lib64/python2.7/lib-dynload/operator.so

# /usr/lib64/python2.7/keyword.pyc matches /usr/lib64/python2.7/keyword.py

import keyword # precompiled from /usr/lib64/python2.7/keyword.pyc

# /usr/lib64/python2.7/heapq.pyc matches /usr/lib64/python2.7/heapq.py

import heapq # precompiled from /usr/lib64/python2.7/heapq.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/itertools.so", 2);

import itertools # dynamically loaded from /usr/lib64/python2.7/lib-dynload/itertools.so

dlopen("/usr/lib64/python2.7/lib-dynload/_heapq.so", 2);

import _heapq # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_heapq.so

import thread # builtin

# /usr/lib64/python2.7/mimetools.pyc matches /usr/lib64/python2.7/mimetools.py

import mimetools # precompiled from /usr/lib64/python2.7/mimetools.pyc

# /usr/lib64/python2.7/tempfile.pyc matches /usr/lib64/python2.7/tempfile.py

import tempfile # precompiled from /usr/lib64/python2.7/tempfile.pyc

# /usr/lib64/python2.7/io.pyc matches /usr/lib64/python2.7/io.py

import io # precompiled from /usr/lib64/python2.7/io.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_io.so", 2);

import _io # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_io.so

# /usr/lib64/python2.7/random.pyc matches /usr/lib64/python2.7/random.py

import random # precompiled from /usr/lib64/python2.7/random.pyc

# /usr/lib64/python2.7/__future__.pyc matches /usr/lib64/python2.7/__future__.py

import __future__ # precompiled from /usr/lib64/python2.7/__future__.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/math.so", 2);

import math # dynamically loaded from /usr/lib64/python2.7/lib-dynload/math.so

dlopen("/usr/lib64/python2.7/lib-dynload/_random.so", 2);

import _random # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_random.so

dlopen("/usr/lib64/python2.7/lib-dynload/fcntl.so", 2);

import fcntl # dynamically loaded from /usr/lib64/python2.7/lib-dynload/fcntl.so

# /usr/lib64/python2.7/rfc822.pyc matches /usr/lib64/python2.7/rfc822.py

import rfc822 # precompiled from /usr/lib64/python2.7/rfc822.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/time.so", 2);

import time # dynamically loaded from /usr/lib64/python2.7/lib-dynload/time.so

# /usr/lib64/python2.7/ssl.pyc matches /usr/lib64/python2.7/ssl.py

import ssl # precompiled from /usr/lib64/python2.7/ssl.pyc

# /usr/lib64/python2.7/textwrap.pyc matches /usr/lib64/python2.7/textwrap.py

import textwrap # precompiled from /usr/lib64/python2.7/textwrap.pyc

# /usr/lib64/python2.7/string.pyc matches /usr/lib64/python2.7/string.py

import string # precompiled from /usr/lib64/python2.7/string.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/strop.so", 2);

import strop # dynamically loaded from /usr/lib64/python2.7/lib-dynload/strop.so

# /usr/lib64/python2.7/contextlib.pyc matches /usr/lib64/python2.7/contextlib.py

import contextlib # precompiled from /usr/lib64/python2.7/contextlib.pyc

# /usr/lib64/python2.7/bisect.pyc matches /usr/lib64/python2.7/bisect.py

import bisect # precompiled from /usr/lib64/python2.7/bisect.pyc

dlopen("/usr/lib64/python2.7/lib-dynload/_bisect.so", 2);

import _bisect # dynamically loaded from /usr/lib64/python2.7/lib-dynload/_bisect.so

# /usr/lib64/python2.7/ssl.pyc matches /usr/lib64/python2.7/ssl.py

import ssl # precompiled from /usr/lib64/python2.7/ssl.pyc

# /usr/lib64/python2.7/urllib.pyc matches /usr/lib64/python2.7/urllib.py

import urllib # precompiled from /usr/lib64/python2.7/urllib.pyc

# /usr/lib64/python2.7/ssl.pyc matches /usr/lib64/python2.7/ssl.py

import ssl # precompiled from /usr/lib64/python2.7/ssl.pyc

Traceback (most recent call last):

  File "/tmp/test.py", line 1, in <module>

    from urllib2 import HTTPSHandler

ImportError: cannot import name HTTPSHandler

# clear __builtin__._

# clear sys.path

# clear sys.argv

# clear sys.ps1

# clear sys.ps2

# clear sys.exitfunc

# clear sys.exc_type

# clear sys.exc_value

# clear sys.exc_traceback

# clear sys.last_type

# clear sys.last_value

# clear sys.last_traceback

# clear sys.path_hooks

# clear sys.path_importer_cache

# clear sys.meta_path

# clear sys.flags

# clear sys.float_info

# restore sys.stdin

# restore sys.stdout

# restore sys.stderr

# cleanup __main__

# cleanup[1] _sha512

# cleanup[1] functools

# cleanup[1] _bisect

# cleanup[1] sysconfig

# cleanup[1] collections

# cleanup[1] zipimport

# cleanup[1] signal

# cleanup[1] cStringIO

# cleanup[1] encodings

# cleanup[1] urllib

# cleanup[1] math

# cleanup[1] _functools

# cleanup[1] ndg

# cleanup[1] itertools

# cleanup[1] __future__

# cleanup[1] _collections

# cleanup[1] operator

# cleanup[1] array

# cleanup[1] _heapq

# cleanup[1] sre_constants

# cleanup[1] _sha256

# cleanup[1] _warnings

# cleanup[1] _codecs

# cleanup[1] _sysconfigdata

# cleanup[1] _struct

# cleanup[1] keyword

# cleanup[1] posix

# cleanup[1] encodings.aliases

# cleanup[1] exceptions

# cleanup[1] site

# cleanup[1] contextlib

# cleanup[1] strop

# cleanup[1] _sha

# cleanup[1] urllib2

# cleanup[1] textwrap

# cleanup[1] _weakref

# cleanup[1] _md5

# cleanup[1] _weakrefset

# cleanup[1] heapq

# cleanup[1] random

# cleanup[1] base64

# cleanup[1] string

# cleanup[1] encodings.utf_8

# cleanup[1] httplib

# cleanup[1] bisect

# cleanup[1] codecs

# cleanup[1] socket

# cleanup[1] traceback

# cleanup[1] _socket

# cleanup[1] hashlib

# cleanup[1] mimetools

# cleanup[1] _random

# cleanup[1] urlparse

# cleanup[1] struct

# cleanup[1] tempfile

# cleanup[1] rfc822

# cleanup[1] re

# cleanup[1] fcntl

# cleanup[1] _locale

# cleanup[1] thread

# cleanup[1] binascii

# cleanup[1] sre_compile

# cleanup[1] io

# cleanup[1] _io

# cleanup[1] time

# cleanup[1] abc

# cleanup[1] _sre

# cleanup[1] sre_parse

# cleanup[2] UserDict

# cleanup[2] os

# cleanup[2] posixpath

# cleanup[2] errno

# cleanup[2] os.path

# cleanup[2] copy_reg

# cleanup[2] linecache

# cleanup[2] _abcoll

# cleanup[2] genericpath

# cleanup[2] stat

# cleanup[2] warnings

# cleanup[2] types

# cleanup sys

# cleanup __builtin__

# cleanup ints: 45 unfreed ints

# cleanup floats: 29 unfreed floats
```

----------

## khayyam

 *luna80 wrote:*   

> 
> 
> ```
> # /usr/lib64/python2.7/ssl.pyc matches /usr/lib64/python2.7/ssl.py
> 
> ...

 

luna80 ... so it fails on 'import ssl', you did rebuild python:2.7 as _ssl.so is a builtin. If you did then I'm not really sure what's causing this, but something is not right with python (as other posters also have issues with ssl python). There was a recent openssl update =dev-libs/openssl-1.0.2h-r2 but it came after your first post ... is your @system up-to-date, and --with-bdeps=y?

Also, from the above you are using dev-python/pip, have you installed anything via pip?

best ... khay

----------

## luna80

yes, my @system is up-to-date, also ---with-bdeps=y

I don't have pip installed because the emerge fails with the same error of firefox

----------

## ChrisJumper

Could you post eix dev-lang/python and eix dev-libs/openssl?

Because exept the error message your system looks normal and up to date. Maybe your hard drive is broken and your file is damage..

Oh and # python --version please.

----------

## khayyam

ChrisJumper ...

all of that information has been provided:

dev-lang/python-2.7.10-r1 & 3.4.3-r1 ... with python 3.4.3-final-0 as system python

dev-libs/openssl-1.0.2h-r2

best ... khay

----------

## ChrisJumper

Everything looks good. But the error is still there. So i suppose that the system needs a rebuild, got a change before or after the useflags oder profile were changed.

So i just want to have a confirmation about the build times and the actual used Useflags at the compilation process, that built the packages.

Just to be safe..

Not sure what trigger the issue anyway.

----------

## luna80

first of all I want thanks for the help...I don't understand why still have the error with python 

this a summary

make.conf

```
CFLAGS="-Os -march=native -pipe"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

FEATURES="parallel-fetch -collision-protect -protect-owned -xattr"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

USE="${USE} -bindist pcmcia usb X png truetype build alsa jpeg gif"

LINGUAS="it en_GB"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/g$

GRUB_PLATFORMS=efi-64

VIDEO_CARDS="i915 intel"

```

python versions and USE applied

```

Calculating dependencies... done!

[ebuild   R    ] dev-lang/python-2.7.10-r1:2.7::gentoo  USE="build gdbm ipv6 ncurses readline sqlite ssl threads (wide-unicode) xml (-berkdb) -doc -examples -hardened -tk -wininst" 0 KiB

[ebuild   R    ] dev-lang/python-3.4.3-r1:3.4::gentoo  USE="build gdbm ipv6 ncurses readline ssl threads xml -examples -hardened -sqlite -tk -wininst" 0 KiB

```

openssl version and USE applied

```
[ebuild   R    ] dev-libs/openssl-1.0.2h-r2::gentoo  USE="asm sslv3 tls-heartbeat zlib -bindist -gmp -kerberos -rfc3779 -sctp -sslv2 -static-libs {-test} -vanilla" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB
```

eix dev-lang/python

```
localhost ~ # eix dev-lang/python

[I] dev-lang/python

     Available versions:  

     (2.7)  2.7.10-r1 ~2.7.11-r2

     (3.3)  3.3.5-r3 ~3.3.5-r8(3.3/3.3m)

     (3.4)  3.4.3-r1 ~3.4.3-r7(3.4/3.4m) ~3.4.4(3.4/3.4m)

     (3.5)  ~3.5.0-r2 ~3.5.1-r2(3.5/3.5m) ~3.5.1-r3(3.5/3.5m)

       {-berkdb build doc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"}

     Installed versions:  2.7.10-r1(2.7)(16:17:40 01. 07. 16)(build gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -doc -examples -hardened -tk -wininst ELIBC="-uclibc") 3.4.3-r1(3.4)(16:19:45 01. 07. 16)(build gdbm ipv6 ncurses readline ssl threads xml -examples -hardened -sqlite -tk -wininst ELIBC="-uclibc")

     Homepage:            http://www.python.org/

     Description:         An interpreted, interactive, object-oriented programming language

[I] dev-lang/python-exec

     Available versions:  (2) 2.0.1-r1 2.0.2 ~2.1 ~2.4.3 **9999

       {PYTHON_TARGETS="jython2_7 pypy pypy3 python2_7 python3_3 python3_4 python3_5"}

     Installed versions:  2.0.2(2)(05:42:30 02. 06. 16)(PYTHON_TARGETS="jython2_7 pypy pypy3 python2_7 python3_3 python3_4 python3_5")

     Homepage:            https://github.com/mgorny/python-exec/

     Description:         Python script wrapper

Found 2 matches

```

eix dev-libs/openssl

```
[I] dev-libs/openssl

     Available versions:  

     (0.9.8) 0.9.8z_p8^d

     (0)    1.0.2g-r2^d 1.0.2h^d ~1.0.2h-r1^d 1.0.2h-r2^d

       {+asm bindist gmp kerberos rfc3779 sctp sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="sse2"}

     Installed versions:  1.0.2h-r2^d(16:15:54 01. 07. 16)(asm sslv3 tls-heartbeat zlib -bindist -gmp -kerberos -rfc3779 -sctp -sslv2 -static-libs -test -vanilla ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_X86="sse2")

     Homepage:            http://www.openssl.org/

     Description:         full-strength general purpose cryptography library (including SSL and TLS)

```

python version

```
localhost ~ # python --version

Python 3.4.3

```

----------

## ChrisJumper

That all looks fine. Have no clue. But i would try to re-emerge dev-python/setuptools

----------

## khayyam

luna80 ...

if this is anything like the other bugs against python due to dev-libs/openssl-1.0.2h-r2 then you should enable the sslv2 useflag, please try the following:

```
# USE="sslv2" emerge --oneshot --changed-use =dev-libs/openssl-1.0.2h-r2

# emerge www-client/firefox
```

HTH & best ... khay

----------

## luna80

khayyam, I already tried to do that but doesn't solve the problem, anyway I tried another time but nothing to do, the error is still here

----------

## khayyam

 *luna80 wrote:*   

> khayyam, I already tried to do that but doesn't solve the problem, anyway I tried another time but nothing to do, the error is still here

 

luna80 ... I should have suggested re-building python after rebuilding openssl so _ssl.so would get rebuilt. If you haven't reverted the useflag then perhaps try that.

best ... khay

----------

## luna80

khayyam, it doesn' works...but is strange, after compiling openssl I don't see the file so_ssl.o in the list of libraries

```
usr/lib64/engines/lib4758cca.so

   usr/bin/openssl

   usr/lib64/engines/libaep.so

   usr/lib64/engines/libatalla.so

   usr/lib64/engines/libcswift.so

   usr/lib64/engines/libgmp.so

   usr/lib64/engines/libchil.so

   usr/lib64/engines/libnuron.so

   usr/lib64/engines/libsureware.so

   usr/lib64/engines/libubsec.so

   usr/lib64/engines/libpadlock.so

   usr/lib64/engines/libcapi.so

   usr/lib64/engines/libgost.so

   usr/lib64/libcrypto.so.1.0.0

   usr/lib64/libssl.so.1.0.0

```

----------

## khayyam

 *luna80 wrote:*   

> khayyam, it doesn' works...but is strange, after compiling openssl I don't see the file so_ssl.o in the list of libraries

 

luna80 ... I mean the '_ssl.so' included with python, hence rebuilding python after the use change on openssl.

```
/usr/lib/python2.7/lib-dynload/_ssl.so
```

EDIT: and to make sure you are using the rebuilt python:2.7 provide 'USE_PYTHON="2.7" emerge www-client/firefox'

best ... khay

----------

## luna80

khayyan, the command

equery files python:2.7 | grep '_ssl.so':

return nothing

```
localhost ~ # equery files python:2.7 | grep '_ssl.so':

localhost ~ # 

```

----------

## khayyam

 *luna80 wrote:*   

> khayyan, the command equery files python:2.7 | grep '_ssl.so': return nothing

 

luna80 .... ahh, so python is built without the ssl useflag?

best ... khay

----------

## luna80

khayyam, python is compiled WITH ssl use flag

----------

## khayyam

 *luna80 wrote:*   

> khayyam, python is compiled WITH ssl use flag

 

luna80 ... just to be sure please post the output of the following:

```
# ls -l /usr/lib*/python*/lib-dynload/_ssl.so

# qlop -l =dev-lang/python-2.7.10-r1
```

best ... khay

----------

## luna80

khayyam

this the output

```
localhost ~ # ls -l /usr/lib*/python*/lib-dynload/_ssl.so 

ls: impossibile accedere a /usr/lib*/python*/lib-dynload/_ssl.so: File o directory non esistente

localhost ~ # qlop -l =dev-lang/python-2.7.10-r1

Sun Jun  5 17:39:43 2016 >>> dev-lang/python-2.7.10-r1

Sun Jun 12 07:43:51 2016 >>> dev-lang/python-2.7.10-r1

Sun Jun 12 12:57:20 2016 >>> dev-lang/python-2.7.10-r1

Mon Jun 13 08:28:32 2016 >>> dev-lang/python-2.7.10-r1

Wed Jun 15 15:52:40 2016 >>> dev-lang/python-2.7.10-r1

Wed Jun 29 12:22:44 2016 >>> dev-lang/python-2.7.10-r1

Thu Jun 30 10:45:45 2016 >>> dev-lang/python-2.7.10-r1

Thu Jun 30 12:05:53 2016 >>> dev-lang/python-2.7.10-r1

Thu Jun 30 16:35:12 2016 >>> dev-lang/python-2.7.10-r1

Thu Jun 30 18:09:40 2016 >>> dev-lang/python-2.7.10-r1

Fri Jul  1 16:10:34 2016 >>> dev-lang/python-2.7.10-r1

Fri Jul  1 16:17:47 2016 >>> dev-lang/python-2.7.10-r1

Sun Jul  3 08:56:17 2016 >>> dev-lang/python-2.7.10-r1

Sun Jul  3 09:02:19 2016 >>> dev-lang/python-2.7.10-r1

Sun Jul  3 11:16:45 2016 >>> dev-lang/python-2.7.10-r1

Sun Jul  3 11:58:59 2016 >>> dev-lang/python-2.7.10-r1

Sun Jul  3 13:07:49 2016 >>> dev-lang/python-2.7.10-r1

localhost ~ # 

```

the output of the first command is in italian and mean something like the file is missing

----------

## khayyam

 *luna80 wrote:*   

> 
> 
> ```
> localhost ~ # ls -l /usr/lib*/python*/lib-dynload/_ssl.so 
> 
> ...

 

luna80 ... ok, I see whats happening now, you have the 'build' useflag enabled, and this will set PYTHON_DISABLE_SSL="1". 

```
 - - build  : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
```

... that useflag shouldn't be set.

From your 'emerge --info' it doesn't seem to be set globally, so it must be set via package.use, disable it and re-merge python:2.7 and python:3.4. You can check which packages have this useflag set with the following ...

```
# eix '-Ice#' --installed-with-use build
```

Once disabled you should then be able to emerge firefox.

best ... khay

----------

## luna80

khayyam, many many thanks!!! you solved my problem!

you have been very kind and patient!

----------

