Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69830 - emerging dev-haskell/haddock-0.6-r3 fails on amd64 - sandbox violation
Summary: emerging dev-haskell/haddock-0.6-r3 fails on amd64 - sandbox violation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Andres Loeh (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 58588
Blocks:
  Show dependency tree
 
Reported: 2004-11-02 05:51 UTC by Gour
Modified: 2004-11-18 14:01 UTC (History)
1 user (show)

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


Attachments
haddock-0.6-r3.ebuild.patch (haddock-0.6-r3.ebuild.patch,487 bytes, patch)
2004-11-09 16:45 UTC, Andres Loeh (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gour 2004-11-02 05:51:51 UTC
Emerging haddock-0.6-r3 fails on amd64:

[...]
==fptools== make install -wr;
 in /var/tmp/portage/haddock-0.6-r3/work/haddock-0.6/haddock/src
------------------------------------------------------------------------
mkdir /var/tmp/portage/haddock-0.6-r3/image/usr
mkdir /var/tmp/portage/haddock-0.6-r3/image/usr/bin
Creating a symbolic link from haddock-0.6 to haddock in /var/tmp/portage/haddock-0.6-r3/image//usr/bin
for i in haddock-0.6; do \
        /bin/install -c -m 755     $i /var/tmp/portage/haddock-0.6-r3/image//usr/bin; \
done
mkdir //usr/lib/haddock-0.6
ACCESS DENIED  mkdir:     /usr/lib/haddock-0.6
mkdir: cannot create directory `//usr/lib/haddock-0.6': Permission denied
make[2]: *** [install] Error 1
make[1]: *** [install] Error 1
make[1]: Leaving directory 
`/var/tmp/portage/haddock-0.6-r3/work/haddock-0.6/haddock'
make: *** [install] Error 1

!!! ERROR: dev-haskell/haddock-0.6-r3 failed.
!!! Function src_install, Line 68, Exitcode 2
!!! make install failed

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

Actual Results:  
ebuild fails 

Expected Results:  
emerge haddock 

Portage 2.0.51-r2 (default-linux/amd64/2004.3, gcc-3.4.2, 
glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 x86_64) 
================================================================= 
System uname: 2.6.9-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3000+ 
Gentoo Base System version 1.4.16 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.59-r5 
Automake: sys-devel/automake-1.8.5-r1 
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 
Headers:  sys-kernel/linux26-headers-2.6.6-r1 
Libtools: sys-devel/libtool-1.5.2-r5 
ACCEPT_KEYWORDS="amd64 ~amd64" 
AUTOCLEAN="yes" 
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -funroll-loops" 
CHOST="x86_64-pc-linux-gnu" 
COMPILER="" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -funroll-loops" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs buildpkg ccache distcc distlocks sandbox" 
GENTOO_MIRRORS="http://gentoo.osuosl.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/portage/local" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="amd64 X aalib acpi alsa arts audiofile avi berkdb bitmap-fonts cddb 
cdparanoia cdr crypt cups directfb doc dvd dvdr encode f77 fam fbcon flac gdbm 
gif gphoto2 gpm gtk gtk2 imagemagick imlib innodb ipv6 java jp2 jpeg jpeg2k kde 
lcms libwww lzw lzw-tiff mad mmap mozilla mpeg multilib ncurses nls nptl 
oggvorbis opengl oss pam pda perl png python qt readline ruby scanner slang 
speex sqlite ssl tcltk tcpd tetex tiff truetype unicode usb userlocales 
vim-with-x xface xine xinerama xml xml2 xmms xpm xprint xrandr xv zlib"
Comment 1 Andres Loeh (RETIRED) gentoo-dev 2004-11-03 13:04:59 UTC
This is definitely the same problem that occurs with dev-lang/ghc.
Alas, I still have no idea how it is caused, and I cannot reproduce it.

ks
Comment 2 Gour 2004-11-05 00:30:23 UTC
Hi!

Some more data..

Replacing 'make install \ ...' with
          'einstall \ ...'

did merge haddock, but then the problem is that it installs:

gaura-nitai bin # cat /usr/bin/haddock-0.6
#!/bin/sh
HADDOCKLIB="/usr/share/haddock-0.6";
HADDOCKBIN="//usr/lib/haddock-0.6/haddock.bin";
# Mini-driver for Haddock

# needs the following variables:
#       HADDOCKLIB
#       HADDOCKBIN

$HADDOCKBIN --lib $HADDOCKLIB ${1+"$@"}

So, something is wrong in handling these directory names.

Any clue?

Sincerely,
Gour
Comment 3 Duncan Coutts (RETIRED) gentoo-dev 2004-11-05 02:44:07 UTC
I don't see what's wrong with your cat /usr/bin/haddock-0.6. It looks the same as mine. Is it the extra / in HADDOCKBIN that you're worried about? Or should it be using lib64 or something different for amd64?
Comment 4 Gour 2004-11-05 04:05:08 UTC
> I don't see what's wrong with your cat /usr/bin/haddock-0.6. It looks the same as mine. Is it the extra / in HADDOCKBIN that you're worried about?

Yes. It does not look normal.

Besides, that I checked and there is no /usr/lib/haddock directory either which
means that 'einstall' is not a fix at all and I'm  still left with the broken Haskell tools :-(

Sincerely,
Gour
Comment 5 Andres Loeh (RETIRED) gentoo-dev 2004-11-05 04:36:40 UTC
Strange, but perhaps that gets us closer.

If it doesn't install to /usr/lib/haddock-0.6, where
does it install to instead? Please check qpkg -l or the
build log for the directory haddock.bin is placed in by
your modified build ...

ks
Comment 6 Gour 2004-11-05 05:45:17 UTC
Hi!

With 'einstall' the files are put in:

gaura-nitai gour # qpkg -l haddock
dev-haskell/haddock-0.6-r3 *
CONTENTS:
/usr
/usr/bin
/usr/bin/haddock -> haddock-0.6 1099660365
/usr/bin/haddock-0.6
/usr/lib
/usr/lib/haddock.bin
/usr/share
/usr/share/doc
/usr/share/doc/haddock-0.6-r3
/usr/share/doc/haddock-0.6-r3/ps


i.e. /usr/lib/haddock.bin

Does it help?

Sincerely,
Gour
Comment 7 Andres Loeh (RETIRED) gentoo-dev 2004-11-05 06:25:09 UTC
This looks extremely strange for a number of reasons.
For instance, no docs at all are installed although USE="doc" is set.

Furthermore, there is no "haddock-0.6" component in the path where
haddock.bin ends up, and this seems to be nearly impossible if I
understand the package's Makefile correctly.

Do you have something set in EXTRA_EINSTALL?

I need to be able to reproduce the problem -- will try to get an access
to an amd64 machine.
Comment 8 Gour 2004-11-05 07:03:57 UTC
Hi! 

> This looks extremely strange for a number of reasons.
> For instance, no docs at all are installed although USE="doc" is set.

Docs are installed, they are only ommitted from the list. Here is the complete list:

gaura-nitai bin # qpkg -l haddock
dev-haskell/haddock-0.6-r3 *
CONTENTS:
/usr
/usr/bin
/usr/bin/haddock -> haddock-0.6 1099660365
/usr/bin/haddock-0.6
/usr/lib
/usr/lib/haddock.bin
/usr/share
/usr/share/doc
/usr/share/doc/haddock-0.6-r3
/usr/share/doc/haddock-0.6-r3/ps
/usr/share/doc/haddock-0.6-r3/ps/haddock.ps.gz
/usr/share/doc/haddock-0.6-r3/html
/usr/share/doc/haddock-0.6-r3/html/license.html
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/warning.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/toc-blank.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/note.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/toc-plus.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/important.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/tip.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/home.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/toc-minus.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/prev.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/up.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/next.gif
/usr/share/doc/haddock-0.6-r3/html/stylesheet-images/caution.gif
/usr/share/doc/haddock-0.6-r3/html/module-attributes.html
/usr/share/doc/haddock-0.6-r3/html/introduction.html
/usr/share/doc/haddock-0.6-r3/html/x444.html
/usr/share/doc/haddock-0.6-r3/html/markup.html
/usr/share/doc/haddock-0.6-r3/html/haddock.html
/usr/share/doc/haddock-0.6-r3/html/docbook.css
/usr/share/doc/haddock-0.6-r3/html/x516.html
/usr/share/doc/haddock-0.6-r3/html/x57.html
/usr/share/doc/haddock-0.6-r3/html/x468.html
/usr/share/doc/haddock-0.6-r3/html/x599.html
/usr/share/doc/haddock-0.6-r3/html/invoking.html
/usr/share/doc/haddock-0.6-r3/html/x531.html
/usr/share/doc/haddock-0.6-r3/html/x473.html
/usr/share/doc/haddock-0.6-r3/README.gz
/usr/share/doc/haddock-0.6-r3/TODO.gz
/usr/share/doc/haddock-0.6-r3/LICENSE.gz
/usr/share/doc/haddock-0.6-r3/CHANGES.gz
/usr/share/haddock-0.6
/usr/share/haddock-0.6/haskell_icon.gif
/usr/share/haddock-0.6/haddock.css
/usr/share/doc/haddock-0.6-r3/html/index.html -> haddock.html 1099660365



> Furthermore, there is no "haddock-0.6" component in the path where
> haddock.bin ends up, and this seems to be nearly impossible if I
> understand the package's Makefile correctly.

This I cannot comment - do not understand enough :-(

> Do you have something set in EXTRA_EINSTALL?

No.

>I need to be able to reproduce the problem -- will try to get an access
> to an amd64 machine.

That would be nice :-)

Sincerely,
Gour
Comment 9 Andres Loeh (RETIRED) gentoo-dev 2004-11-09 16:42:59 UTC
Ok, access to an amd64 computer helped. I have it.

The reason is that on amd64, but not on x86, the commands econf
and einstall pass "libdir".

When "libdir" is passed to configure, then it also has to be
passed to make. If not, a sandbox violation occurs.

That's why einstall in place of make install cures the sandbox
problem, as you detected. However, einstall passes an *incorrect*
value for "libdir" to make. I'll attach a patch against 
haddock-0.6-r3.ebuild that should fix the problem. Please test.

I'm confident that the ghc problem can be cured the same way,
as ghc and haddock use the same build system ...

ks
Comment 10 Andres Loeh (RETIRED) gentoo-dev 2004-11-09 16:45:18 UTC
Created attachment 43625 [details, diff]
haddock-0.6-r3.ebuild.patch
Comment 11 Gour 2004-11-09 23:47:04 UTC
Hello kosmikus!

Thank you for the patch. It works!

Sincerely,
Gour
Comment 12 Andres Loeh (RETIRED) gentoo-dev 2004-11-18 14:01:16 UTC
Ok. Closing the bug (I'm aware there's still work left to do for ghc itself).

ks