Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7f0e0358c708fbc0b42c17c469f9b74927643bdd
Ticket: 443170ffffffffffffffffffffffffffffffffff
Tcl fails to compile on FreeBSD 2.2.x
User & Date: lloydlim on 2001-07-20 19:18:32
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl fails to compile on our FreeBSD 2.2.5, 2.2.6, and 2.2.7 machines.  The error printed is:
    
    cc  tclAppInit.o -L/n/bmrca/users/lim/src/mash-code/tcl8.3/unix -ltcl83 -lm -lc
     -Wl,-rpath,/usr/local/lib -o tclsh
    ld: /usr/local/lib: malformed input file (not rel or archive)
    *** Error code 1
    
    Stop.
    
    The message is kind of confusing.  The problem is that ld does not support the -rpath option.  
    After watching configure and examining tcl.m4, these machines have dlfcn.h but do not have ELF.
    
    Here is a patch to fix this problem:
    
    --- tcl.m4.old  Fri Jul 20 10:51:31 2001
    +++ tcl.m4.new  Fri Jul 20 11:50:21 2001
    @@ -853,18 +853,20 @@
                    DL_OBJS="tclLoadDl.o"
                    DL_LIBS=""
                    LDFLAGS=""
    -               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                    AC_MSG_CHECKING(for ELF)
                    AC_EGREP_CPP(yes, [
     #ifdef __ELF__
            yes
     #endif
    -               ],
    +               ], [
                        AC_MSG_RESULT(yes)
    -                   SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
    +                    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    +                   SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
    +                ], [
                        AC_MSG_RESULT(no)
    +                    LD_SEARCH_FLAGS='-Wl,-L${LIB_RUNTIME_DIR}'
                        SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
    -               )
    +               ])
                ], [
                    SHLIB_CFLAGS=""
                    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
    
    
  4. foundin changed to: "obsolete: 8.3.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "lloydlim"
  9. subsystem changed to: "53. Configuration and Build Tools"
  10. title changed to: "Tcl fails to compile on FreeBSD 2.2.x"
  11. type changed to: "Bug"