Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Dynamic loading in Tcl for QNX/RtP

Closed / Fixed219410ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:12:35
OriginalBugID: 6354 Bug
Version: 8.3.2
SubmitDate: '2000-10-10'
LastModified: '2000-10-18'
Severity: SER
Status: UnAssn
Submitter: techsupp
ChangedBy: ericm
OS: Other
OSVersion: QNX-6.00
Machine: x86
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Susan LoVerso

ReproducibleScript:
./configure --enable-shared --enable-load
(Note it shouldn't need those, but I used them just to force it to try on QNX)

ObservedBehavior:
The configure script when run on QNX RtP (Neutrino) decides that it cannot figure out how
to do dynamic loading and as such uses tclLoadNone.c.  QNX RtP supports the dlopen
function.  Although the diff given is for configure, the changes really need to go back into
the tcl.m4 file.  

1.  The configure script is looking in -ldl for dlopen.  On QNX it is in the C library.  This
fails on QNX because -ldl fails due to that library not existing.  For QNX there should not
be any library specification for dlopen.
2.  In Step 3 where we determine our DL_OBJS, etc based on $system, there needs to
be a case for QNX.  NOTE:  In my diff below, I used QNX* because I only have access
to one version of QNX and that was sufficient for my needs.  You may need to change
the QNX* to QNX-6*, as it may (very likely) not be the right fix for QNX 4.25.  I do not
have access to a QNX 4.25 system to know.

Patch:
*** configure.orig      Tue Aug  8 19:17:11 2000
--- configure   Tue Oct 10 13:57:38 2000
***************
*** 4720,4733 ****
      # Step 2: check for existence of -ldl library.  This is needed because
      # Linux can use either -ldl or -ldld for dynamic loading.

!     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "configure:4725: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 4733 "configure"
  #include "confdefs.h"
--- 4720,4733 ----
      # Step 2: check for existence of -ldl library.  This is needed because
      # Linux can use either -ldl or -ldld for dynamic loading.

!     echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "configure:4725: checking for dlopen" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="$LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 4733 "configure"
  #include "confdefs.h"
***************
*** 5194,5199 ****
--- 5194,5210 ----
                fi
            fi

+           ;;
+       QNX*)
+           # QNX RTP
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="ld -Bshareable -x"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
+           DL_LIBS=""
+           LDFLAGS=""
+           LD_SEARCH_FLAGS=""
            ;;
        RISCos-*)
            SHLIB_CFLAGS="-G 0"

PatchFiles:
./configure, but really tcl.m4
hobbs Ticket [219410ffff]: 1 change [History diff]2001-04-03 13:30:43
dgp Ticket [219410ffff]: 1 change [History diff]2001-04-05 06:52:44
hobbsplain2001-08-24 02:14:48
Logged In: YES 
user_id=72656

Limited it to QNX-6* and added it to 8.4a4cvs and 8.3.4cvs.
Log in (anonymous is fine) to add a comment.