reproducing (for me) is easy: USE="opengl" emerge =dev-lang/hugs98-2003.11 First, some background. I am aware Peter Simons has mentioned this working for him, so there's probably not much to do here, unless someone else can reproduce the same error (which is one of the reasons I submit the bug here...). I have tried downloading source from the official site and I have the same error, which appears ONLY when I specify --use-hopengl AND --with-pthreads when configuring... Here is the failure: # ... lots more of this stuff all with "Segmentation Fault" in it, going all the # way back to when the hopengl stuff starts being Compiled .... Compiling ../../hugsdir/libraries/Graphics/UI/GLUT/Overlay.hs unix/BuildFFI: line 140: 21119 Segmentation fault ../ffihugs +G -98 -P../../hugsdir/libraries: +L-I../../hugsdir/libraries/Graphics/UI/GLUT +L-I../../hugsdir/libraries +L-I../../hugsdir/include +L-I/var/tmp/portage/hugs98-2003.11/work/hugs98-Nov2003/fptools/libraries/GLUT/include +L-lglut +L-lGLU +L-lGL +L-L/usr/X11R6/lib +L-lSM +L-lICE +L-lXmu +L-lXt +L-lXi +L-lXext +L-lX11 +L-lm Graphics.UI.GLUT.Overlay Compiling ../../hugsdir/libraries/Graphics/UI/GLUT/QueryUtils.hs unix/BuildFFI: line 142: 21125 Segmentation fault ../ffihugs +G -98 -P../../hugsdir/libraries: +L-I../../hugsdir/libraries/Graphics/UI/GLUT +L-I../../hugsdir/libraries +L-I../../hugsdir/include +L-I/var/tmp/portage/hugs98-2003.11/work/hugs98-Nov2003/fptools/libraries/GLUT/include +L-lglut +L-lGLU +L-lGL +L-L/usr/X11R6/lib +L-lSM +L-lICE +L-lXmu +L-lXt +L-lXi +L-lXext +L-lX11 +L-lm Graphics.UI.GLUT.QueryUtils Compiling ../../hugsdir/libraries/Graphics/UI/GLUT/Window.hs unix/BuildFFI: line 144: 21131 Segmentation fault ../ffihugs +G -98 -P../../hugsdir/libraries: +L-I../../hugsdir/libraries/Graphics/UI/GLUT +L-I../../hugsdir/libraries +L-I../../hugsdir/include +L-I/var/tmp/portage/hugs98-2003.11/work/hugs98-Nov2003/fptools/libraries/GLUT/include +L-lglut +L-lGLU +L-lGL +L-L/usr/X11R6/lib +L-lSM +L-lICE +L-lXmu +L-lXt +L-lXi +L-lXext +L-lX11 +L-lm Graphics.UI.GLUT.Window make: *** [../hugsdir/libraries/Hugs/Storable.so] Error 139 !!! ERROR: dev-lang/hugs98-2003.11 failed. !!! Function src_compile, Line 56, Exitcode 2 !!! (no error message) I plan to submit this as a bug to the developers unless someone can come up with a reasonable explanation, I guess. :) Here is my emerge info, although I guess there isn't much point if I get the same error compiling from source... Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test9-gentoo) ================================================================= System uname: 2.6.0-test9-gentoo i686 AMD Athlon(tm) XP 3200+ Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fprefetch-loop-arrays -funroll-loops" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /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/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fprefetch-loop-arrays -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow S3TC X aalib acpi acpi4linux alsa apm arts avi cdr crypt cups curl dga directfb doc emacs encode esd fbcon foomaticdb gd gdbm ggi gif gphoto2 gpm gtk guile imap imlib ipv6 java javascript jikes jpeg justify libg++ libwww mad mbox mikmod mmx motif mozilla mpeg music ncurses nls noqmax oggvorbis opengl oss pam passfile pda pdflib perl php png python qt quicktime readline ruby ruby18 samba sdl slang spell ssl stencil-buffer svga tcltk tcpd tetex tiff truetype usb videos wmf x86 xml xml2 xmms xv xvid zlib" I dunno if this is relevant (since I'm not a developer and don't actually know what libraries are included/linked by hugs98), but my glut version is 3.7.1 and my nvidia drivers version is 1.0.4496-r1 (since I have an nvidia card). I'm pretty sure my glut and other graphics stuff works, since I've made a couple of simple programs using glut... Would like some advice on (a) should I submit this as a bug to the official site; and (b) should I have even submitted this bug here at all? :)
If the compilation fails "outside" of Gentoo, too, I think the Hugs developers should know about it. I'd report the problem to them as well, if I were you. My uneducated best guess about the source of the problem is that your OpenGL installation can't deal with threading. Maybe you should try re-compiling your OpenGL stuff to make sure it has been translated with the current gcc, glibc and kernel environment?
(a) Yes, you should definitely also report it to the Hugs developers if it is not only a Gentoo-specific bug. (b) Yes, it's still good that you report it here. I have been able to reproduce the problem on another machine where I run nvidia drivers. I will run a few more tests ... kosmikus
Could it be that those nvidia drivers don't support threading?
Bug submitted... although I'm pretty convinced now that Peter Simons has hit the nail on the head: compiling hugs after an "opengl-update xfree" was absolutely fine. I have looked at the docs associated with the nVidia drivers (which are pretty useless, actually), and while they do mention pthreads the only bugs they mention associated with them are very old and almost certainly irrelevant. (the link is ftp://download.nvidia.com/XFree86/Linux-x86/1.0-4496/README.txt - search for "pthreads".) But then saying that, there are a few recent references on the nVidia Linux forums with this bug in action: http://www.nvnews.net/vbulletin/showthread.php?s=2fe48c773200d0967c120426508752d2&threadid=21254 http://www.nvnews.net/vbulletin/showthread.php?s=2fe48c773200d0967c120426508752d2&threadid=11965 So yeah, I'm definitely in favour of blaming this on the nvidia drivers at this stage. :)
In the meantime, this will prevent pthreads being used for anyone using nvidia opengl libraries: --- hugs98-2003.11.ebuild.old 2003-12-04 10:25:30.683320232 +0000 +++ hugs98-2003.11.ebuild 2003-12-04 10:28:18.019881208 +0000 @@ -22,6 +22,11 @@ local myconf if [ `use opengl` ]; then myconf="--enable-hopengl" + if [ ! `grep opengl/nvidia/lib /etc/env.d/09opengl` ]; then + myconf="$myconf --with-pthreads" + fi + else + myconf="--with-pthreads" fi # When timing is enabled, the build will fail at some @@ -49,7 +54,6 @@ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --enable-ffi \ - --with-pthreads \ --enable-profiling \ ${myconf} || die "./configure failed" cd ..
There is now a provision in the ebuild to fix this. Not sure how it got there. This is a forgotten lost bug now, then, and it works for me with the new ebuild.
> There is now a provision in the ebuild to fix this. Not sure how it got there. I wish that would ever happen to me. :-)
I am sorry. I should have closed the bug or at least said something when I added the fix. Thanks, ferret, for providing it. I think I left the bug open because I was not sure that this is really a good solution for the problem ... Best, ks