Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83944 - sci-electronics/iverilog-0.8.1 - emerging (as root) fails due to permissions error
Summary: sci-electronics/iverilog-0.8.1 - emerging (as root) fails due to permissions ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-03-03 06:08 UTC by Michael Ploujnikov
Modified: 2005-10-17 11:32 UTC (History)
0 users

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


Attachments
patch for iverilog-0.8.1.ebuild (iverilog-0.8.1.patch,476 bytes, patch)
2005-09-15 07:49 UTC, Filip Brcic
Details | Diff
ebuild that uses multilib (iverilog-0.8.1-r1.ebuild,906 bytes, text/plain)
2005-10-12 01:02 UTC, Max Loparev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Ploujnikov 2005-03-03 06:08:25 UTC
First I did this:
# ACCEPT_KEYWORDS="~amd64" emerge -a iverilog

and got:
.....

mkdir /var/tmp/portage/iverilog-0.8.1/image/usr
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/bin
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/include
mkdir /usr/lib64/ivl
ACCESS DENIED  mkdir:     /usr/lib64/ivl
mkdir: cannot create directory `/usr/lib64/ivl': Permission denied
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man/man1
make: *** [installdirs] Error 1

!!! ERROR: sci-electronics/iverilog-0.8.1 failed.
!!! Function src_install, Line 28, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-sci-electronics_-_iverilog-0.8.1-16387.log"

mkdir:     /usr/lib64/ivl
--------------------------------------------------------------------------------

Then I tried to 'mkdir /usr/lib64/ivl' as the same root user, and it suceeded.

Then I tried to emerge it again:
# ACCEPT_KEYWORDS="~amd64" emerge -a iverilog

and got:

....
make[1]: Nothing to be done for `all'.         
make[1]: Leaving directory `/var/tmp/portage/iverilog-0.8.1/work/veril
og-0.8.1/driver'                               
./mkinstalldirs /var/tmp/portage/iverilog-0.8.1/image//usr/bin /var/tm
p/portage/iverilog-0.8.1/image//usr/include /usr/lib64/ivl \
    /var/tmp/portage/iverilog-0.8.1/image//usr/share/man /var/tmp/port
age/iverilog-0.8.1/image//usr/share/man/man1   
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/bin
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/include
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man/man1
/bin/install -c ./ivl /usr/lib64/ivl/ivl       
ACCESS DENIED  open_wr:   /usr/lib64/ivl/ivl   
/bin/install: cannot create regular file `/usr/lib64/ivl/ivl': Permission denied                                     
make: *** [/usr/lib64/ivl/ivl] Error 1         
                                               
!!! ERROR: sci-electronics/iverilog-0.8.1 failed.
!!! Function src_install, Line 28, Exitcode 2  
!!! (no error message)                         
!!! If you need support, post the topmost build error, NOT this status message.                                      
                                               
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------                                     
LOG FILE = "/tmp/sandbox-sci-electronics_-_iverilog-0.8.1-27313.log"
                                               
open_wr:   /usr/lib64/ivl/ivl                  
--------------------------------------------------------------------------------

Also:
# cat /tmp/sandbox-sci-electronics_-_iverilog-0.8.1-27313.log
open_wr:   /usr/lib64/ivl/ivl
#

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
see Details ^

Expected Results:  
iverilog to emerge successfully

# emerge --info:
Portage 2.0.51-r15 (default-linux/amd64/2005.0, gcc-3.4.2, glibc-2.3.4
.20041102-r0, 2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3500
+            
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar  2 2005,
 18:47:09)]  
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 36
32) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -pipe -fomit-frame-pointer -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -fomit-frame-pointer -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox
GENTOO_MIRRORS="ftp://gentoo.risq.qc.ca/ ftp://gentoo.agsn.ca/
ftp://gentoo.mirrored.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa berkdb bitmap-fonts crypt cups curl esd f77 fam foomatic
fortran gd gdbm gif gpm gtk imagemagick imlib ipv6 ithreads java jp2 jpeg lzw
lzw-tiff motif ncurses nls nptl nptlonly oggvorbis opengl oss pam perl png ppds
pthreads python qt readline sdl ssl tcltk tcpd tiff truetype truetype-fonts
type1-fonts usb userlocales xml xml2 xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Maciej Szumieluk 2005-03-03 11:33:21 UTC
Compiles and works fine for me.

Portage 2.0.51.18 (default-linux/amd64, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.11-ck1 x86_64)
=================================================================
System uname: 2.6.11-ck1 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 19 2005, 20:18:35)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r4
sys-devel/libtool:   1.5.10-r5
virtual/os-headers:  2.6.8.1-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -pipe -s -O2 -fomit-frame-pointer -falign-functions=64 -falign-jumps=8 -falign-loops=8 -msse -msse2-m3dnow -mmmx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -s -O2 -fomit-frame-pointer -falign-functions=64 -falign-jumps=8 -falign-loops=8 -msse -msse2 -m3dnow -mmmx"
DISTDIR="/home/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="pl_PL"
LC_ALL="pl_PL"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/portage"
PORTDIR_OVERLAY="/usr/myportage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi alsa berkdb bitmap-fonts cdr cups curl dedicated divx4linux dvd dvdread esd fam flac foomaticdb gifgpm gtk imagemagick kde libwww motif mysql ncurses nls nptl nvidia oggvorbis opengl pam perl png python qt readline sdl ssltcltk tiff truetype truetype-fonts type1-fonts xml xml2 xmms xvid zlib linguas_pl"
Unset:  ASFLAGS, CBUILD, CTARGET
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2005-03-10 12:32:12 UTC
Michael, there have been some lib64/sandbox related fixes to portage AFAIR, please try updating to the latest currently stable portage version for your arch. Since Maciej doesn't have the problem and is using a newer portage version than you, perhaps that's the culprit.
Comment 3 Michael Ploujnikov 2005-03-14 08:12:19 UTC
I have a clean install of gentoo 64bit, and iverilog fails to emerge again.
I have an even newer version of portage:

