When emerge lablGL to upgrade from 0.98 to 0.99-r1, the compilation fails. Here is the full output: Calculating dependencies ...done! >>> emerge (1 of 1) dev-ml/lablgl-0.99-r1 to / >>> md5 src_uri ;-) lablgl-0.99.tar.gz >>> md5 src_uri ;-) LablGL-0.99-Makefile-destdir.patch >>> md5 src_uri ;-) LablGL-0.99-Makefile.config tcltk /usr/bin/labltk >>> Unpacking source... >>> Unpacking lablgl-0.99.tar.gz to /var/tmp/portage/lablgl-0.99-r1/work >>> Unpacking LablGL-0.99-Makefile-destdir.patch to /var/tmp/portage/lablgl-0.99-r1/work unpack LablGL-0.99-Makefile-destdir.patch: file format not recognized. Ignoring. >>> Unpacking LablGL-0.99-Makefile.config to /var/tmp/portage/lablgl-0.99-r1/work unpack LablGL-0.99-Makefile.config: file format not recognized. Ignoring. patching file Makefile >>> Source unpacked. tcltk ocamlc -pp camlp4o var2def.ml -o var2def ocamlc -pp camlp4o var2switch.ml -o var2switch ocamlrun ./var2def < gl_tags.var > gl_tags.h ./var2switch -table GL_ < gl_tags.var > gl_tags.c ocamlc -c -w s -ccopt "-c -O -I/usr/X11R6/include -ITogl" ml_gl.c ml_gl.c: In function `ml_glHint': ml_gl.c:202: warning: `targ' might be used uninitialized in this function ml_gl.c: In function `ml_glMap1d': ml_gl.c:280: warning: `ustride' might be used uninitialized in this function ml_gl.c:281: warning: `targ' might be used uninitialized in this function ml_gl.c: In function `ml_glMap2d': ml_gl.c:311: warning: `ustride' might be used uninitialized in this function ml_gl.c:312: warning: `targ' might be used uninitialized in this function ocamlrun ./var2def < glu_tags.var > glu_tags.h ./var2switch GLU_ < glu_tags.var > glu_tags.c ocamlc -c -w s -ccopt "-c -O -I/usr/X11R6/include -ITogl" ml_glu.c ml_glu.c: In function `ml_gluNurbsCurve': ml_glu.c:140: warning: `targ' might be used uninitialized in this function ml_glu.c:141: warning: `ustride' might be used uninitialized in this function ml_glu.c: In function `ml_gluNurbsSurface': ml_glu.c:197: warning: `type' might be used uninitialized in this function ml_glu.c:198: warning: `sStride' might be used uninitialized in this function ml_glu.c: In function `ml_gluPwlCurve': ml_glu.c:274: warning: `type' might be used uninitialized in this function ml_glu.c:275: warning: `stride' might be used uninitialized in this function ml_glu.c: In function `ml_gluTessProperty': ml_glu.c:311: warning: `data' might be used uninitialized in this function ocamlrun ./var2def < raw_tags.var > raw_tags.h ocamlc -c -w s -ccopt "-c -O -I/usr/X11R6/include -ITogl" ml_raw.c ocamlmklib -o lablgl ml_gl.o ml_glu.o ml_raw.o -lGL -lGLU -L/usr/X11R6/lib -lXext -lXmu -lX11 ocamlc -c -w s -I +labltk -I +stublibs raw.mli ocamlc -c -w s -I +labltk -I +stublibs raw.ml ocamlc -c -w s -I +labltk -I +stublibs gl.mli ocamlc -c -w s -I +labltk -I +stublibs gl.ml ocamlc -c -w s -I +labltk -I +stublibs glLight.mli ocamlc -c -w s -I +labltk -I +stublibs glLight.ml ocamlc -c -w s -I +labltk -I +stublibs glList.mli ocamlc -c -w s -I +labltk -I +stublibs glList.ml ocamlc -c -w s -I +labltk -I +stublibs glMap.mli ocamlc -c -w s -I +labltk -I +stublibs glMap.ml ocamlc -c -w s -I +labltk -I +stublibs glMat.mli ocamlc -c -w s -I +labltk -I +stublibs glMat.ml ocamlc -c -w s -I +labltk -I +stublibs glMisc.mli ocamlc -c -w s -I +labltk -I +stublibs glMisc.ml ocamlc -c -w s -I +labltk -I +stublibs glPix.mli ocamlc -c -w s -I +labltk -I +stublibs glPix.ml ocamlc -c -w s -I +labltk -I +stublibs glClear.mli ocamlc -c -w s -I +labltk -I +stublibs glClear.ml ocamlc -c -w s -I +labltk -I +stublibs glTex.mli ocamlc -c -w s -I +labltk -I +stublibs glTex.ml ocamlc -c -w s -I +labltk -I +stublibs glDraw.mli ocamlc -c -w s -I +labltk -I +stublibs glDraw.ml ocamlc -c -w s -I +labltk -I +stublibs glFunc.mli ocamlc -c -w s -I +labltk -I +stublibs glFunc.ml ocamlc -c -w s -I +labltk -I +stublibs gluMisc.mli ocamlc -c -w s -I +labltk -I +stublibs gluMisc.ml ocamlc -c -w s -I +labltk -I +stublibs gluNurbs.mli ocamlc -c -w s -I +labltk -I +stublibs gluNurbs.ml ocamlc -c -w s -I +labltk -I +stublibs gluQuadric.mli ocamlc -c -w s -I +labltk -I +stublibs gluQuadric.ml ocamlc -c -w s -I +labltk -I +stublibs gluTess.mli ocamlc -c -w s -I +labltk -I +stublibs gluTess.ml ocamlc -c -w s -I +labltk -I +stublibs gluMat.mli ocamlc -c -w s -I +labltk -I +stublibs gluMat.ml ocamlmklib -o lablgl raw.cmo gl.cmo glLight.cmo glList.cmo glMap.cmo glMat.cmo glMisc.cmo glPix.cmo glClear.cmo glTex.cmo glDraw.cmo glFunc.cmo gluMisc.cmo gluNurbs.cmo gluQuadric.cmo gluTess.cmo gluMat.cmo -lGL -lGLU -L/usr/X11R6/lib -lXext -lXmu -lX11 ocamlrun ./var2def < togl_tags.var > togl_tags.h ./var2switch TOGL_ < togl_tags.var > togl_tags.c ocamlc -c -w s -ccopt "-c -O -I/usr/X11R6/include -ITogl" ml_togl.c ml_togl.c: In function `ml_Togl_Init': ml_togl.c:35: warning: pointer/integer type mismatch in conditional expression ml_togl.c: In function `ml_Togl_LoadBitmapFont': ml_togl.c:100: warning: `fontname' might be used uninitialized in this function cd Togl && make togl.o CC="ocamlc" CFLAGS='-c -ccopt "-c -O -I/usr/X11R6/include "' make[1]: Entering directory `/var/tmp/portage/lablgl-0.99-r1/work/lablGL-0.99/Togl' ocamlc -c -ccopt "-c -O -I/usr/X11R6/include " togl.c togl.c:146: warning: type defaults to `int' in declaration of `Sorry' togl.c:146: warning: type defaults to `int' in declaration of `you' togl.c:146: error: syntax error before "will" In file included from togl.c:154: togl.h:138: warning: `struct Togl' declared inside parameter list togl.h:138: warning: its scope is only this definition or declaration, which is probably not what you want togl.h:139: warning: `struct Togl' declared inside parameter list togl.h:168: warning: `struct Togl' declared inside parameter list togl.h:170: warning: `struct Togl' declared inside parameter list togl.h:172: warning: `struct Togl' declared inside parameter list togl.h:174: warning: `struct Togl' declared inside parameter list togl.h:182: warning: `struct Togl' declared inside parameter list togl.h:184: warning: `struct Togl' declared inside parameter list togl.h:189: warning: `struct Togl' declared inside parameter list togl.h:191: warning: `struct Togl' declared inside parameter list togl.h:198: warning: `struct Togl' declared inside parameter list togl.h:200: warning: `struct Togl' declared inside parameter list togl.h:202: warning: `struct Togl' declared inside parameter list togl.h:204: warning: `struct Togl' declared inside parameter list togl.h:206: warning: `struct Togl' declared inside parameter list togl.h:214: warning: `struct Togl' declared inside parameter list togl.h:216: warning: `struct Togl' declared inside parameter list togl.h:219: warning: `struct Togl' declared inside parameter list togl.h:227: warning: `struct Togl' declared inside parameter list togl.h:229: warning: `struct Togl' declared inside parameter list togl.h:236: warning: `struct Togl' declared inside parameter list togl.h:238: warning: `struct Togl' declared inside parameter list togl.h:240: warning: `struct Togl' declared inside parameter list togl.h:242: warning: `struct Togl' declared inside parameter list togl.h:246: warning: `struct Togl' declared inside parameter list togl.h:248: warning: `struct Togl' declared inside parameter list togl.h:250: warning: `struct Togl' declared inside parameter list togl.h:254: warning: `struct Togl' declared inside parameter list togl.h:257: warning: `struct Togl' declared inside parameter list togl.h:265: warning: `struct Togl' declared inside parameter list togl.h:267: warning: `struct Togl' declared inside parameter list togl.h:306: warning: `struct Togl' declared inside parameter list togl.c: In function `Togl_Init': togl.c:711: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type togl.c: At top level: togl.c:782: error: conflicting types for `Togl_SetCreateFunc' togl.h:168: error: previous declaration of `Togl_SetCreateFunc' togl.c:791: error: conflicting types for `Togl_SetDisplayFunc' togl.h:170: error: previous declaration of `Togl_SetDisplayFunc' togl.c:800: error: conflicting types for `Togl_SetReshapeFunc' togl.h:172: error: previous declaration of `Togl_SetReshapeFunc' togl.c:809: error: conflicting types for `Togl_SetDestroyFunc' togl.h:174: error: previous declaration of `Togl_SetDestroyFunc' togl.c: In function `Togl_Timer': togl.c:822: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: At top level: togl.c:856: error: conflicting types for `Togl_MakeCurrent' togl.h:184: error: previous declaration of `Togl_MakeCurrent' togl.c: In function `Togl_Render': togl.c:886: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: In function `RenderOverlay': togl.c:910: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: At top level: togl.c:922: error: conflicting types for `Togl_Configure' togl.h:182: error: previous declaration of `Togl_Configure' togl.c: In function `Togl_Configure': togl.c:942: warning: passing arg 5 of `Tk_ConfigureWidget' from incompatible pointer type togl.c: In function `Togl_Widget': togl.c:1032: warning: passing arg 1 of `Togl_SwapBuffers' from incompatible pointer type togl.c:1043: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: In function `Togl_Cmd': togl.c:1081: warning: `main' is usually a function togl.c:1161: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type togl.c:1190: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c:1195: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: In function `SetupOverlay': togl.c:1243: error: `TkWindow' undeclared (first use in this function) togl.c:1243: error: (Each undeclared identifier is reported only once togl.c:1243: error: for each function it appears in.) togl.c:1243: error: `winPtr' undeclared (first use in this function) togl.c:1243: error: syntax error before ')' token togl.c: In function `Togl_MakeWindowExist': togl.c:1364: error: `TkWindow' undeclared (first use in this function) togl.c:1364: error: `winPtr' undeclared (first use in this function) togl.c:1364: error: syntax error before ')' token togl.c:1365: error: `winPtr2' undeclared (first use in this function) togl.c:1743: warning: implicit declaration of function `TkWmAddToColormapWindows' togl.c: In function `ToglCmdDeletedProc': togl.c:1876: error: `TkWindow' undeclared (first use in this function) togl.c:1876: error: `winPtr' undeclared (first use in this function) togl.c:1876: error: syntax error before ')' token togl.c: In function `Togl_Destroy': togl.c:1915: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c: In function `Togl_EventProc': togl.c:1938: warning: passing arg 1 of `Togl_PostRedisplay' from incompatible pointer type togl.c:1944: warning: passing arg 1 of `Togl_PostOverlayRedisplay' from incompatible pointer type togl.c:1965: warning: passing arg 1 of pointer to function from incompatible pointer type togl.c:1971: warning: passing arg 1 of `Togl_UseLayer' from incompatible pointer type togl.c:1973: warning: passing arg 1 of `Togl_UseLayer' from incompatible pointer type togl.c:1978: warning: passing arg 1 of `Togl_PostRedisplay' from incompatible pointer type togl.c: At top level: togl.c:2024: error: conflicting types for `Togl_PostRedisplay' togl.h:189: error: previous declaration of `Togl_PostRedisplay' togl.c:2034: error: conflicting types for `Togl_SwapBuffers' togl.h:191: error: previous declaration of `Togl_SwapBuffers' togl.c:2051: error: conflicting types for `Togl_Ident' togl.h:198: error: previous declaration of `Togl_Ident' togl.c:2057: error: conflicting types for `Togl_Width' togl.h:200: error: previous declaration of `Togl_Width' togl.c:2063: error: conflicting types for `Togl_Height' togl.h:202: error: previous declaration of `Togl_Height' togl.c:2069: error: conflicting types for `Togl_Interp' togl.h:204: error: previous declaration of `Togl_Interp' togl.c:2075: error: conflicting types for `Togl_TkWin' togl.h:206: error: previous declaration of `Togl_TkWin' togl.c:2273: error: conflicting types for `Togl_AllocColor' togl.h:214: error: previous declaration of `Togl_AllocColor' togl.c:2310: error: conflicting types for `Togl_FreeColor' togl.h:216: error: previous declaration of `Togl_FreeColor' togl.c:2333: error: conflicting types for `Togl_SetColor' togl.h:219: error: previous declaration of `Togl_SetColor' togl.c:2396: error: conflicting types for `Togl_LoadBitmapFont' togl.h:227: error: previous declaration of `Togl_LoadBitmapFont' togl.c:2511: error: conflicting types for `Togl_UnloadBitmapFont' togl.h:229: error: previous declaration of `Togl_UnloadBitmapFont' togl.c:2530: error: conflicting types for `Togl_UseLayer' togl.h:236: error: previous declaration of `Togl_UseLayer' togl.c:2572: error: conflicting types for `Togl_ShowOverlay' togl.h:238: error: previous declaration of `Togl_ShowOverlay' togl.c:2584: error: conflicting types for `Togl_HideOverlay' togl.h:240: error: previous declaration of `Togl_HideOverlay' togl.c:2594: error: conflicting types for `Togl_PostOverlayRedisplay' togl.h:242: error: previous declaration of `Togl_PostOverlayRedisplay' togl.c:2610: error: conflicting types for `Togl_ExistsOverlay' togl.h:246: error: previous declaration of `Togl_ExistsOverlay' togl.c:2616: error: conflicting types for `Togl_GetOverlayTransparentValue' togl.h:248: error: previous declaration of `Togl_GetOverlayTransparentValue' togl.c:2622: error: conflicting types for `Togl_IsMappedOverlay' togl.h:250: error: previous declaration of `Togl_IsMappedOverlay' togl.c:2630: error: conflicting types for `Togl_AllocColorOverlay' togl.h:254: error: previous declaration of `Togl_AllocColorOverlay' togl.c:2647: error: conflicting types for `Togl_FreeColorOverlay' togl.h:257: error: previous declaration of `Togl_FreeColorOverlay' togl.c:2669: error: conflicting types for `Togl_GetClientData' togl.h:265: error: previous declaration of `Togl_GetClientData' togl.c:2675: error: conflicting types for `Togl_SetClientData' togl.h:267: error: previous declaration of `Togl_SetClientData' togl.c: In function `generateEPS': togl.c:2886: warning: operation on `i' may be undefined togl.c:2886: warning: operation on `i' may be undefined togl.c:2888: warning: operation on `i' may be undefined togl.c:2888: warning: operation on `i' may be undefined togl.c:2890: warning: operation on `i' may be undefined togl.c:2890: warning: operation on `i' may be undefined togl.c:2892: warning: operation on `i' may be undefined togl.c:2892: warning: operation on `i' may be undefined togl.c:2894: warning: operation on `i' may be undefined togl.c:2894: warning: operation on `i' may be undefined togl.c:2896: warning: operation on `i' may be undefined togl.c:2896: warning: operation on `i' may be undefined togl.c:2898: warning: operation on `i' may be undefined togl.c:2898: warning: operation on `i' may be undefined togl.c:2900: warning: operation on `i' may be undefined togl.c:2900: warning: operation on `i' may be undefined togl.c: At top level: togl.c:2976: error: conflicting types for `Togl_DumpToEpsFile' togl.h:306: error: previous declaration of `Togl_DumpToEpsFile' make[1]: *** [togl.o] Error 2 make[1]: Leaving directory `/var/tmp/portage/lablgl-0.99-r1/work/lablGL-0.99/Togl' make: *** [Togl/togl.o] Error 2 !!! ERROR: dev-ml/lablgl-0.99-r1 failed. !!! Function src_compile, Line 58, Exitcode 2 !!! (no error message) Reproducible: Always Steps to Reproduce: 1. emerge lablgl Actual Results: Exists with error message Expected Results: Complied successfully. Output from 'emerge info'': Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.4-gentoo) ================================================================= System uname: 2.6.4-gentoo i686 Intel(R) Pentium(R) 4 CPU 1700MHz Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/var/tmp/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://194.83.57.11/sites/www.ibiblio.org/gentoo/ http://194.83.57.7/sites/www.ibiblio.org/gentoo/ http://194.83.57.2/sites/www.ibiblio.org/gentoo/ http://212.219.247.16/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/mnt/cdrom" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apm arts avi berkdb cdr crypt directfb dvd dvdr encode esd foomaticdb gdbm gif gpm gtk gtk2 imagemagick imlib jpeg kde libg++ libwww mad mikmod mmx motif mpeg mysql ncurses nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse ssl svga tcltk truetype x86 xml2 xv zlib"
You apparently have a tcl/tk version the package doesn't handle, can you tell me which one ? As a quick fix you can try emerging 1.00 which is the latest upstream stable version.
Yep, you're right. I had installed tcl/tk 8.5a1 for the XFT support. So now I've remerged the tcl/tk from portage, and lablGL now compiles fine. So I dunno if a patch or warning would be in order?
It would require an upstream change (the source has ifdefs for all kinds of tcl/tk versions, and i'm no expert at it :), i suppose the maintainer will update it when this tcl/tk version is released as stable.