23.03.2013 08:27, Viacheslav Dubrovskyi пишет: > Hi. > > I'm building a package for my distributive. Everything is built, but the > package does not pass our internal tests. I get errors like this: > verify-elf: ERROR: ./usr/lib/libpe_status.so.4.1.0: undefined symbol: > get_object_root > > It mean, that libpe_status.so not linked with libcib.so where defined > get_object_root. I can easy fix it adding > libpe_status_la_LIBADD = $(top_builddir)/lib/cib/libcib.la > in lib/pengine/Makefile.am > > But for this I need build libcib before lib/pengine. And it's impossible > too, because libcib used symbols from lib/pengine. So we have situation, > when two library must be linked to each other. > > And this is very bad because then the in fact it should be one library. > Or symbols should be put in a third library, such as common. > > Can anyone comment on this situation? Patch for fix this error.
-- WBR, Viacheslav Dubrovskyi
diff --git a/Makefile.am b/Makefile.am index 4f742e4..fdf19eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = autogen.sh ConfigureMe README.in libltdl.tar m4/gnulib MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar -CORE = $(LIBLTDL_DIR) replace include lib mcp pengine cib crmd fencing lrmd tools xml +CORE = $(LIBLTDL_DIR) replace include lib mcp cib pengine crmd fencing lrmd tools xml SUBDIRS = $(CORE) cts extra doc doc_DATA = AUTHORS COPYING COPYING.LIB diff --git a/lib/Makefile.am b/lib/Makefile.am index 5563819..4ebd91b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -39,7 +39,7 @@ clean-local: rm -f *.pc ## Subdirectories... -SUBDIRS = gnu common pengine transition cib fencing services lrmd cluster +SUBDIRS = gnu common cib pengine transition fencing services lrmd cluster DIST_SUBDIRS = $(SUBDIRS) ais if BUILD_CS_PLUGIN diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 6ab02fc..c73a329 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -32,11 +32,14 @@ if ENABLE_ACL libcib_la_SOURCES += cib_acl.c endif -libcib_la_LDFLAGS = -version-info 3:0:0 $(top_builddir)/lib/common/libcrmcommon.la $(CRYPTOLIB) \ - $(top_builddir)/lib/pengine/libpe_rules.la - +libcib_la_LDFLAGS = -version-info 3:0:0 -L$(top_builddir)/lib/pengine/.libs +libcib_la_LIBADD = $(CRYPTOLIB) $(top_builddir)/lib/pengine/libpe_rules.la $(top_builddir)/lib/common/libcrmcommon.la libcib_la_CFLAGS = -I$(top_srcdir) +libcib_la_DEPENDENCIES = libpe_rules +libpe_rules: + make -C ../../lib/pengine libpe_rules.la + clean-generic: rm -f *.log *.debug *.xml *~ diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index 9cb2392..a173522 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -28,10 +28,11 @@ noinst_HEADERS = unpack.h variant.h libpe_rules_la_LDFLAGS = -version-info 2:2:0 libpe_rules_la_SOURCES = rules.c common.c +libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la libpe_status_la_LDFLAGS = -version-info 5:0:1 libpe_status_la_SOURCES = status.c unpack.c utils.c complex.c native.c group.c clone.c rules.c common.c -libpe_status_la_LIBADD = @CURSESLIBS@ +libpe_status_la_LIBADD = @CURSESLIBS@ $(top_builddir)/lib/common/libcrmcommon.la $(top_builddir)/lib/cib/libcib.la clean-generic: rm -f *.log *.debug *~ diff --git a/lib/services/Makefile.am b/lib/services/Makefile.am index 3ee3347..ef8fbc3 100644 --- a/lib/services/Makefile.am +++ b/lib/services/Makefile.am @@ -26,7 +26,7 @@ noinst_HEADERS = upstart.h systemd.h services_private.h libcrmservice_la_SOURCES = services.c services_linux.c libcrmservice_la_LDFLAGS = -version-info 1:0:0 libcrmservice_la_CFLAGS = $(GIO_CFLAGS) -libcrmservice_la_LIBADD = $(GIO_LIBS) +libcrmservice_la_LIBADD = $(GIO_LIBS) $(top_builddir)/lib/common/libcrmcommon.la if BUILD_UPSTART libcrmservice_la_SOURCES += upstart.c diff --git a/lib/transition/Makefile.am b/lib/transition/Makefile.am index 49c7113..7279c59 100644 --- a/lib/transition/Makefile.am +++ b/lib/transition/Makefile.am @@ -29,6 +29,7 @@ libtransitioner_la_SOURCES = unpack.c graph.c utils.c libtransitioner_la_LDFLAGS = -version-info 2:0:0 libtransitioner_la_CFLAGS = -I$(top_builddir) +libtransitioner_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la clean-generic: rm -f *~
_______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org