|
From: Techentin, R. W. <tec...@ma...> - 2004-11-03 14:28:16
|
Joe English wrote:
> An alternate approach: compile with "-DNO_PRIVATE_HEADERS"
> and link against libtk8.4.so (as well as libtkstub8.4.a).
> The build system in the "generic" subdirectory does this
> by default, or just hack the Makefile by hand.
>
> This _might_ not work on HP-UX, since dynamic linking
> reportedly works differently there, but it's worked for
> me on all the platforms I've tried.
Thanks for the help, Joe. The generic build works on HP-UX 11.0, once I
changed the compile and link flags for the native compilers. I see that the
starkit version, tile05.kit, includes a little support for HP-UX in
pkgIndex.tcl. So I stuffed HP-UX-hppa/tile05.sl into lib/tile0.5, and the
kit seems to work nicely on HP-UX. :-)
> This is bug #695441 "tcl_findLibrary does not look in
> $::auto_path". Probably the best way to fix it is to hack
> pkgIndex.tcl to set $::tile_library before loading the extension:
>
> |package ifneeded tile 0.5 \
> | "set ::tile_library $dir ; load [file join $dir tile[info
> |sharedlibext]]]"
>
> Alternately, you can set the environment variable
> $TILE_LIBRARY to point to the install directory.
Setting ::tile_library didn't seem to work, but setting env(TILE_LIBRARY),
as is done in the starkit pkgIndex.tcl, seems to work. But I had a devil of
a time getting the starkit to play nicely with ActiveTcl, which includes
tile0.3. I finally realized that the pkgIndex.tcl files set
env(TILE_LIBRARY) *outside* of the package ifneeded script. So
env(TILE_LIBRARY) may change depending on which version is in the auto_path
first. I would suggest making pkgIndex.tcl work like this:
if {![package vsatisfies [package provide Tcl] 8.4]} { return }
if {[package vsatisfies [package provide Tcl] 8.5]
|| [package vsatisfies [info patchlevel] 8.4.6]} {
# use the stubs linked version
package ifneeded tile 0.5 "
[list set ::env(TILE_LIBRARY) $dir]
[list load [file join $dir $platform tile05[info
sharedlibextension]]]"
} else {
return
}
Bob
--
Bob Techentin tec...@ma...
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/
|