#2 TkCombobox fails with Linux objrexx

open
Mark Hessling
None
5
2002-01-07
2001-12-31
Marty Wagner
No

The rexxtk.rexx demo program fails with error 43 on
line 114. The error is 'Could not find routine
"TKCOMBOBOX"'. If I comment out lines 114 through 126,
The program will start but it creates 3 main windows.
All functions except 'tree' work. The tree function
fails with error 43 and 'Could not find routine
"TKTREE"'. If I comment out the 'If TkTreeLoadFuncs...'
and 'If TkComboboxLoadFuncs...' statements, the extra
main windows are not created.

This problem occurs when Rexx/Tk is compiled and
executed with Object Rexx on Linux. It did not occur
when Rexx/Tk was compiled and executed using Regina on
Linux or when using Regina on Windows.

Discussion

  • Mark Hessling
    Mark Hessling
    2002-01-07

    • assigned_to: nobody --> rexx
     
  • Marty Wagner
    Marty Wagner
    2002-01-09

    Logged In: YES
    user_id=324852

    The problem is caused by the way the shared libraries are
    being linked and loaded. Each of the lib___.so libraries
    include the rexxtk and rxpack executables. The rexx
    callable functions are in the base, tree, etc. executables.
    When rexxtk is loaded dynamicly, a copy of rxpack is loaded
    and the reference to InitialisePackage is resolved to use
    the function in rexxtkbase. When rexxtktree is loaded
    dynamicly, it is dynamicly relinked to the rxpack that is
    already loaded but the reference to InitialisePackage in
    rxpack still points to rexxtkbase not rexxtktree. As a
    result when the loadfuncs for tree is called a second base
    initialise is performed and no initialise is done for tree.
    Linking the lib___.so files with the -Bsymbolic option will
    cause the dynamic loaded to link the main file (tree,
    combo, etc.) in the lib to the rxpack in the lib___.so
    file. The wastes some memory (multiple copies of rxpack)
    but allows the loadfuncs for a package to execute the
    correct the InitialisePackage routine. I changed the
    Makefile statement that defines LD_RXLIB1 to include the
    option -Wl,-Bsymbolic. If I can figure out what changes
    need to be made to the configure script to generate the
    correct Makefile I will post that also.

     
  • Mark Hessling
    Mark Hessling
    2002-01-09

    Logged In: YES
    user_id=86185

    I've changed the Rexx/Tk architecture in 2.0 to allow
    Rexx/Tk to work under OS/2. This change simplifies the use
    of Rexx/Tk, in that you don't need to dynamically load
    the "extensions". This change should alleviate the problem
    you are experiencing. Download the Rexx/Tk 2.0 beta and try
    that.