Re: [ooc-compiler] libgc - how to make dynamic?
Brought to you by:
mva
|
From: Michael v. A. <mi...@de...> - 2002-02-12 12:52:06
|
Alan Freed <Ala...@gr...> writes:
> Hi,
>
> I have tried to make OOC dynamically load its garbage collector with no
> luck.
> The only way I can get it to work is to have gc.a statically linked into
> the compiler
> when I build it. Can anyone offer some suggestions?
>
> First, here is some background information.
>
> I run RedHat linux versions 7.1 and 7.2, which have libtool
> installed on them. GC does not come with RedHat, nor is an rpm
> version available for it (to the best of my knowledge), so I built
> the GC from scratch and copied libgc.so.0 into the directory
> /usr/local/lib, which is in my path (it appears in /etc/ld.so.conf).
>
> When I remove /gc from my /oo2c directory, make the distribution
> clean, and rerun configure, I get an error message stating that
> configure could not locate an installed libgc... The only way I can
> build oo2c is leaving /gc under /oo2c, and when I do this the
> building of oo2c statically binds the garbage collector to it. This
> is verified by executing ldd /usr/local/bin/oo2c where libgc.so.0 is
> found missing (the other dynamic links are present, when compared
> with Stewart Greenhill's output).
The test for libgc performed by configure tries to link against the
lib. Possible causes for problems:
a) there is a stale config.cache file from a previous configure run
("make distclean" should have removed this, so this probably not
the reason here)
b) the shared library was installed incompletely; IRIC, there must be
at least a link without the version suffix to the "real" so file,
like
mia@freeman:/usr/lib$ ls -l libgc.so*
lrwxrwxrwx 1 root root 10 Dec 30 1999 libgc.so -> libgc.so.0*
-rwxr-xr-x 1 root root 89189 Oct 29 1999 libgc.so.0*
c) the libgc so file has wrong permissions (rx for world is probably
required)
d) the shared library cache must be updated by running ldconfig (with
-v it lists all the shared libs it picked up)
Hope this helps.
-- mva
|