I wish to transplant Heartbeat to ppc-85xx. I use ELDK to cross-compile heartbeat to ppc executable program on x86 linux.
During the process, I have a problem. I want to put all of ppc version library into /usr/local/ppc_85xx/usr/lib/, for example
libglib.so, and make heartbeat into /usr/local/ppc_85xx/usr/local/. I set environment CC, LD, LDFLAGS according to my requirement.
export CC=/root/ELDK/usr/bin/ppc_85xx-gcc
export LDFLAGS=-L/usr/local/ppc_85xx/lib -L/usr/local/ppc_85xx/usr/local/lib -L/usr/local/ppc_85xx/usr/lib

I use command in heartbeat directory:
./bootstrap --host powerpc --prefix=/usr/local/ppc_85/usr/local
When I use 'make' to compile heartbeat, an error occurs:

**************************
/bin/sh ../../libtool --mode=link /root/ELDK/usr/bin/ppc_85xx-gcc -g -O2 -fno-strict-aliasing  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long   -ggdb3 -DST_TEXTDOMAIN='"stonith"' -DSTONITH_MODULES='"/usr/local/ppc_85xx/usr/local/lib/stonith/plugins"' -DLOCALEDIR='"/usr/share/locale"' -g -O2 -fno-strict-aliasing  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long   -ggdb3  -L/usr/local/ppc_85xx/lib -L/usr/local/ppc_85xx/usr/local/lib -L/usr/local/ppc_85xx/usr/lib -o stonith -ldl ../../libltdl/libltdlc.la  -export-dynamic -dlopen force -dlopen self main.o ../../libltdl/libltdlc.la libstonith.la  -glib -lc -lnet -luuid -luuid -lrt -ldl
libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support.
rm -f .libs/stonith.nm .libs/stonith.nmS .libs/stonith.nmT
creating .libs/stonithS.c
generating symbol list for `stonith'
extracting global C symbols from `main.o'
(cd .libs && /root/ELDK/usr/bin/ppc_85xx-gcc -c -fno-builtin -fno-rtti -fno-exceptions "stonithS.c")
cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC
rm -f .libs/stonithS.c .libs/stonith.nm .libs/stonith.nmS .libs/stonith.nmT
/root/ELDK/usr/bin/ppc_85xx-gcc -g -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -ggdb3 -DST_TEXTDOMAIN=\"stonith\" -DSTONITH_MODULES=\"/usr/local/ppc_85xx/usr/local/lib/stonith/plugins\" -DLOCALEDIR=\"/usr/share/locale\" -g -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -ggdb3 -o stonith .libs/stonithS.o main.o -Wl,--export-dynamic  -L/usr/local/ppc_85xx/lib -L/usr/local/ppc_85xx/usr/local/lib -L/usr/local/ppc_85xx/usr/lib ../../libltdl/.libs/libltdlc.a ./.libs/libstonith.a -L/root/sentinel_ha/heartbeat/heartbeat/lib/pils -L/root/sentinel_ha/heartbeat/heartbeat/lib/pils/.libs /root/sentinel_ha/heartbeat/heartbeat/lib/pils/.libs/libpils.a /usr/lib/libglib.so -lc -lnet -luuid -lrt -ldl
/usr/lib/libglib.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
*************************************
From above information, I find, in command, ld link /usr/lib/libglib.so other than /usr/local/ppc_85xx/usr/lib/libglib.so.
Though, there is a x86 version glib in /usr/lib/, ld should link the library in /usr/local/ppc_85xx/usr/lib.
why ld uses complete lib name other than -lglib, furthermore, I remove -lglib in Makefile.am as experiment, and rebuild.
the error occurs again. I look for libtool document, I find, perhaps the automake computes the libs_dependencies variable automatically.
but why it finds glib in /usr/lib/, not according to LDFLAFS.

anyway, thanks

Chen yue
 
 
 







你 不 想 试 试 今 夏 最 “酷” 的 邮 箱 吗 ?
蕴 涵 中 华 传 统 文 化 于 世 界 一 流 科 技 之 中,创 新 Ajax 技 术,126 “D 计 划”火 热 体 验 中 !
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to