Date: Fri, 27 Mar 2009 06:00:13 GMT From: Scot Hetzel <swhetzel@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/133113: graphics/ocaml-lablgl: Fails to build when TCL/TK 8.4 is not installed Message-ID: <200903270600.n2R60D29078512@www.freebsd.org> Resent-Message-ID: <200903270610.n2R6A11e013395@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133113 >Category: ports >Synopsis: graphics/ocaml-lablgl: Fails to build when TCL/TK 8.4 is not installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 27 06:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD hp010.hetzel.org 8.0-CURRENT FreeBSD 8.0-CURRENT #6: Tue Mar 24 05:47:19 CDT 2009 root@hp010.hetzel.org:/usr/obj/usr/src/sys/DV8135NR amd64 >Description: While trying to remove the last port depending on TK 8.4/TCL 8.4, it fails to build when only TK 8.5/TCL 8.5 is installed. The ports ${WRKSRC}/Makefile.config{,.freebsd} has hard coded the locations of the TK 8.4/TCL 8.4 libs and include directories. The ${WRKSRC}/Togl/src/Togl/togl.c file fails to include the appropriate tkInt*.h, due to it only checks for TK versions up to 8.4. >How-To-Repeat: Uninstall tk8.4 and tcl8.4, and then install tk8.5 and tcl8.5 cd /usr/ports/graphics/ocaml-lablgl make build gmake[1]: Entering directory `/usr/ports/graphics/ocaml-lablgl/work/lablgl-1.03/Togl/src' ocamlrun ../../src/var2def < togl_tags.var > togl_tags.h ocamlrun ../../src/var2switch TOGL_ < togl_tags.var > togl_tags.c ocamlc -c -w s -ccopt "-c -O2 -pipe -fno-strict-aliasing -I../../src -ITogl -I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4 -I. -I/usr/local/include" ml_togl.c ml_togl.c:12:17: error: tcl.h: No such file or directory ml_togl.c:13:16: error: tk.h: No such file or directory In file included from ml_togl.c:19: Togl/togl.h:146: error: expected ')' before '*' token Togl/togl.h:184: error: expected ')' before '*' token Togl/togl.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token Togl/togl.h:209: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Togl_TkWin' Togl/togl.h:266: error: expected ')' before 'clientData' Togl/togl.h:268: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Togl_GetClientData' Togl/togl.h:270: error: expected declaration specifiers or '...' before 'ClientData' ml_togl.c: In function 'ml_Togl_Init': ml_togl.c:47: error: 'Tcl_Interp' undeclared (first use in this function) ml_togl.c:47: error: (Each undeclared identifier is reported only once ml_togl.c:47: error: for each function it appears in.) ml_togl.c:47: error: 'cltclinterp' undeclared (first use in this function) ml_togl.c:48: error: expected expression before ')' token ml_togl.c:49: warning: implicit declaration of function 'Togl_Init' ml_togl.c:49: error: 'TCL_ERROR' undeclared (first use in this function) ml_togl.c: In function 'ml_Togl_DumpToEpsFile': ml_togl.c:146: error: 'TCL_ERROR' undeclared (first use in this function) gmake[1]: *** [ml_togl.o] Error 2 gmake[1]: Leaving directory `/usr/ports/graphics/ocaml-lablgl/work/lablgl-1.03/Togl/src' gmake: *** [togl] Error 2 *** Error code 2 >Fix: The attached patch replaces the TK/TCL libs and include directories, as well as fixing the include for tkInt8.4.h in Togl/src/Togl/togl.c. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/ocaml-lablgl/Makefile,v retrieving revision 1.21 diff -u -r1.21 Makefile --- Makefile 23 Jan 2009 16:27:39 -0000 1.21 +++ Makefile 27 Mar 2009 05:36:06 -0000 @@ -21,6 +21,7 @@ USE_OCAML_WASH= yes ALL_TARGET= all opt DEPENDS_ARGS+= WITH_TK=yes +USE_TK= yes MASTERPORT= ${PORTSDIR}/devel/ocaml-camlidl PATTERN= [[:space:]]*(do|then)?[[:space:]]*)cp([[:space:]] @@ -39,6 +40,8 @@ -e "s,^\(RANLIB[ \t]*=\).*,\1ranlib,g" \ -e "s,^#\(LIBDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml,g" \ -e "s,^#\(DLLDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml/stublibs,g" \ + -e "s,^\(TKINCLUDES[ \t]*=\).*,\1-I${TCL_INCLUDEDIR} -I${TK_INCLUDEDIR},g" \ + -e "s,^\(TKLIBS[ \t]*=\).*,\1-L${LOCALBASE}/lib -ltk${USE_TK} -ltcl${USE_TCL},g" \ ${WRKSRC}/Makefile.config @${REINPLACE_CMD} \ Index: files/patch-Togl_src_Togl_togl.c =================================================================== RCS file: files/patch-Togl_src_Togl_togl.c diff -N files/patch-Togl_src_Togl_togl.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-Togl_src_Togl_togl.c 27 Mar 2009 05:10:00 -0000 @@ -0,0 +1,11 @@ +--- Togl/src/Togl/togl.c.orig 2006-03-22 18:39:27.000000000 -0600 ++++ Togl/src/Togl/togl.c 2009-03-27 00:09:05.889967432 -0500 +@@ -151,7 +151,7 @@ + # include "tkInt8.2.h" + #elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==3 + # include "tkInt8.3.h" +-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 ++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION>=4 + # include "tkInt8.4.h" + #else + Sorry, you will have to edit togl.c to include the right tkInt.h file >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903270600.n2R60D29078512>