[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 |
Hi,
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
-L/y/people/emsley/build/OSF1/lib
cop01 emsley/compile/guile-1.5.4> echo $CPPFLAGS
-I/y/people/emsley/build/OSF1/include
cop01 emsley/compile/guile-1.5.4> echo $LD_LIBRARY_PATH
/y/people/emsley/build/OSF1/lib:/y/people/emsley/guile-test/lib
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
CPPFLAGS=-I/y/people/emsley/build/OSF1/include
LDFLAGS=-L/y/people/emsley/build/OSF1/lib
--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
time
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:
[snip]
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
[snip]
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 libguile-srfi-srfi-13-14.so.
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/site"
"/y/people/emsley/guile-test/share/guile/1.5.4"
"/y/people/emsley/guile-test/share/guile" ".")
guile> (load-extension "libguile-srfi-srfi-13-14" "scm_init_srfi_13")
Backtrace:
In standard input:
4: 0* [load-extension "libguile-srfi-srfi-13-14"
"scm_init_srfi_13"]
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
/y/people/emsley/guile-test/lib
cop01 /y/people/emsley> ls $LTDL_LIBRRAY_PATH
total 7337
8 ./ 1768 libguile.so.10.0.0*
8 ../ 13 libguilereadline.a
328 libguile-srfi-srfi-13-14.a 1 libguilereadline.la*
1 libguile-srfi-srfi-13-14.la* 0 libguilereadline.so@
0 libguile-srfi-srfi-13-14.so@ 32
libguilereadline.so.0.0.0*
224 libguile-srfi-srfi-13-14.so.0.0.0* 40 libguilerxspencer.a
128 libguile-srfi-srfi-4.a 1 libguilerxspencer.la*
1 libguile-srfi-srfi-4.la* 0 libguilerxspencer.so@
0 libguile-srfi-srfi-4.so@ 60
libguilerxspencer.so.0.0.1*
106 libguile-srfi-srfi-4.so.0.0.0* 160 librxspencer.a
4344 libguile.a 1 librxspencer.la*
1 libguile.la* 0 librxspencer.so@
0 libguile.so@ 112 librxspencer.so.0.0.1*
However, following Martin's suggestion:
cop01 emsley/guile-test/lib> guile
guile> (dynamic-link "libc.so")
#<dynamic-object "libc.so">
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 :-)
Paul.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- dynamic linking with cc on OSF1,
Paul . Emsley <=