[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dynamic linking with cc on OSF1

From: Paul . Emsley
Subject: dynamic linking with cc on OSF1
Date: Tue, 15 Jan 2002 14:02:07 GMT


I am tryig to compile guile-1.5.4 on OSF1 V5.0 Alpha with cc (not gcc).

It seems to me that something is wrong with dynamic-link, and I don't
know what to do.

(I tried gcc first, but there is some multiple definition of uint_8
(or something like that) in the include files - so I gave up).

I read last month's converation of Anthony W. Juckel and Martin
Grabmueller. My problem looks related but different.  In that
discussion, Bill Gribble says: 

 > The "File not found" error does NOT necessarily mean that the file was
 > not found.  What it means is that lt_dlopen was not able to find a
 > file that it could successfully open.  This means either that there's
 > no library named whatever you specified, OR all libraries with
 > matching names could not be dlopen'ed.  Libraries may be un-dlopenable
 > if they have unresolved external symbols.

This is interesting and may be related.
I have some other GNU software already built in ~/build/OSF1,
including libtool, amongst several other things, so I like
applications to link against these libraries instead of the
old/non-existant libraries elsewhere on the system.  So I define
LDFLAGS and CPPFLAGS routinely.

cop01 emsley/compile/guile-1.5.4> echo $LDFLAGS 
cop01 emsley/compile/guile-1.5.4> echo $CPPFLAGS 
cop01 emsley/compile/guile-1.5.4> echo $LD_LIBRARY_PATH

Howver this causes probles with configure:

checking whether to build static libraries... yes
creating libtool
checking for tgoto in -lncurses... no
checking for tgoto in -lcurses... yes
checking for readline in -lreadline... yes
checking for siginterrupt... yes
checking for rl_clear_signals... yes
checking for rl_cleanup_after_signal... yes
checking for rl_filename_completion_function... yes
checking for rl_pre_input_hook... yes
checking if readline clears SA_RESTART flag for SIGWINCH... yes
checking for rl_getc_function pointer in readline... yes
checking for strdup... yes
configure: creating ./config.status
config.status: creating Makefile
configure: configuring in libltdl
configure: running /bin/ksh './configure'  CC=cc
      --enable-ltdl-convenience --cache-file=/dev/null --srcdir=.
configure: warning: CC=cc: invalid host type
configure: warning: CPPFLAGS=-I/y/people/emsley/build/OSF1/include:
      invalid host type
configure: error: can only configure for one host and one target at a
configure: error: /bin/ksh './configure' failed for libltdl
sed: Cannot find or open file confdefs.h.

I hesitate to suggest it, but this looks like a configure bug. 

So I undefine LDFLAGS and CPPFLAGS and we can now get configure to
complete - and I can buile a guile executable, but there is no
readline usage available for it :-(

And we are told the following:

checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for dlopen in -ldl... no
checking for dlopen... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dld_link in -ldld... no
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... unknown

I don't know if that is bad or not...

cop01 emsley/guile-test/lib> guile
guile>  (load-extension "libguile-srfi-srfi-13-14" "scm_init_srfi_13")
guile> cop01 emsley/guile-test/lib> 

So far so good.  This directory contains

But in some other directory things are not so good:

cop01 /y/people/emsley>     guile
guile> %load-path
      "/y/people/emsley/guile-test/share/guile" ".")
guile>  (load-extension "libguile-srfi-srfi-13-14" "scm_init_srfi_13")

In standard input:
   4: 0* [load-extension "libguile-srfi-srfi-13-14"

standard input:4:2: In procedure dynamic-link in expression
      (load-extension "libguile-srfi-srfi-13-14" "scm_init_srfi_13"):
standard input:4:2: file: "libguile-srfi-srfi-13-14", message: "file not found"
ABORT: (misc-error)

cop01 /y/people/emsley> echo $LTDL_LIBRRAY_PATH
cop01 /y/people/emsley> ls $LTDL_LIBRRAY_PATH
total 7337
   8 ./                                  1768*
   8 ../                                   13 libguilereadline.a
 328 libguile-srfi-srfi-13-14.a             1*
   1*           0
   0          32*
 224*    40 libguilerxspencer.a
 128 libguile-srfi-srfi-4.a                 1*
   1*               0
   0              60*
 106*       160 librxspencer.a
4344 libguile.a                             1*
   1*                           0
   0                         112*

However, following Martin's suggestion:

cop01 emsley/guile-test/lib> guile 
guile>  (dynamic-link "") 
#<dynamic-object "">
guile>  (dynamic-link "libc")
standard input:2:2: In procedure dynamic-link in expression
      (dynamic-link "libc"):
standard input:2:2: file: "libc", message: "file not found"
ABORT: (misc-error)

So my guess as to why dynamic-link does not work is due to my
undefining of the environment dirs - and that is because configure
fails if I do not do so.  Is that the way of things?

Thanks for reading this :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]