FS#3602 - Arch tcl/tk packages include invalid src directory reference
Attached to Project:
Arch Linux
Opened by Tom Killian (tomk) - Friday, 09 December 2005, 16:53 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 11 November 2007, 22:49 GMT
Opened by Tom Killian (tomk) - Friday, 09 December 2005, 16:53 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 11 November 2007, 22:49 GMT
|
Details
I tried to build tix (http://tix.sourceforge.net) against
tcl/tk 8.4.11, as installed by the current Arch packages.
tix is a standard TEA extension. When I ran ./configure
--prefix=/usr, the output included the following:
checking for Tcl private include files... Using srcdir found in tclConfig.sh: /home/dorphell/Arch.CVS/arch/build/devel/tcl/src/tcl8.4.11 checking for Tk private include files... Using srcdir found in tkConfig.sh: /home/dorphell/Arch.CVS/arch/build/devel/tk/src/tk8.4.11 The subsequent make failed with the following error: In file included from ./generic/tixClass.c:29: ./generic/tixPort.h:37:25: error: tclPort.h: No such file or directory ./generic/tixClass.c: In function 'Tix_ClassCmd': ./generic/tixClass.c:228: warning: implicit declaration of function 'strcmp' ./generic/tixClass.c:238: warning: implicit declaration of function 'strstr' ./generic/tixClass.c:238: warning: incompatible implicit declaration of built-in function 'strstr' ./generic/tixClass.c:277: warning: implicit declaration of function 'strlen' ./generic/tixClass.c:277: warning: incompatible implicit declaration of built-in function 'strlen' ./generic/tixClass.c: In function 'Tix_CreateInstanceCmd': ./generic/tixClass.c:763: warning: incompatible implicit declaration of built-in function 'strstr' ./generic/tixClass.c: In function 'Tix_InstanceCmd': ./generic/tixClass.c:861: warning: incompatible implicit declaration of built-in function 'strlen' ./generic/tixClass.c:889: warning: implicit declaration of function 'strncmp' make: *** [tixClass.o] Error 1 tclPort.h is in /usr/include/tcl/, but is not found. I built tcl and tk locally, and tclConfig.sh/tkConfig.sh now refer to my build direcory instead of Dorphell's. I can build tix against these local versions. However, it seems to me that the best fix would be to edit tclConfig.sh/tkConfig.sh to refer to /usr/include instead of the build directory. I'm going to try to work that out. |
This task depends upon
From /usr/lib/tclConfig.sh:
TCL_BUILD_LIB_SPEC='-L/home/tobias/Install/Arch/arch-cvs/arch/build/devel/tcl/sr
c/tcl8.4.14/unix -ltcl8.4${TCL_DBGX}'
When I built itcl it did the same thing it made an itclConfig.sh with my build directory.
Is it just me or is this a really stupid behaviour?
This is itcl. http://incrtcl.sourceforge.net/itcl/
tk-PKGBUILD.patch (1.1 KiB)
TCL_SRC_DIR=/usr/lib/tcl8.4.14
which is not only a non-existent path, but also not a source directory, because of course we don't install the source. I'm not familiar enough with tcl/tk to judge how much this matters, but it doesn't feel right. :)
I'll have a closer look at the *Config.sh.in files that are used to create these files during the build, and if anyone as other ideas, please post them here.
tcl:
sed -i \
-e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L/usr/lib," \
-e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='/usr/include'," \
-e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib," \
-e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='/usr/lib," \
${startdir}/pkg/usr/lib/tclConfig.sh
tk:
sed -i \
-e "s,^\(TK_BUILD_LIB_SPEC='-L\).*/unix,\1/usr/lib," \
-e "s,^\(TK_SRC_DIR='\).*',\1/usr/include'," \
-e "s,^\(TK_BUILD_STUB_LIB_SPEC='-L\).*/unix,\1/usr/lib," \
-e "s,^\(TK_BUILD_STUB_LIB_PATH='\).*/unix,\1/usr/lib," \
${startdir}/pkg/usr/lib/tkConfig.sh
This not very consistent sed expression style was bought to you with the help of the gentoo ebuilds.
TCL:
sed -i \
"s#$startdir/src/tcl$pkgver/unix#/usr/lib" \
$startdir/pkg/usr/lib/tclConfig.sh
TK:
sed -i \
"s#$startdir/src/tk$pkgver/unix#/usr/lib" \
$startdir/pkg/usr/lib/tkConfig.sh
The sed should be
sed -i.bak \
-e "/SRC/ s#$startdir/src/tcl$pkgver#/usr/include#" \
-e "/LIB/ s#$startdir/src/tcl$pkgver/unix#/usr/lib#" \
$startdir/pkg/usr/lib/tclConfig.sh
shows the path used to buld tcl/tk - /var/abs/extra/devel/... Problem still exists. I have tested my solution above which fixes it. Andrew's simpler sed statement above should do the same thing but I haven't tested.