Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 251689

Summary: dev-lang/python-2.6.4: failed to emerge with permission denied
Product: Gentoo/Alt Reporter: john <johnthomascraig>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED OBSOLETE    
Severity: normal CC: gmturner007
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Interix   
URL: http://www.debian-interix.net/bugs/kernel/#exec
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: kludge to work around interix bug
patch to python-2.6.4.ebuild to use with the previous attachment.

Description john 2008-12-20 00:52:53 UTC
When I try to emerge python, the build fails with the message, "/bin/sh: ./python: Permission denied".

Reproducible: Always

Steps to Reproduce:
1. emerge python

Actual Results:  
i586-pc-interix6.0-gcc -L. -Xlinker -export-dynamic -o python \
                        Modules/python.o \
                        -L. -lpython2.5 -lsocket -ldl    -lm
/opt/gcc.3.3/bin/ld: BFD 2.13.90 20021111 assertion fail /dev/fs/E/gnu2.intel/eg
cs.source/bfd/cofflink.c:5211
.rel.internal 310 300:
/opt/gcc.3.3/bin/ld: BFD 2.13.90 20021111 assertion fail /dev/fs/E/gnu2.intel/eg
cs.source/bfd/cofflink.c:3174
case $MAKEFLAGS in \
        *-s*) LD_LIBRARY_PATH=/opt/gentoo/var/tmp/portage/dev-lang/python-2.5.2-
r8/work/Python-2.5.2: CC='i586-pc-interix6.0-gcc' LDSHARED='i586-pc-interix6.0-g
cc -shared' OPT='-DNDEBUG -D_ALL_SOURCE -fwrapv' ./python -E ./setup.py -q build
;; \
        *) LD_LIBRARY_PATH=/opt/gentoo/var/tmp/portage/dev-lang/python-2.5.2-r8/
work/Python-2.5.2: CC='i586-pc-interix6.0-gcc' LDSHARED='i586-pc-interix6.0-gcc
-shared' OPT='-DNDEBUG -D_ALL_SOURCE -fwrapv' ./python -E ./setup.py build;; \
        esac
/bin/sh: ./python: Permission denied
make: *** [sharedmods] Error 1
 * ERROR: dev-lang/python-2.5.2-r8 failed:
 *   Parallel make failed

Expected Results:  
success!

$ emerge --info
Portage 2.2.00.12182-prefix (default-prefix/windows/interix/6.0/x86, gcc-4.2.4,
unavailable, 6.0 x86)
=================================================================
System uname: Interix-6.0-x86-32bit
Timestamp of tree: Sat, 20 Dec 2008 00:25:14 +0000
app-shells/bash:     3.2_p48
dev-lang/python:     2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2-r0
0.1
sys-devel/binutils:  2.18-r4
sys-devel/gcc-config: 1.4.0-r04.6
sys-devel/libtool:   1.5.26
ACCEPT_KEYWORDS="~x86-interix"
CBUILD="i586-pc-interix6.0"
CFLAGS=""
CHOST="i586-pc-interix6.0"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf
/etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/opt/gentoo/usr/portage/distfiles"
EPREFIX="/opt/gentoo"
FEATURES="collision-protect distlocks fixpackages nostrip parallel-fetch preserv
e-libs protect-owned sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.inode.at"
LDFLAGS=""
PKGDIR="/opt/gentoo/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu
de=/local --exclude=/packages"
PORTAGE_TMPDIR="/opt/gentoo/var/tmp"
PORTDIR="/opt/gentoo/usr/portage"
SYNC="svn://overlays.gentoo.org/proj/alt/trunk/prefix-overlay"
USE="7zip X bash-completion bzip2 cairo cracklib cscope curl esd exif fontconfig
 gtk jpeg mad midi mng mp3 ncurses netpbm pdf png prefix python readline ssl svg
 threads truetype vorbis x86-interix xpm zlib" ALSA_PCM_PLUGINS="adpcm alaw asym
 copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat li
near meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2
_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_defaul
t authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner auth
z_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ex
t_filter file_cache filter headers include info log_config logio mem_cache mime
mime_magic negotiation rewrite setenvif speling status unique_id userdir usertra
ck vhost_alias" ELIBC="Interix" INPUT_DEVICES="keyboard mouse" KERNEL="Interix"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses te
xt" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_A
LL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_E
XTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Fabian Groffen gentoo-dev 2009-01-18 09:53:00 UTC
hmmm, weird.  Has ./python the executable bit set?
Comment 2 john 2009-01-18 19:04:43 UTC
(In reply to comment #1)
> hmmm, weird.  Has ./python the executable bit set?
> 

Yes
Comment 3 Markus Duft (RETIRED) gentoo-dev 2009-01-21 09:02:32 UTC
hmm... i vaguely recall, that there is a directory called "Python", and thus, during build, python renames it's executable to python.exe on case-insensitive filesystems, which it should do on interix. i don't know if this persists with python 2.5, but it was so with 2.4 IIRC.

also, maybe you could try without parallel make (-j1)?
Comment 4 Greg Turner 2009-12-20 04:18:50 UTC
Well you were right, the directory "Python" conflicts with the executable "python" on certain interixen due to a bug (see http://www.debian-interix.net/bugs/kernel/#exec).  The (soon to be) enclosed patch works around this but is pretty absurd and breaks the ability to "prepare" the ebuild more than once.

-gmt
Comment 5 Greg Turner 2009-12-20 04:20:59 UTC
Created attachment 213531 [details, diff]
kludge to work around interix bug
Comment 6 Greg Turner 2009-12-20 04:43:09 UTC
Created attachment 213532 [details, diff]
patch to python-2.6.4.ebuild to use with the previous attachment.
Comment 7 Fabian Groffen gentoo-dev 2009-12-20 09:59:48 UTC
crapz0rz!
Comment 8 Markus Duft (RETIRED) gentoo-dev 2009-12-22 15:52:42 UTC
woah. one sec. this is a no-issue! the true cause was the case insensitive file system, not a case insensitive exec. python knows this issue from other platforms already, so i needed to only convince it to use the same stuff when building for interix. so thanks for the effort - but this has been fixed.

if the issue re-appeared, it must be something else. grobian? a while ago, wasn't there a discussion on file system case sensitivity checks? i'll be unavailable for 3 weeks, so this has to wait...
Comment 9 Greg Turner 2009-12-26 02:04:58 UTC
(In reply to comment #8)
> woah. one sec. this is a no-issue! the true cause was the case insensitive file
> system, not a case insensitive exec. python knows this issue from other
> platforms already, so i needed to only convince it to use the same stuff when
> building for interix. so thanks for the effort - but this has been fixed.
> if the issue re-appeared, it must be something else. grobian? a while ago,
> wasn't there a discussion on file system case sensitivity checks? i'll be
> unavailable for 3 weeks, so this has to wait...

It sounds as though you are assuming that nobody using Interix has a case-sensitive filesystem -- but as I am pretty sure you know, this is not the case.  I have case sensitivity turned on in my Interix (Windows really); I kinda assumed everybody else using Interix did this too?

I don't know if it's exec or what the root cause is.

All I know is that if I do, i.e.,

# mkdir /opt/gentoo/bin/LS

and then try to run "ls" I will get this permission denied error.  I only blamed it on exec because the debian page did so, and I assumed they knew what they were talking about.
Comment 10 Markus Duft (RETIRED) gentoo-dev 2010-01-11 08:37:23 UTC
hmm... ok. i'm never using the case sensitive file system, since that changes behaviour of many things... at least at our company i'm not allowed to make it sensitive ;)

so i guess your best chance is switching back to case insensitive... sorry.
Comment 11 Fabian Groffen gentoo-dev 2010-01-25 17:01:23 UTC
hmmm, fix?
Comment 12 Fabian Groffen gentoo-dev 2010-03-26 16:25:00 UTC
did someone make the efforts to report this to upstream?
Comment 13 Fabian Groffen gentoo-dev 2011-04-24 17:25:33 UTC
python 2.6 is gone from the tree
Comment 14 Sin Li 2011-05-04 06:45:07 UTC
This bug has reappeared in Python-2.7.1. The cause seems to be that the workaround patch targets configure.in but the directory name that needs to be changed is now in Makefile.pre.in.
Comment 15 Sin Li 2011-05-04 06:52:18 UTC
(In reply to comment #14)
> This bug has reappeared in Python-2.7.1. The cause seems to be that the
> workaround patch targets configure.in but the directory name that needs to be
> changed is now in Makefile.pre.in.

Oops, read the patch wrong. The problem is this patch isn't being applied anymore, but the directory name conflict still exists.
Comment 16 Fabian Groffen gentoo-dev 2011-05-04 08:00:38 UTC
I'm a bit lost here.

Python's configure tries to determine whether or not your filesystem is case-sensitive.  Does this check report for you ("for case-insensitive build directory") as result "yes"?

That should sort of guarantee you get a python.exe thing in your builddir, which would make this bug impossible.  Can you check your configure output and if you have a python.exe executable in your builddir?  If not, can you dig a bit into as to why configure misdetects, or why the buildsystem ignores BUILDEXEEXT for you?