Summary: | sci-electronics/iverilog-0.8.1 - emerging (as root) fails due to permissions error | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Ploujnikov <ploujj> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch for iverilog-0.8.1.ebuild
ebuild that uses multilib |
Description
Michael Ploujnikov
2005-03-03 06:08:25 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 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. 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. I just noticed this in dmesg right after failing to emeverge iverilog: emerge[19436]: segfault at 00000000000007e0 rip 00002aaaaaab2041 rsp 00007fffffffebe0 error 4 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 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. 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.
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
Please attach unified diffs in future. Thanks for the patches - please test the updated ebuild. |