Reproducible: Always Steps to Reproduce: 1. have a gentoo linux install without glut already emerged 2. emerge lablgl 3. compilation will fail: 'ld: cannot find -lglut' Actual Results: compilation error Expected Results: emerge glut first automatically Configuration: linux-2.6.1-gentoo-r1 (Acer TM800LCi) Gentoo Base System version 1.4.3.12 Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.1-gentoo) ================================================================= System uname: 2.6.1-gentoo i686 Intel(R) Pentium(R) M processor 1300MHz Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.7.8 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -mcpu=i686 -funroll-loops -pipe -fomit-frame-pointer -fforce-addr -frename-registers -falign-functions=64 -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/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=pentium3 -O2 -mcpu=i686 -funroll-loops -pipe -fomit-frame-pointer -fforce-addr -frename-registers -falign-functions=64 -fprefetch-loop-arrays" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ rsync://linux.rz.ruhr-uni-bochum.de/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo rsync://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo rsync://ftp.join.uni-muenster.de/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X aalib acpi alsa avi canna cdr cjk crypt cups curl dga doc dvd emacs encode esd ethereal fbcon foomaticdb gb gd gdbm gif gnome gpm gtk gtk2 imap imlib jpeg junit kerberos lcms ldap libg++ libwww mad maildir mikmod mmx motif mozilla mpeg mpi mysql ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl plotutils png pnp ppds python qt quicktime radeon readline samba sasl sdl snmp socks5 spell sse ssl svga tcltk tcpd tetex tiff truetype trusted usb video_cards_radeon vmf wmf x86 xml xml2 xmms xv zlib"
I have no idea why, but for some reason the ebuild considers OPENGL as an "optional dependancy". Best quick fix would be to `USE="opengl" emerge lablgl`. Hopefully the ebuild mantainer will notice this and patch it up.
Jan, can you give me the compilation trace ? Chris, i suppose you tried 0.99 or older ? I fixed that in CVS.
I can confirm this for labgl-1.00 USE="3dnow cdr divx4linux dvd fbcon ffmpeg freetype gimp gimpprint icq \ imap java javascript mmx mozxmlterm mpeg4 mplayer nvidia offensive \ theora tiff v4l v4l2 xfs xvid -gdbm -kde -gnome -libg++ -libwww -mad \ -mikmod -nls -pam -perl -python -qt" # emerge dev-ml/lablgl ... cd src && make all LIBDIR="`ocamlc -where`" make[1]: Entering directory `/var/tmp/portage/lablgl-1.00/work/lablgl-1.00/src' ocamlc -pp camlp4o var2def.ml -o var2def ocamlc -pp camlp4o var2switch.ml -o var2switch ocamlrun ../src/var2def < gl_tags.var > gl_tags.h ocamlrun ../src/var2switch -table GL_ < gl_tags.var > gl_tags.c ocamlc -c -w s -ccopt "-c -O -O2 -march=athlon-xp -pipe -funroll-loops -fomit-frame-pointer -mfpmath=sse -fforce-addr -I/usr/X11R6/include" ml_gl.c ml_gl.c: In function `ml_glHint': ml_gl.c:211: warning: `targ' might be used uninitialized in this function ml_gl.c: In function `ml_glMap1d': ml_gl.c:315: warning: `ustride' might be used uninitialized in this function ml_gl.c:316: warning: `targ' might be used uninitialized in this function ml_gl.c: In function `ml_glMap2d': ml_gl.c:346: warning: `ustride' might be used uninitialized in this function ml_gl.c:347: warning: `targ' might be used uninitialized in this function ocamlrun ../src/var2def < glu_tags.var > glu_tags.h ocamlrun ../src/var2switch GLU_ < glu_tags.var > glu_tags.c ocamlc -c -w s -ccopt "-c -O -O2 -march=athlon-xp -pipe -funroll-loops -fomit-frame-pointer -mfpmath=sse -fforce-addr -I/usr/X11R6/include" ml_glu.c ml_glu.c: In function `ml_gluNurbsCurve': ml_glu.c:145: warning: `targ' might be used uninitialized in this function ml_glu.c:146: warning: `ustride' might be used uninitialized in this function ml_glu.c: In function `ml_gluNurbsSurface': ml_glu.c:202: warning: `type' might be used uninitialized in this function ml_glu.c:203: warning: `sStride' might be used uninitialized in this function ml_glu.c: In function `ml_gluPwlCurve': ml_glu.c:279: warning: `type' might be used uninitialized in this function ml_glu.c:280: warning: `stride' might be used uninitialized in this function ml_glu.c: In function `ml_gluTessProperty': ml_glu.c:316: warning: `data' might be used uninitialized in this function ocamlrun ../src/var2def < raw_tags.var > raw_tags.h ocamlc -c -w s -ccopt "-c -O -O2 -march=athlon-xp -pipe -funroll-loops -fomit-frame-pointer -mfpmath=sse -fforce-addr -I/usr/X11R6/include" ml_raw.c ocamlc -c -w s -ccopt "-c -O -O2 -march=athlon-xp -pipe -funroll-loops -fomit-frame-pointer -mfpmath=sse -fforce-addr -I/usr/X11R6/include" ml_glarray.c ml_glarray.c: In function `ml_glEdgeFlagPointer': ml_glarray.c:34: warning: passing arg 2 of `glEdgeFlagPointer' makes pointer from integer without a cast ocamlmklib -o lablgl ml_gl.o ml_glu.o ml_raw.o ml_glarray.o -lGL -lGLU -lglut -L/usr/X11R6/lib -lXext -lXmu -lX11 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lglut collect2: ld returned 1 exit status make[1]: *** [liblablgl.a] Error 2 make[1]: Leaving directory `/var/tmp/portage/lablgl-1.00/work/lablgl-1.00/src' make: *** [lib] Error 2 !!! ERROR: dev-ml/lablgl-1.00 failed. !!! Function src_compile, Line 46, Exitcode 2 !!! (no error message)
Fixed in CVS. The real problem was that even if you did not have the glut flag set, the -lglut compiler flag was set and it would fail even if nothing used glut. Thanks for reminding me of this bug :)