[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] libtool changes in place
From:       Alan Robertson <alanr () unix ! sh>
Date:       2001-05-31 13:58:52
[Download RAW message or body]

Alan Robertson wrote:
> 
> Alan Robertson wrote:
> 
> [snip]
> 
> > gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
> > -Wstrict-prototypes -Wshadow -Wpointer-arith -Wwrite-strings -Wcast-qual
> > -Wcast-align -Wnested-externs -Winline -Werror
> > -DVAR_RUN_D=\"/usr/local/var/run\"
> > -DVAR_LIB_D=\"/usr/local/var/lib/heartbeat\" -DHA_D=\"/usr/local/etc/ha.d\"
> > -DHALIB=\"/usr/local/lib/heartbeat\" -o .libs/heartbeat
> > ../libltdl/.libs/libltdlc.al -ldl .libs/heartbeatS.o -ldl -ldl -ldl -ldl
> > -ldl -ldl -ldl heartbeat.o auth.o config.o hb_api.o ha_if.o ha_malloc.o
> > ha_msg.o ha_msg_internal.o lock.o module.o ../stonith/.libs/libstonith.so
> > -ldl ../replace/.libs/libreplace.al -ldl -ldl -Wl,--export-dynamic
> > -Wl,--rpath -Wl,/usr/local/lib
> 
> What I see here seems odd... It's statically linking against all the
> dynamically loaded modules.  And, it puts the library
> ../libltdl/.lib/libltdlc.al first - *before* heartbeat.o which references
> it.
> 
> This is clearly not right.
> 
> I changed the Makefile.am a little to add the libtdlc.al file to the LDADD
> macro, and now it seems to work on my version of libtool...  However, I
> assume it's still statically linked - which is obviously broken.   But - a
> little progress is better than no progress...
> 
> Here's the diff...
> 
> diff -c -r1.4 Makefile.am
> *** Makefile.am 2001/05/26 17:38:01     1.4
> --- Makefile.am 2001/05/31 00:41:18
> ***************
> *** 61,67 ****
>                         ha_malloc.c ha_msg.c ha_msg_internal.c lock.c \
>                         module.c
>   heartbeat_LDADD               = $(top_builddir)/stonith/libstonith.la \
> !                       $(top_builddir)/replace/libreplace.la
>   heartbeat_LDFLAGS     = @LIBLTDL@ -export-dynamic -dlpreopen force \
>                         -dlopen self \
>                         -dlopen ping.la \
> --- 61,68 ----
>                         ha_malloc.c ha_msg.c ha_msg_internal.c lock.c \
>                         module.c
>   heartbeat_LDADD               = $(top_builddir)/stonith/libstonith.la \
> !                       $(top_builddir)/replace/libreplace.la   \
> !                       $(top_builddir)/libltdl/libltdlc.la
>   heartbeat_LDFLAGS     = @LIBLTDL@ -export-dynamic -dlpreopen force \
>                         -dlopen self \
>                         -dlopen ping.la \
> 
> It now makes but doesn't run correctly.  Off hand, it appears that none of
> the shared libraries get loaded.  But, it does run and try to start up - and
> it doesn't core dump ;-)  I'll put some debugging in the shared library
> loading code and see what's up...

OK.  It's a little closer.  Now it appears that it doesn't like the new
(longer and mangled) symbol names...

	-- Alan Robertson
	   alanr@unix.sh
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic