dev-lang/hugs98-2003.11 does compile on amd64 when "-fPIC" is used. Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.50-r11 (default-amd64-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6.9-rc2) ================================================================= System uname: 2.6.9-rc2 x86_64 4 Gentoo Base System version 1.4.16 distcc 2.13 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-fPIC" CHOST="x86_64-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.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/lib/mozilla/defaults/pref /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="-fPIC" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache" GENTOO_MIRRORS="http://gentoo.inode.at" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acpi acpi4linux alsa amd amd64 arts artswrappersuid async autofs avantgo avi berkdb bitmap-fonts cddb cdr chroot crypt cups dv dvd dvdr dvdread encode esd fam ffmpeg flac foomaticdb foreign-package freetype fs gdbm gif gtk gtk2 icq imlib java jikes jpeg junit kde lcd libg++ libwww mikmod motif mozilla mpeg mpeg4 multilib ncurses nls nogcj nptl ntlm oav offensive oggvorbis oss pam pcmcia pdflib perl png pnp prelude python qt quicktime radeon readline sdl slang spell ssl tcltk tcpd tetex transcode truetype type1 usb videos wxwindows xine xml2 xmms xprint xv xvid zlib"
No such luck here. [snip] runhugs: Error occurred ERROR "../hugsdir/libraries/Data/List.hs":197 - Syntax error in fixity decl (unexpected backslash (lambda))
Adding -fPIC to CFLAGS lets hugs98-2003.11-r1 compile for me and it works for simple Haskell code. Unfortunately all the complicated Haskell I have lying around is GHC only. One thing that concerns me when configuring and compiling on amd64 are numerous warnings about pointer to integer casts having size mismatches. I'm not sure if these show up on other architectures, but they don't bode well. I notice that freshports have a hugs package for FreeBSD (http://www.freshports.org/lang/hugs/) which has 'fix for amd64' in the ChangeLog. Further investigation reveals that this took the form of adding -fPIC to the CFLAGS. As far as I can tell this seems to work, but I need to get hold of some more complicated Haskell code known to run under Hugs to see if it falls over on anything more than simple uses of map over 10000-element lists.
Hi! Emerging hugs98 on amd64 with the patches from #64426 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
I've tested hugs98 with -fPIC on amd64, and it seems to work for me. I have therefore added a ~amd64 flag to the current hugs98 ebuild. Please test. Gour, if your problem persists with the new ebuild, please tell me. ks
Hi! > I've tested hugs98 with -fPIC on amd64, and it seems to work for me. >I have therefore added a ~amd64 flag to the current hugs98 ebuild. >Please test. Gour, if your problem persists with the new ebuild, please >tell me. Didn't notice before that hugs has ~amd64, so here is the result of the test with "-fPIC" added to CFLAGS: [..] 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 ...the same error. I wanted to try again, and interestingly enough, I get: gaura-nitai gour # ebuild /usr/portage/dev-lang/hugs98/hugs98-2003.11.ebuild clean QA Notice: ECLASS 'base' inherited illegally in dev-lang/hugs98-2003.11 QA Notice: ECLASS 'flag-o-matic' inherited illegally in dev-lang/hugs98-2003.11 QA Notice: ECLASS 'toolchain-funcs' inherited illegally in dev-lang/hugs98-2003.11 and gaura-nitai gour # ebuild /usr/portage/dev-lang/hugs98/hugs98-2003.11.ebuild unpack >>> md5 src_uri ;-) hugs98-Nov2003.tar.gz QA Notice: ECLASS 'base' inherited illegally in dev-lang/hugs98-2003.11 QA Notice: ECLASS 'flag-o-matic' inherited illegally in dev-lang/hugs98-2003.11 QA Notice: ECLASS 'toolchain-funcs' inherited illegally in dev-lang/hugs98-2003.11 >>> Unpacking source... >>> Unpacking hugs98-Nov2003.tar.gz to /var/tmp/portage/hugs98-2003.11/work * Applying hugs98-2003.11-gcc34.patch ... [ ok ] >>> Source unpacked. What is the cause of these QA Notice(s) ? All these amd64 & Haskell problems are a great stumbling block in my attempt to learn Haskell - real blocker(s) :-) I've just found some free time to start again with Thompson's book, but now none of the interpreters are workable :-( Sincerely, Gour
Hmm. I neither get the QA notices, nor can I reproduce the error. Anyway, the QA notices are most likely not related to the build problem. Does someone else experience the same problems? Duncan, is hugs98 working for you? ks
hugs works for me on x86. I've been quite busy the last week so I've not done my amd64 insatall yet, so I can't test that just yet. I will do soon however.
Hm, ~amd64 has long been added to dev-lang/hugs98. Kosmikus: The way you're handling the -fPIC BUG in 2003.11 is plainly wrong. dev-lang/hugs98 provides binaries which should never be compiled with -fPIC unless on a hardened platform. Apply -fPIC only to objects that end up in _shared_ objects. Reassigning to kosmikus...
BTW in my brief use dev-lang/hugs98-2005.3 installed and worked fine on amd64. I assume the -fPIC issue is the same in the ebuilds for dev-lang/hugs98-2005.3 and dev-lang/hugs98-2003.11 I havn't tried it on any very large programs (most of my code relies on GHC too).
Thanks for the info, Kugelfang, and sorry for doing something stupid. To defend myself, I had read Section 7 of http://www.gentoo.org/proj/en/hardened/pic-internals.xml in such a way that appending fPIC, while by no means optimal, is at least a working solution on amd64, and because hugs98 wouldn't otherwise compile on amd64, I did it. Can you explain to me as an agnostic what really goes wrong here? The new 2005.3 version of the ebuild no longer has the append-flags, because the package handles amd64 internally (and is hopefully doing it right). araujo, if you can fix this somehow, or duncan, if you can provide a patch, by all means, go ahead. I am sick at the moment and cannot do anything right now, but I will loook at this again when I am back. ks
It works perfectly well for me here. Though i don't use Hugs98 really, it compiled very well and trivial examples works fine. I don't get QA: messages either.
Hi! <quote>It works perfectly well for me here. Though i don't use Hugs98 really, it compiled very well and trivial examples works fine.</quote> Let me report that I just emerged Hugs98 (dev-lang/hugs98-2005.3) on my amd64 and simple examples works (at least I can continue my self-learning of Huskell :-) Sincerely, Gour
Been fixed in 2005.3-r2 long time ago.