Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4a52198ee5f81d033a42b4bf20a7ad9ec1f99fa7
Ticket: 665431ffffffffffffffffffffffffffffffffff
load fails with undefined symbol message (suggested fix)
User & Date: duncanroe on 2003-01-10 01:04:08
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Could not load a .so that used 8 other .so's. At least
    one of the 8 had
    an unused function in it which referred to a function
    in another of the
    8. This was reported as undefined.
    
    I encountered this in 8.0p2 but it looks as if 8.4.1
    will have the same
    problem.
    
    Sorry there's no test case but the following patch
    fixed it for me:
    
    --- tclLoadDl.c 2003/01/09 18:20:23     1.1
    +++ tclLoadDl.c 2003/01/09 18:20:26
    @@ -70,7 +70,7 @@
         VOID *handle;
         Tcl_DString newName;
     
    -    handle = dlopen(fileName, RTLD_NOW | RTLD_GLOBAL);
    +    handle = dlopen(fileName, RTLD_LAZY |
    RTLD_GLOBAL);
         if (handle == NULL) {
            Tcl_AppendResult(interp, "couldn't load file
    \"", fileName,
                    "\": ", dlerror(), (char *) NULL);
    
    I.e. don't try to resolve stuff we may never need.
    
    A "proper" patch would have #ifdef RTLD_LAZY etc.
    
    Platform: Linux 2.4.18, libc6 2.2.5, i486
    
  4. foundin changed to: "obsolete: 8.0p2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "duncanroe"
  9. subsystem changed to: "40. Dynamic Loading"
  10. title changed to:
    load fails with undefined symbol message (suggested fix)
    
  11. type changed to: "Bug"