libpgtcl should be linked against the tcl stub library
Massimo Dal Zotto
dz at debian.org
Fri Jun 3 14:45:56 UTC 2005
Package: libpgtcl
Version: 7.4.7-2ubuntu2.1
Severity: wishlist
The libpgtcl library should be linked against the (static) libtclstub8.x.a
library instead of libtcl8.x.so so that it doesn't depend on a specific
version of Tcl/Tk but can be used indifferently with any version >= 8.1.
The same should be done also for the tcl pl language.
Use of libtclstub is described in http://www.tcl.tk/doc/howto/stubs.html
and basically consists in adding a call to Tcl_InitStubs() in the
Pgtcl_Init() function and linking against -ltclstub8.4 instead
of -ltcl8.4:
--- src/interfaces/libpgtcl/pgtcl.orig.c 2004-02-02 02:00:58.000000000 +0100
+++ src/interfaces/libpgtcl/pgtcl.c 2005-06-03 16:34:02.400879760 +0200
@@ -31,6 +31,12 @@
{
double tclversion;
+#ifdef TCL_SUPPORTS_STUBS
+ if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ return TCL_ERROR;
+ }
+#endif
+
/*
* finish off the ChannelType struct. Much easier to do it here then
* to guess where it might be by position in the struct. This is
and in libpgtcl/Makefile something like this:
TCL_SUPPORTS_STUBS=1
ifdef TCL_SUPPORTS_STUBS
CFLAGS += -DTCL_SUPPORTS_STUBS
TCL_LIB_SPEC = -L/usr/lib -ltclstub8.4
TCL_LIBS =
endif
The Makefile changes should probably be done using the configure script.
I have succesfully built by hand a stub-enabled libpgtcl.so. It works fine
for me and it doesn't depend on a specific tcl library:
$ ldd libpgtcl.so.2
libpq.so.3 => /usr/lib/libpq.so.3 (0xb7fcb000)
libssl.so.0.9.7 => /usr/lib/i686/cmov/libssl.so.0.9.7 (0xb7f9c000)
libcrypto.so.0.9.7 => /usr/lib/i686/cmov/libcrypto.so.0.9.7 (0xb7ea5000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb7e3f000)
libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7e12000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7e02000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cd5000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7cc4000)
libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7caf000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7cac000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7c8b000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7c88000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.10-5-686
Locale: LANG=C, LC_CTYPE=it_IT (charmap=ISO-8859-1)
Versions of packages libpgtcl depends on:
ii libc6 2.3.2.ds1-20ubuntu13 GNU C Library: Shared libraries an
ii libkrb53 1.3.6-1 MIT Kerberos runtime libraries
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libpq3 7.4.7-2ubuntu2.1 PostgreSQL C client library
ii libreadline4 4.3-15 GNU readline and history libraries
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii libx11-6 6.8.2-10 X Window System protocol client li
ii tcl8.4 8.4.7-1ubuntu1 Tcl (the Tool Command Language) v8
ii tk8.3 [wish] 8.3.5-4 Tk toolkit for Tcl and X11, v8.3 -
ii tk8.4 [wish] 8.4.9-1 Tk toolkit for Tcl and X11, v8.4 -
ii xlibs 6.8.2-10 X Window System client libraries m
ii zlib1g 1:1.2.2-4ubuntu1 compression library - runtime
--
Massimo Dal Zotto
More information about the ubuntu-users
mailing list