# emerge --info
Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.11-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 14 2005, 09:31:41)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -pipe -fomit-frame-pointer -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -pipe -fomit-frame-pointer -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="ftp://gentoo.risq.qc.ca/ http://cudlug.cudenver.edu/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa berkdb bitmap-fonts crypt font-server fortran gif gpm gtk gtk2 ipv6 java jp2 jpeg lzw lzw-tiff mp3 ncurses nls nptl nptlonly opengl oss pam perl png python qt readline sdl ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


It looks like Maciej is using the 2005.0 (correct me if I'm wrong), and I cannot upgrade to that profile due to another bug.
Comment 4 Michael Ploujnikov 2005-03-15 20:49:38 UTC
I just noticed this in dmesg right after failing to emeverge iverilog:

emerge[19436]: segfault at 00000000000007e0 rip 00002aaaaaab2041 rsp 00007fffffffebe0 error 4
Comment 5 Stephen Guerrera 2005-04-05 10:24:50 UTC
I'm having the same error

Failed with:

mkdir /usr/lib/ivl
ACCESS DENIED  mkdir:     /usr/lib/ivl
mkdir: cannot create directory `/usr/lib64/ivl': Permission denied
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man
mkdir /var/tmp/portage/iverilog-0.8.1/image/usr/share/man/man1
make: *** [installdirs] Error 1

!!! ERROR: sci-electronics/iverilog-0.8.1 failed.
!!! Function src_install, Line 28, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-sci-electronics_-_iverilog-0.8.1-16387.log"

mkdir:     /usr/lib/ivl
--------------------------------------------------------------------------------

The first time, created /usr/lib/ivl/ and chmodded it to 777 then attempted to emerge again.  

ACCESS DENIED  open_wr:   /usr/lib/ivl/ivl
/bin/install: cannot create regular file `/usr/lib/ivl/ivl': Permission denied
make: *** [/usr/lib/ivl/ivl] Error 1

!!! ERROR: sci-electronics/iverilog-0.8.1 failed.
!!! Function src_install, Line 28, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-sci-electronics_-_iverilog-0.8.1-19432.log"

open_wr:   /usr/lib/ivl/ivl
-------------------------------------------------------------------------------

Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.10-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.10-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 28 2004, 08:02:56)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.90.0.1.1-r3
sys-devel/libtool:   1.5.2-r5
virtual/os-headers:  2.6.6-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa amd64 apache2 berkdb bitmap-fonts cdr crypt cups dba dbus dvd dvdr eds esd f77 fam flac font-server fortran gd gdbm gif gnome gpm gstreamer gtk guile icu imlib ipv6 java jp2 jpeg junit lzw lzw-tiff mozilla mp3 mysql ncurses nls nptl offensive oggvorbis opengl oss pam perl png postgres postgresql python qt readline samba sdl sqlite ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales wxwindows xml xml2 xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 6 Christian Schmidt 2005-04-12 10:00:40 UTC
Adding

                libdir=${D}/usr/lib \
                libdir64=${D}/usr/lib \
                vpidir=${D}/usr/lib/ivl \

to the src_install() function in the ebuild solved the sandbox violations for me. All paths are not inherited from ${prefix} or in the case of vpidir from ${libdir} somewhere in the various makefiles, which should be fixed upstream.
Comment 7 Filip Brcic 2005-09-15 07:49:37 UTC
Created attachment 68512 [details, diff]
patch for iverilog-0.8.1.ebuild

The Makefile tries to create a new directory /usr/lib/ivl. The problem is in
it's configure.in script with copies $libdir to $libdir64, but, apparently,
doesn't copy the ${prefix} part. So, when in src_install the prefix is
overrided to something like /var/tmp/portage/iverilog-0.8.1/dist, the libdir64
still stays "/usr/lib" and that is what makes the problem.

One solution to this problem is to patch the iverilog's configure.in file which
is complicated and possibly it will not be applyable to subsequent versions of
iverilog.

The other solution is to patch the ebuild file. That is what I have done, and
here is what should be done:

If libdir64 and libdir are overrided with ${D}/usr/lib and vpidir and vpidir32
to ${D}/usr/lib/ivl in src_install(), then the build passes with no access
restriction errors.

The same problem exists in iverilog-0.8 as well. I can make that ebuild too,
but essentially it should mostly be the same as this one.
Comment 8 Max Loparev 2005-10-12 01:02:57 UTC
Created attachment 70443 [details]
ebuild that uses multilib

I think that right place for libs in 64bit environment in lib64 and it is
autodetected with configure, so we must just pass it to install section and not
change to /usr/lib
Comment 9 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-10-17 11:32:16 UTC
Please attach unified diffs in future. Thanks for the patches - please test 
the updated ebuild.