First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 143141
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Haskell Language team <haskell@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Anakim Border <akborder@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
hugs98-2006.5.ebuild ebuild text/plain Anakim Border 2006-08-07 14:13 0000 2.96 KB Details
hugs98-2006.5-find.patch find patch patch Anakim Border 2006-08-07 14:13 0000 577 bytes Details | Diff
compile.log full compilation log, showing runhugs internal error text/plain Anakim Border 2006-08-08 14:15 0000 34.86 KB Details
hugs98-2006.9.ebuild the new ebuild. Works for me. text/plain Gasper Azman 2007-10-27 17:40 0000 3.06 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 143141 depends on: Show dependency tree
Bug 143141 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-07 14:12 0000
I've upgraded the existing ebuild to work with hugs98-plus-May2006 (2006.5).

Please note that hugs is really strict about CFLAGs; the compilation breaks
even when using something as innocent as -march. I've added an ewarn-ing about
that.

------- Comment #1 From Anakim Border 2006-08-07 14:13:33 0000 -------
Created an attachment (id=93693) [edit]
ebuild

------- Comment #2 From Anakim Border 2006-08-07 14:13:52 0000 -------
Created an attachment (id=93694) [edit]
find patch

------- Comment #3 From Duncan Coutts (RETIRED) 2006-08-08 05:10:22 0000 -------
(In reply to comment #0)
> I've upgraded the existing ebuild to work with hugs98-plus-May2006 (2006.5).

Thanks Anakim.

> Please note that hugs is really strict about CFLAGs; the compilation breaks
> even when using something as innocent as -march. I've added an ewarn-ing about
> that.

Hmm, that's not so good as many arches really do need to use that (or -mcpu).
Sparc is an exmple of this.

Perhaps you/we can investigate what's going on with flags like -march. I'm
afraid I've not had time to look yet, how does it break with -march?

------- Comment #4 From Anakim Border 2006-08-08 14:14:55 0000 -------
> Perhaps you/we can investigate what's going on with flags like -march. I'm
> afraid I've not had time to look yet, how does it break with -march?

I'm attaching the full compilation log.

It seems like -march is interfering with the build of "runhugs". As soon as the
resulting executable is run, it stops with an "INTERNAL ERROR: discrArity".

There's no trace of such a problem in the Hugs bug tracker
(http://hackage.haskell.org/trac/hugs)

Searching the sources, I found the definition of the discrArity function
(src/compiler.c, line 1544):

Int discrArity(d)                      /* Find arity of discriminator      */
Cell d; {
    switch (whatIs(d)) {
        case NAME      : return name(d).arity;
        case TUPLE     : return tupleOf(d);
        case CHARCELL  : return 0;
#if TREX
        case AP        : switch (whatIs(fun(d))) {
#if NPLUSK
                             case ADDPAT : return 1;
#endif
                             case EXT    : return 2;
                             default     : return 0;
                         }
#else
#if NPLUSK
        case AP        : return (whatIs(fun(d))==ADDPAT) ? 1 : 0;
#else
        case AP        : return 0;      /* must be an Int or Double lit    */
#endif
#endif
    }
    internal("discrArity");
    return 0;/*NOTREACHED*/
}

internal() gets called because whatIs(d) it's returning an unexpected value.
One could trace through that function with a debugger and compare its behavior
with and without -march...

As a last note, something I forgot to mention erlier. I'm actually using gcc
4.1.1; unfortunately at this time I have no way to test the ebuild on an older
3.something version.

------- Comment #5 From Anakim Border 2006-08-08 14:15:53 0000 -------
Created an attachment (id=93794) [edit]
full compilation log, showing runhugs internal error

------- Comment #6 From Duncan Coutts (RETIRED) 2006-08-08 15:16:22 0000 -------
Thanks very much Anakim for your detailed report.

------- Comment #7 From Lennart Kolmodin 2006-08-11 12:23:07 0000 -------
Hi Anakim,

which CFLAGS and and platform where you using when it broke?

I just successfully compiled your ebuild on x86 with
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"

------- Comment #8 From Anakim Border 2006-09-09 06:35:38 0000 -------
> which CFLAGS and and platform where you using when it broke?

Portage 2.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3,
2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 AMD Athlon(tm) XP
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -msse -O2 -pipe -fomit-frame-pointer -ftracer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-march=athlon-xp -msse -O2 -pipe -fomit-frame-pointer -ftracer"

Since -ftracer is not completely safe, I disabled it before emerging hugs. But
even that was not enough: I had to trim CFLAGS down to "-O2".

------- Comment #9 From Jakub Moc (RETIRED) 2006-12-26 03:31:19 0000 -------
*** Bug 159110 has been marked as a duplicate of this bug. ***

------- Comment #10 From Elias Pipping (RETIRED) 2007-06-13 17:20:08 0000 -------
Does the problem described above still exist in hugs98-plus-Sep2006?

------- Comment #11 From Anakim Border 2007-06-14 17:55:07 0000 -------
> Does the problem described above still exist in hugs98-plus-Sep2006?

I was able to compile hugs98-plus-Sep2006 successfully without changing CFLAGS.
Seems like the problem has been fixed.

------- Comment #12 From Jakub Moc (RETIRED) 2007-10-27 17:31:37 0000 -------
*** Bug 197224 has been marked as a duplicate of this bug. ***

------- Comment #13 From Gasper Azman 2007-10-27 17:40:07 0000 -------
Created an attachment (id=134498) [edit]
the new ebuild. Works for me.

I posted this in the bug that was just marked duplicate, but since no-one reads
duplicate bugs, I'm reposting the new ebuild here.

The change from 2005.3-r2 ebuild is basically this:

diff /usr/portage/dev-lang/hugs98/hugs98-2005.3-r2.ebuild
/usr/local/portage/dev-lang/hugs98/hugs98-2006.9.ebuild --unified
--- /usr/portage/dev-lang/hugs98/hugs98-2005.3-r2.ebuild        2007-07-22
11:35:34.000000000 +0200
+++ /usr/local/portage/dev-lang/hugs98/hugs98-2006.9.ebuild     2007-10-27
18:54:01.745041793 +0200
@@ -31,14 +31,15 @@
 HUGS_MONTH=$(transform_month ${HUGS_MONTH_NR})
 MY_PV="${HUGS_MONTH}$(get_major_version )"
 MY_P="${PN}-${MY_PV}"
+MY_DIR=$(printf "%4d-%02d" $(get_major_version) ${HUGS_MONTH_NR})
 S=${WORKDIR}/${MY_P}
 DESCRIPTION="The Hugs98 Haskell interpreter"
-SRC_URI="http://cvs.haskell.org/Hugs/downloads/${MY_PV}/${MY_P}.tar.gz
-               
http://cvs.haskell.org/Hugs/downloads/${MY_PV}/${MY_P}-patch.gz"
+SRC_URI="http://cvs.haskell.org/Hugs/downloads/${MY_DIR}/${MY_P}.tar.gz"
+#              
http://cvs.haskell.org/Hugs/downloads/${MY_DIR}/${MY_P}-patch.gz"
 HOMEPAGE="http://www.haskell.org/hugs/"

 SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc ~x86 ~x86-fbsd"
 LICENSE="as-is"

 RDEPEND="
@@ -55,9 +56,9 @@
 src_unpack() {
        base_src_unpack
        cd ${S}
-       epatch ${WORKDIR}/${MY_P}-patch
-       epatch ${FILESDIR}/${P}-openal.patch
-       epatch ${FILESDIR}/${P}-find.patch
+#      epatch ${WORKDIR}/${MY_P}-patch
+#      epatch ${FILESDIR}/${P}-openal.patch
+#      epatch ${FILESDIR}/${P}-find.patch

        if ! use X; then
                sed -i -e 's/X11//' -e 's/HGL//' "${S}/Makefile" \

------- Comment #14 From Duncan Coutts (RETIRED) 2008-01-26 20:30:59 0000 -------
Now in portage.

First Last Prev Next    No search results available      Search page      Enter new bug