libtool: link: arm-linux-gcc -shared .libs/libgstreamer_0.10_la-gst.o .libs/libgstreamer_0.10_la-gstobject.o .libs/libgstreamer_0.10_la-gstbin.o .libs/libgstreamer_0.10_la-gstbuffer.o .libs/libgstreamer_0.10_la-gstbufferlist.o .libs/libgstreamer_0.10_la-gstbus.o .libs/libgstreamer_0.10_la-gstcaps.o .libs/libgstreamer_0.10_la-gstchildproxy.o .libs/libgstreamer_0.10_la-gstclock.o .libs/libgstreamer_0.10_la-gstdebugutils.o .libs/libgstreamer_0.10_la-gstelement.o .libs/libgstreamer_0.10_la-gstelementfactory.o .libs/libgstreamer_0.10_la-gsterror.o .libs/libgstreamer_0.10_la-gstevent.o .libs/libgstreamer_0.10_la-gstfilter.o .libs/libgstreamer_0.10_la-gstformat.o .libs/libgstreamer_0.10_la-gstghostpad.o .libs/libgstreamer_0.10_la-gstindex.o .libs/libgstreamer_0.10_la-gstindexfactory.o .libs/libgstreamer_0.10_la-gstinfo.o .libs/libgstreamer_0.10_la-gstinterface.o .libs/libgstreamer_0.10_la-gstiterator.o .libs/libgstreamer_0.10_la-gstmessage.o .libs/libgstreamer_0.10_la-gstminiobject.o .libs/libgstreamer_0.10_la-gstpad.o .libs/libgstreamer_0.10_la-gstpadtemplate.o .libs/libgstreamer_0.10_la-gstparamspecs.o .libs/libgstreamer_0.10_la-gstpipeline.o .libs/libgstreamer_0.10_la-gstplugin.o .libs/libgstreamer_0.10_la-gstpluginfeature.o .libs/libgstreamer_0.10_la-gstpoll.o .libs/libgstreamer_0.10_la-gstpreset.o .libs/libgstreamer_0.10_la-gstquark.o .libs/libgstreamer_0.10_la-gstquery.o .libs/libgstreamer_0.10_la-gstregistry.o .libs/libgstreamer_0.10_la-gstsegment.o .libs/libgstreamer_0.10_la-gststructure.o .libs/libgstreamer_0.10_la-gstsystemclock.o .libs/libgstreamer_0.10_la-gsttaglist.o .libs/libgstreamer_0.10_la-gsttagsetter.o .libs/libgstreamer_0.10_la-gsttask.o .libs/libgstreamer_0.10_la-gsttaskpool.o .libs/libgstreamer_0.10_la-gsttrace.o .libs/libgstreamer_0.10_la-gsttypefind.o .libs/libgstreamer_0.10_la-gsttypefindfactory.o .libs/libgstreamer_0.10_la-gsturi.o .libs/libgstreamer_0.10_la-gstutils.o .libs/libgstreamer_0.10_la-gstvalue.o .libs/libgstreamer_0.10_la-gstparse.o .libs/libgstreamer_0.10_la-gstregistrybinary.o .libs/libgstreamer_0.10_la-gstxml.o .libs/libgstreamer_0.10_la-gstenumtypes.o .libs/libgstreamer_0.10_la-gstmarshal.o -Wl,--whole-archive parse/.libs/libgstparse.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/home/soeasy/nfsroot/target/usr/lib -Wl,-rpath -Wl,/home/soeasy/nfsroot/target/usr/lib -L/home/soeasy/nfsroot/target/usr/lib /home/soeasy/nfsroot/target/usr/lib/libgobject-2.0.so /home/soeasy/nfsroot/target/usr/lib/libgthread-2.0.so -lpthread -lrt /home/soeasy/nfsroot/target/usr/lib/libgmodule-2.0.so /home/soeasy/nfsroot/target/usr/lib/libglib-2.0.so /home/soeasy/nfsroot/target/usr/lib/libxml2.so -lm -lz -ldl -Wl,-soname -Wl,libgstreamer-0.10.so.0 -Wl,-version-script -Wl,.libs/libgstreamer-0.10.ver -o .libs/libgstreamer-0.10.so.0.21.0
/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linux-gnueabi/4.2.0/../../../../armv5tl-montavista-linux-gnueabi/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linux-gnueabi/4.2.0/../../../../armv5tl-montavista-linux-gnueabi/bin/ld: cannot find /lib/libpthread.so.0
collect2: ld returned 1 exit status
看来又找到本机系统的库目录里去了。
仔细分析最后的链接命令,原来是用libtool工具来进行的。由于所有的Makefile文件是通过config.status产生的,想想link的命令肯定在
此文件里,于是编辑config.status,查找shared,看相关的脚本。搜索到下列:
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'