[devel] Сборка heartbeat с --as-needed
Eugene Prokopiev
=?iso-8859-1?q?prokopiev_=CE=C1_stc=2Edonpac=2Eru?=
Ср Сен 27 14:28:45 MSD 2006
Konstantin A. Lepikhov пишет:
> Hi Eugene!
>
> Wednesday 27, at 01:20:33 PM you wrote:
>
>
>>>Проверьте путь к библиотеке. Также, возможно, вам надо будет поменять
>>>порядок директорий при сборке, чтобы libpe_status.la собиралась раньше
>>>чем libpengine.la
>
> а дальше начинается самое интересное:
> creating libpengine.la
> (cd .libs && rm -f libpengine.la && ln -s ../libpengine.la libpengine.la)
> /bin/sh ../../libtool --tag=CC --mode=link gcc -pipe -Wall -O2
> -march=pentium4 -Wall -Wmissing-prototypes -Wmissing-declarations
> -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith
> -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline
> -Wmissing-format-attribute -Wformat=2 -Wformat-security
> -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -ggdb3
> -funsigned-char -pipe -Wall -O2 -march=pentium4 -Wall
> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual
> -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute
> -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long
> -Wno-strict-aliasing -ggdb3 -funsigned-char -o ptest ptest-ptest.o
> ../../lib/clplumbing/libplumb.la ../../lib/pils/libpils.la
> ../../lib/crm/common/libcrmcommon.la ../../lib/crm/pengine/libpe_rules.la
> ../../lib/crm/pengine/libpe_status.la ../../lib/crm/cib/libcib.la
> libpengine.la -lglib-2.0 -lncurses ../../lib/crm/cib/libcib.la
> ../../lib/crm/transition/libtransitioner.la -lbz2 -lz -lxml2 -lc -luuid
> -lrt -ldl -lltdl
> gcc -pipe -Wall -O2 -march=pentium4 -Wall -Wmissing-prototypes
> -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement
> -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align
> -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2
> -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing
> -ggdb3 -funsigned-char -pipe -Wall -O2 -march=pentium4 -Wall
> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual
> -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute
> -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long
> -Wno-strict-aliasing -ggdb3 -funsigned-char -o .libs/ptest ptest-ptest.o
> ../../lib/clplumbing/.libs/libplumb.so ../../lib/pils/.libs/libpils.so
> ../../lib/crm/common/.libs/libcrmcommon.so
> ../../lib/crm/pengine/.libs/libpe_rules.so
> ../../lib/crm/pengine/.libs/libpe_status.so ./.libs/libpengine.so
> -lglib-2.0 -lncurses ../../lib/crm/cib/.libs/libcib.so
> ../../lib/crm/transition/.libs/libtransitioner.so -lbz2 -lz -lxml2 -lc
> -luuid -lrt -ldl -lltdl
> ../../lib/crm/pengine/.libs/libpe_status.so: undefined reference to
> `stdscr'
> ../../lib/crm/pengine/.libs/libpe_status.so: undefined reference to
> `wmove'
> ../../lib/crm/pengine/.libs/libpe_status.so: undefined reference to
> `printw'
> collect2: ld returned 1 exit status
> make: *** [ptest] 1
>
> printw/wmove - это символы из libslang, но вот libpe_status.so с ней
> линковаться не хочет, поскольку напрямую их не требует. Бага в ncurses?
странно, а у меня crm/pengine таки собрался. Вот что я сделал:
--- heartbeat-2.0.7/crm/pengine/Makefile.am 2006-06-09 23:26:04 +0300
+++ hasher/chroot/usr/src/heartbeat-2.0.7/crm/pengine/Makefile.am
2006-09-27 12:52:39 +0300
@@ -40,6 +40,7 @@
$(top_builddir)/lib/clplumbing/libplumb.la \
$(top_builddir)/lib/pils/libpils.la \
$(top_builddir)/lib/crm/common/libcrmcommon.la \
+ $(top_builddir)/lib/crm/cib/libcib.la \
$(top_builddir)/lib/crm/pengine/libpe_status.la \
libpengine.la \
$(GLIBLIB) \
@@ -59,6 +60,7 @@
noinst_HEADERS = allocate.h utils.h pengine.h
#utils.h pengine.h
+libpengine_la_LIBADD = $(top_builddir)/lib/crm/pengine/libpe_status.la
$(top_builddir)/lib/crm/cib/libcib.la
libpengine_la_LDFLAGS = -version-info 3:0:0
# -L$(top_builddir)/lib/pils -lpils -export-dynamic -module
-avoid-version
libpengine_la_SOURCES = pengine.c allocate.c utils.c \
--
С уважением, Прокопьев Евгений
Подробная информация о списке рассылки Devel