Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#97 The issue on library conflict

open
nobody
5
2013-04-13
2012-07-18
David Yu
No

When your system environment has installed libiberty, skyeye will link to your system libiberty, instead of third-part/libiberty/pic/libiberty.a

error log:
/bin/bash ../../../libtool --tag=CC --mode=link gcc -g -O2 -module -module -L../../../common -lcommon -lrt -o libemulator_common.la -rpath /opt/skyeye/lib/skyeye adler32.lo compress.lo crc32.lo deflate.lo gzio.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo json-lexer.lo json-parser.lo json-streamer.lo qjson.lo qbool.lo qdict.lo qfloat.lo qint.lo qlist.lo qstring.lo sockets.lo user-events-qemu.lo iolooper-select.lo input.lo notify.lo aio-android.lo async.lo cbuffer.lo charpipe.lo console.lo cutils.lo iohandler.lo osdep.lo qemu-config.lo qemu-error.lo qemu-malloc.lo qemu-option.lo qemu-sockets-android.lo qerror.lo qemu-char.lo hw-kmsg.lo config.lo core-init-utils.lo hw-events.lo qemu-setup.lo timezone.lo async-console.lo async-utils.lo charmap.lo framebuffer.lo keycode-array.lo hw-config.lo info.lo util.lo sync-utils.lo assert.lo bufprint.lo debug.lo dirscanner.lo filelock.lo ini.lo intmap.lo lineinput.lo mapfile.lo misc.lo panic.lo path.lo reflist.lo refset.lo stralloc.lo system.lo tempfile.lo vector.lo -lncurses -lpthread -lm -lc -liberty
libtool: link: gcc -shared .libs/adler32.o .libs/compress.o .libs/crc32.o .libs/deflate.o .libs/gzio.o .libs/infback.o .libs/inffast.o .libs/inflate.o .libs/inftrees.o .libs/trees.o .libs/uncompr.o .libs/zutil.o .libs/json-lexer.o .libs/json-parser.o .libs/json-streamer.o .libs/qjson.o .libs/qbool.o .libs/qdict.o .libs/qfloat.o .libs/qint.o .libs/qlist.o .libs/qstring.o .libs/sockets.o .libs/user-events-qemu.o .libs/iolooper-select.o .libs/input.o .libs/notify.o .libs/aio-android.o .libs/async.o .libs/cbuffer.o .libs/charpipe.o .libs/console.o .libs/cutils.o .libs/iohandler.o .libs/osdep.o .libs/qemu-config.o .libs/qemu-error.o .libs/qemu-malloc.o .libs/qemu-option.o .libs/qemu-sockets-android.o .libs/qerror.o .libs/qemu-char.o .libs/hw-kmsg.o .libs/config.o .libs/core-init-utils.o .libs/hw-events.o .libs/qemu-setup.o .libs/timezone.o .libs/async-console.o .libs/async-utils.o .libs/charmap.o .libs/framebuffer.o .libs/keycode-array.o .libs/hw-config.o .libs/info.o .libs/util.o .libs/sync-utils.o .libs/assert.o .libs/bufprint.o .libs/debug.o .libs/dirscanner.o .libs/filelock.o .libs/ini.o .libs/intmap.o .libs/lineinput.o .libs/mapfile.o .libs/misc.o .libs/panic.o .libs/path.o .libs/reflist.o .libs/refset.o .libs/stralloc.o .libs/system.o .libs/tempfile.o .libs/vector.o -Wl,-rpath -Wl,/home/skyeye/test/skyeye/common/.libs -Wl,-rpath -Wl,/opt/skyeye/lib/skyeye -L/home/skyeye/test/skyeye/common /home/skyeye/test/skyeye/common/.libs/libcommon.so -lrt -lncurses -lpthread -lm -lc -liberty -Wl,-soname -Wl,libemulator_common.so.0 -o .libs/libemulator_common.so.0.0.0
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libiberty.a(xmalloc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libiberty.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libemulator_common.la] 错误 1
make[2]:正在离开目录 `/home/skyeye/test/skyeye/android/objs/emulator_common'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/skyeye/test/skyeye'
make: *** [all] 错误 2

Discussion