Project

General

Profile

Bug #4277

OpenIndiana hipster: 64-bit tclsh doesn't know where to look for modules

Added by Alexander Pyhalov almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
Start date:
2013-10-30
Due date:
2014-02-07
% Done:

100%

Estimated time:
2.00 h
Difficulty:
Medium
Tags:
tcl

Description

/usr/bin/amd64/tclsh doesn't know where to look for modules.

/usr/bin/amd64/tclsh
% package require Pgtcl
couldn't load file "/usr/lib/tcl8.5/pgtcl1.9/libpgtcl1.9.so": ld.so.1: tclsh8.5: fatal: /usr/lib/tcl8.5/pgtcl1.9/libpgtcl1.9.so: wrong ELF class: ELFCLASS32
% package require sqlite3
couldn't load file "/usr/lib/tcl8.5/sqlite3.7.17/libsqlite3.7.17.so": ld.so.1: tclsh8.5: fatal: /usr/lib/tcl8.5/sqlite3.7.17/libsqlite3.7.17.so: wrong ELF class: ELFCLASS32

Existing modules ship 64-bit version libraries in /usr/lib/tcl8.5/*/amd64/

History

#1

Updated by Alexander Pyhalov almost 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

Fixed it by the following workaround:

global tcl_platform
if {$tcl_platform(wordSize) == 8} {
  package ifneeded ModuleName  [list load [file join $dir amd64/libname.so]]
} else {
  package ifneeded ModuleName  [list load [file join $dir libname.so]]
}

It seems that the other possible sollution is to put modules in /usr/lib/moduleName and /usr/lib/amd64/moduleName. But I haven't checked that it's working and not sure if collisions exist between names of TCL modules and other libraries.

#2

Updated by Ken Mays over 6 years ago

  • Due date set to 2014-02-07
  • Category set to 10
  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100
  • Estimated time set to 2.00 h
  • Tags changed from needs-triage to tcl

Mentioned issue seems resolved as DB modules not built in this TCL build.
Tested Pkg: ,5.11-0.151.1.8.1:20131112T140325Z
Reviewed against latest changes from: https://hg.openindiana.org/upstream/oracle/userland-gate/file/9d9bd1ac4a6a/components/tcl

Also available in: Atom PDF