Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295401 - openssl-0.9.8l-r2 fails to build with /usr/bin/perl: bad interpreter: Permission denied
Summary: openssl-0.9.8l-r2 fails to build with /usr/bin/perl: bad interpreter: Permiss...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-02 08:12 UTC by Thomas Stein
Modified: 2010-04-17 07:29 UTC (History)
2 users (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 Thomas Stein 2009-12-02 08:12:33 UTC
Hello.

Just tried to update openssl on one of my machines. But:

 * Use configuration linux-x86_64
./Configure linux-x86_64 enable-camellia enable-ec enable-idea enable-mdc2 enable-rc5 enable-tlsext no-gmp no-krb5 enable-zlib --prefix=/usr --openssldir=/etc/ssl shared threads
/var/tmp/portage/dev-libs/openssl-0.9.8l-r2/temp/environment: ./Configure: /usr/bin/perl: bad interpreter: Permission denied
 * 
 * ERROR: dev-libs/openssl-0.9.8l-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2631:  Called die
 * The specific snippet of code:
 *       echoit ./${config} ${sslout} $(use sse2 || echo "no-sse2") enable-camellia $(use_ssl !bindist ec) $(use_ssl !bindist idea) enable-mdc2 $(use_ssl !bindist rc5) enable-tlsext $(use_ssl gmp) $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) $(use_ssl zlib) --prefix=/usr --openssldir=/etc/ssl shared threads || die "Configure failed";
 *  The die message:
 *   Configure failed

Reproducible: Always
Comment 1 Thomas Stein 2009-12-02 08:13:40 UTC
emerge --info

Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.18-028stab064.8 x86_64)
=================================================================
System uname: Linux-2.6.18-028stab064.8-x86_64-Intel-R-_Xeon-R-_CPU_5148_@_2.33GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 02 Dec 2009 07:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r2, 2.6.2-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.2-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -mtune=generic -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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv logrotate mmx modules mudflap multilib mysql mysqli ncurses nls nptl nptlonly openmp pam pcre pppd python readline reflection session spl sse sse2 ssl sysfs tcpd unicode xml xorg 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

dev / # 
Comment 2 Florian Philipp 2009-12-06 11:00:40 UTC
I don't know what's the exact cause of the problem, but for me the problem was resolved with the following procedure:

1. Try to emerge it, wait for it to fail

2. Edit the Configure script in the work directory (/var/tmp/portage/dev-libs/openssl-0.9.8l-r2/work/openssl-0.9.8l/Configure). Rewrite the first line ('#!/usr/bin/perl') without making any actual changes. Maybe there is an unprintable character before the shebang?

3. Call `ebuild /var/db/portage/dev-libs/openssl/openssl-0.9.8l-r2.ebuild compile` to restart the normal workflow.

4. `ebuild /var/db/portage/dev-libs/openssl/openssl-0.9.8l-r2.ebuild merge` should finish the job.
Comment 3 Thomas Stein 2009-12-07 09:16:06 UTC
Thanks for this helpfull tip Florian.
Comment 4 Torsten Veller (RETIRED) gentoo-dev 2009-12-10 11:32:57 UTC
(In reply to comment #2)
> I don't know what's the exact cause of the problem, but for me the problem was
> resolved with the following procedure:

It's not the same problem as in bug 264683 (noexec mount option)?
Comment 5 Florian Philipp 2009-12-10 11:34:36 UTC
(In reply to comment #4)
> It's not the same problem as in bug 264683 (noexec mount option)?
> 

Definitely not. /var/tmp is on root.
Comment 6 SpanKY gentoo-dev 2009-12-10 12:52:02 UTC
so post /etc/mtab as an attachment

the shebang is inserted via sed so i doubt there's any unprintable chars (unless your sed is broken).  you can always back up the file first and run md5sum/diff on the two files to see if there's any actual difference.
Comment 7 Thomas Stein 2009-12-10 13:02:54 UTC
On my side it's a virtuozzzo virtual machine. This problem only appears in one of our 600 virtual machines.

dev / # cat /etc/mtab
/dev/vzfs / vzfs rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid 0 0
Comment 8 Florian Philipp 2009-12-10 14:20:42 UTC
(In reply to comment #7)
> On my side it's a virtuozzzo virtual machine. This problem only appears in one
> of our 600 virtual machines.
> 

Hmm, my affected machine is a virtuozzo VM, too!

I made an interesting observation: Apparently, it is sufficient to `touch` Configure. Actual editing is unnecessary.

stat Configure before touch:

  File: „Configure“
  Size: 91169     	Blocks: 192        IO Block: 4096   reguläre Datei
Device: bfh/191d	Inode: 38245004    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2009-12-10 15:18:18.000000000 +0100
Modify: 2009-12-10 15:18:18.000000000 +0100
Change: 2009-12-10 15:18:18.000000000 +0100

stat Configure after touch:

  File: „Configure“
  Size: 91169     	Blocks: 192        IO Block: 4096   reguläre Datei
Device: bfh/191d	Inode: 38245004    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2009-12-10 15:19:29.000000000 +0100
Modify: 2009-12-10 15:19:29.000000000 +0100
Change: 2009-12-10 15:19:29.000000000 +0100
Comment 9 SpanKY gentoo-dev 2009-12-11 19:14:43 UTC
sounds like a kernel/vm problem then
Comment 10 Thomas Stein 2010-01-08 15:07:55 UTC
> sounds like a kernel/vm problem then

Right, after upgrading to 2.6.18-028stab066.10 the problem disappeared. Error occured in 2.6.18-028stab064.8.
Comment 11 Magnus Rosenbaum 2010-01-14 11:15:21 UTC
I have the same problem with some other ebuilds, e.g. app-admin/syslog-ng-3.0.4 and sys-libs/db-4.7.25_p4.

(In reply to comment #2)
> 2. Edit the Configure script in the work directory
> (/var/tmp/portage/dev-libs/openssl-0.9.8l-r2/work/openssl-0.9.8l/Configure).
> Rewrite the first line ('#!/usr/bin/perl') without making any actual changes.

As already mentioned somewhere, "touch" was sufficient. 

> Maybe there is an unprintable character before the shebang?

Definitely not. The file is not changed in any way. 

> 3. Call `ebuild /var/db/portage/dev-libs/openssl/openssl-0.9.8l-r2.ebuild
> compile` to restart the normal workflow.

Did not work for me, but using the ebuild file in the portage tree worked: 
ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.0.4.ebuild compile
Comment 12 Thomas Stein 2010-03-16 08:01:08 UTC
Parallels Developers have found the cause of this issue. Here there comment:

<quote>
The problem is clear now: setting ACL permissions on a VZFS file does not update VZFS inode's ordinary Unix permissions => old permissions are in cache and will be there until you re-read/update the inode in the private area, for example by "touch".

After that permissions syncs and further all works fine.

The problem appears because Gentoo compiled "sed" on a node with ACL libraries and headers => ACL support was detected by "sed" "configure" and added to "sed" itself.

We will fix the problem in one of future kernel updates, and for now you can disable ACL for the /vz partition as a workaround (on-the-fly):

# mount -o remount,noacl /vz
and put "noacl" option to /etc/fstab for future usage.
</quote>
Comment 13 Rene Henzinger 2010-04-17 07:29:17 UTC
Or even more simple:

flagedit sys-apps/sed -acl
emerge sed