Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64426 - hugs98-2003.11-r1 does not compile with gcc-3.4
Summary: hugs98-2003.11-r1 does not compile with gcc-3.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-17 11:23 UTC by ecco
Modified: 2004-11-13 23:11 UTC (History)
2 users (show)

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


Attachments
hugs98-2003.11-gcc-3.4.patch (hugs98-2003.11-gcc-3.4.patch,480 bytes, patch)
2004-10-29 09:29 UTC, ecco
Details | Diff
hugs-gcc34.patch (hugs-gcc34.patch,303 bytes, patch)
2004-10-29 10:23 UTC, David Morgan
Details | Diff
updated hugs98-2003.11.ebuild (hugs98-2003.11.ebuild,2.02 KB, text/plain)
2004-10-29 10:23 UTC, David Morgan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecco 2004-09-17 11:23:53 UTC
hugs98 fails to emerge, and I suspect it's gcc-3.4 related, because I have 2 machines with gcc-3.4 failing, and one with gcc-3.3 succeeding to compile. On the site they say that "On some systems, some of the library modules using the FFI may fail to compile: please report the bug", so I shall send them an email too.

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

Actual Results:  
Converting ParsecExpr.hs
Converting ParsecLanguage.hs
Converting ParsecPerm.hs
Converting ParsecPos.hs
Converting ParsecPrim.hs
Converting ParsecToken.hs
Converting GetOpt.lhs
Converting Unique.lhs
Converting QuickCheck.hs
Converting QuickCheckPoly.hs
Converting QuickCheckUtils.hs
Copy AnsiInteract.hs
Copy AnsiScreen.hs
Stub CVHAssert -> Hugs.CVHAssert
Stub GenericPrint -> Hugs.GenericPrint
Stub HugsInternals -> Hugs.Internals
Copy HugsLibs.hs
Stub IOExtensions -> Hugs.IOExts
Copy Interact.hs
Copy ListUtils.hs
Copy Number.hs
Copy ParseLib.hs
Stub Quote -> Hugs.Quote
Copy StdLibs.hs
Stub Trace -> Debug.Trace
Stub Trex -> Hugs.Trex
env HUGSDIR='../hugsdir' HUGSFLAGS='' ./ffihugs +G
+L'../hugsdir/libraries/Hugs/Storable_aux.c' Hugs.Storable
runhugs: Error occurred
ERROR "../hugsdir/libraries/Data/List.hs":197 - Syntax error in fixity decl
(unexpected backslash (lambda))


make: *** [../hugsdir/libraries/Hugs/Storable.so] Error 1

!!! ERROR: dev-lang/hugs98-2003.11 failed.
!!! Function src_compile, Line 62, Exitcode 2
!!! (no error message)



Portage 2.0.50-r11 (gcc34-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20040916-r0,
2.6.8.1-mm4)
=================================================================
System uname: 2.6.8.1-mm4 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/share/config:/usr/kde/3.3/env:/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/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache digest distcc sandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://feegle/gentoo-portage"
USE="3dnow X acpi alsa apm arts avi berkdb bitmap-fonts bluetooth cdr crypt cups
dvd dvdr encode esd foomaticdb gdbm gif gtk gtk2 imlib javascript jpeg kde
libg++ libwww mad mikmod mime mmx mng motif mpeg ncurses nls no_wxgtk1 nowin
nptl oggvorbis ooo-kde opengl oss pam pcmcia pdflib perl png pnp python qt
quicktime radeon readline rtc samba sdlslang spell sse ssl svga tcpd tetex tiff
truetype usb vim-with-x wifi x86 xine xml2 xmms xprint xv xvid zlib"
Comment 1 ecco 2004-10-09 08:21:55 UTC
It is definitely a gcc-3.4 issue. I tried compiling it with gcc-3.3 and it worked fine.
Comment 2 David Morgan 2004-10-26 05:32:28 UTC
I also had to switch to  gcc 3.3.x to get hugs to compile (manually, not with the ebuild), but I made some attempt to fix it first

Going to the line that the error occurs on and removing the \ and then running make again allows the compilation to go further (unless you do a make clean first, in which case you're back to square one), but it still fails in the same file, this time with a hugs/haskell error (a syntax error about a ;, "possibly due to bad layout")

I'll have another go and fixing it as soon as I can, but this might help someone else figure out what the problem is in the meantime
Comment 3 David Morgan 2004-10-28 07:09:14 UTC
Ok, I've found out how to fix the problem (sort of) - instead of removing the \ line 197 you need to add another one (so you have \\), and then run make again and hugs should compile with gcc 3.4.x 

Before you run make for the first time, the file lives at hugs98-Nov2003/fptools/libraries/base/Data/List.hs, which is correct (it has infix 5 \\, and not infix 5 \, though it's on line 212). I'll try adding a third \ to the line in this file when I get home (I'm doing this remotely and so only have access to gcc 2.95.3)

If any of the gcc-porting people see this, any input as to why this happens and how to fix it without manually chaning the file after make fails and then re-running make would be appreciated
Comment 4 ecco 2004-10-29 09:29:22 UTC
Created attachment 42855 [details, diff]
hugs98-2003.11-gcc-3.4.patch

Yep, the extra / does the trick :)
Comment 5 ecco 2004-10-29 09:31:11 UTC
Well, I meant \ instead of /, but you get the point :P
Comment 6 David Morgan 2004-10-29 10:23:04 UTC
Created attachment 42857 [details, diff]
hugs-gcc34.patch
Comment 7 David Morgan 2004-10-29 10:23:41 UTC
Created attachment 42858 [details]
updated hugs98-2003.11.ebuild
Comment 8 David Morgan 2004-10-29 10:25:03 UTC
The patch I added (hugs-gcc34.patch) and the updated ebuild mean that anyone wanting to emerge hugs using gcc 3.4.x can put the ebuild in their overlay, and the patch in the files directory for hugs there, and it should work
Comment 9 Andres Loeh (RETIRED) gentoo-dev 2004-11-03 12:55:01 UTC
I have tested and commited this patch, as it certainly seems harmless enough.

Comment 10 Gour 2004-11-13 23:11:29 UTC
Hi!

Emerging hugs98 on amd64 with the above patches fails:

[...]
Stub Trex -> Hugs.Trex
env HUGSDIR='../hugsdir' HUGSFLAGS='' ./ffihugs +G +L'../hugsdir/libraries/Hugs/Storable_aux.c' Hugs.Storable
make: *** [../hugsdir/libraries/Hugs/Storable.so] Error 1

!!! ERROR: dev-lang/hugs98-2003.11 failed.
!!! Function src_compile, Line 70, Exitcode 2
!!! (no error message)


Any hint?

Sincerely,
Gour