Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250771 - sys-devel/gcc-config-1.4.0-r4 - File "/usr/lib64/python2.6/commands.py", line 55, in getstatusoutput pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') OSError: [Errno 38] Function not implemented
Summary: sys-devel/gcc-config-1.4.0-r4 - File "/usr/lib64/python2.6/commands.py", line...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 22:54 UTC by James Glanville
Modified: 2009-05-18 14:31 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Glanville 2008-12-12 22:54:40 UTC
gcc-config -l returns:
 * gcc-config: Could not get portage CHOST!
 * gcc-config: You should verify that CHOST is set in one of these places:
 * gcc-config:  - //etc/make.conf
 * gcc-config:  - active environment

I believe the bug is due to portage-2.1.6 using a different mechanism to communicate CHOST. The magic bit of gcc-config is:
env -i portageq envvar CHOST 2>/dev/null
which returns:
Traceback (most recent call last):
  File "/usr/bin/portageq", line 609, in <module>
    main()
  File "/usr/bin/portageq", line 578, in main
    import portage
  File "/usr/lib64/portage/pym/portage/__init__.py", line 99, in <module>
    from portage.data import ostype, lchown, userland, secpass, uid, wheelgid, \
  File "/usr/lib64/portage/pym/portage/data.py", line 99, in <module>
    mystatus, myoutput = getstatusoutput("id -G portage")
  File "/usr/lib64/python2.6/commands.py", line 55, in getstatusoutput
    pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
OSError: [Errno 38] Function not implemented

Adding the line:
export REAL_CHOST=$(try_real_hard_to_find_CHOST)
works, because gcc-config falls back to a cruder way of finding CHOST, namely searching make.conf with regex. Hope someone can slightly modify the script to work with more versions of portage.

emerge --info:
Portage 2.1.6 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.27-tuxonice-r1 x86_64)
=================================================================
System uname: Linux-2.6.27-tuxonice-r1-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-52-with-gentoo-2.0.0
Timestamp of tree: Wed, 10 Dec 2008 20:02:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.6-r5
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages nodoc noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.mdfnet.se/mirror/gentoo http://ftp.ing.umu.se/linux/gentoo/ http://ftp.ds.karen.hj.se/gentoo/ http://ftp.twaren.net/Linux/Gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/layman/sunrise /usr/local/layman/java-overlay /usr/local/layman/pythonhead /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext acl acpi alsa amd64 avahi bash-completion bzip2 crypt cups dbus dell dri exif flac fortran gcj gif gpm hal jpeg jpg laptop mmx mmxext mp3 multilib ncurses nls ogg opengl pam pcre png python readline spell sse sse2 ssl svg truetype unicode vorbis xcb xscreensaver zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-14 20:30:14 UTC
Looks like a dev-lang/python-2.6 incompatibility rather than something that should be fixed in sys-devel/gcc-config.
Comment 2 Steev Klimaszewski (RETIRED) gentoo-dev 2008-12-22 20:25:51 UTC
Confirm that its python 2.6+ that is at fault, eselect python set 1 (2.5.2-r8) causes everything to work fine again.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-18 14:31:52 UTC
Can you still reproduce this problem with Python 2.6.2?