[devel] heartbeat 2.0.8 и снова --as-need
Eugene Prokopiev
=?iso-8859-1?q?prokopiev_=CE=C1_stc=2Edonpac=2Eru?=
Ср Мар 14 11:36:42 MSK 2007
Здравствуйте!
Собираю heartbeat 2.0.8:
gcc -g -O2 -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 -Werror -ggdb3
-funsigned-char -g -O2 -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 -Werror -ggdb3
-funsigned-char -o .libs/atest atest-atest.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/cib/.libs/libcib.so ../../lib/apphb/.libs/libapphb.so
../../lib/hbclient/.libs/libhbclient.so -lglib-2.0 -lbz2 -lz -lxml2 -lc
-luuid -lrt -ldl -lltdl -Wl,--rpath -Wl,/usr/local/lib
../../lib/crm/common/.libs/libcrmcommon.so: undefined reference to
`cl_perror'
...
../../lib/crm/common/.libs/libcrmcommon.so: undefined reference to
`cl_log_set_uselogd'
collect2: ld returned 1 exit status
gmake[2]: *** [atest] Error 1
gmake[2]: Leaving directory `/usr/src/RPM/BUILD/heartbeat-2.0.8/crm/crmd'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/src/RPM/BUILD/heartbeat-2.0.8/crm'
make: *** [all-recursive] Error 1
Читаю http://lists.altlinux.org/pipermail/sisyphus/2006-July/084838.html
и делаю:
$ find -name *.so | xargs grep cl_log_set_uselogd
Binary file ./lib/crm/common/.libs/libcrmcommon.so matches
Binary file ./lib/clplumbing/.libs/libplumb.so matches
$ nm -CD lib/crm/common/.libs/libcrmcommon.so | grep cl_log_set_uselogd
U cl_log_set_uselogd
$ nm -CD lib/clplumbing/.libs/libplumb.so | grep cl_log_set_uselogd
0000d590 T cl_log_set_uselogd
Итак, вписать надо -lplumb, ищем теперь куда:
$ find -name Makefile.am | xargs grep libcrmcommon_la_LIBADD
./lib/crm/common/Makefile.am:libcrmcommon_la_LIBADD =
$(top_builddir)/lib/apphb/libapphb.la
Теперь модифицируем lib/crm/common/Makefile.am, добавив -lplumb в конец
строки с libcrmcommon_la_LIBADD, и пересобираем:
gcc -shared .libs/ipc.o .libs/msg.o .libs/utils.o .libs/xml.o
.libs/ctrl.o .libs/iso8601.o .libs/iso8601_fields.o -Wl,--rpath
-Wl,/usr/src/RPM/BUILD/heartbeat-2.0.8/lib/apphb/.libs -Wl,--rpath
-Wl,/usr/local/lib ../../../lib/apphb/.libs/libapphb.so -lplumb -lbz2
-lz -lxml2 -lc -luuid -lrt -ldl -lltdl -Wl,-soname
-Wl,libcrmcommon.so.1 -o .libs/libcrmcommon.so.1.0.1
/usr/bin/ld: cannot find -lplumb
collect2: ld returned 1 exit status
gmake[3]: *** [libcrmcommon.la] Error 1
gmake[3]: Leaving directory
`/usr/src/RPM/BUILD/heartbeat-2.0.8/lib/crm/common'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/src/RPM/BUILD/heartbeat-2.0.8/lib/crm'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/src/RPM/BUILD/heartbeat-2.0.8/lib'
make: *** [all-recursive] Error 1
Что я сделал неправильно?
--
С уважением, Прокопьев Евгений
Подробная информация о списке рассылки Devel