Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 70cbbbbf5ba5ab273bcaa48324e879cdcfed7de5
Ticket: 874194ffffffffffffffffffffffffffffffffff
missing -lm when building shared lib on OSF/1
User & Date: rcalmbac on 2004-01-10 00:08:48
Changes

  1. assignee changed to: "stwo"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    For Tcl 8.4.5, when building the shared lib (configure
    --enable-shared) on Digital OSF/1 V4.0, user
    executables that link against libtcl8.4.so (-ltcl) and
    that don't need the math library libm.so themselves,
    suddenly need a -lm on the link command line, otherwise
    there will be runtime errors due to unresolved symbols
    from libm.so. Previously (with Tcl 8.3.4), it was not
    necessary to have the -lm flag, so the Tcl upgrade
    breaks existing user Makefiles.
    
    I found that building libtcl8.4.so with -lm on the link
    command line solves the problem. This seems to put
    enough information into libtcl8.4.so for the runtime
    linker to be able to resolve all symbols. So instead of
    
    ld -shared -expect_unresolved "*" -o libtcl8.4.so 
    ${OBJS} -rpath
    /work/cvim1/src/tcl/tcl8.4.5/install/osf1-alpha/lib
    
    I do
    
    ld -shared -expect_unresolved "*" -o libtcl8.4.so 
    ${OBJS} -lm -rpath
    /work/cvim1/src/tcl/tcl8.4.5/install/osf1-alpha/lib
    
    This is easily accomplished by doing
    
    $ gmake SHLIB_LD_LIBS=-lm
    
    So, a way to fix this problem would be to change line
    1345 in unix/tcl.m4 from
    
                SHLIB_LD_LIBS=""
    
    to
    
                SHLIB_LD_LIBS="-lm"
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rcalmbac"
  9. subsystem changed to: "53. Configure and Build Tools"
  10. title changed to: "missing -lm when building shared lib on OSF/1"
  11. type changed to: "Patch"