From: xinxinjin <str...@gm...> - 2010-03-18 09:15:19
|
Hi everybody: I have met an annoying trouble when compiling oprofile. I need to install oprofile in Xen (dom0) for some test. The version of my OS is Linux 2.6.18.8- xen0. I have download oprofile 0.9.5 and oprofile-0.9.5-xen.patch. I have followed these steps: #tar –zxvf oprofile-0.9.5.tar.gz #cd oprofile-0.9.5 #patch –p1 < ../oprofile-0.9.5-xen.patch #./configure –with-kernel-support Until now, everything went very well. But in the next step "make", I met a problem: Making all in libopagent make[2]: Entering directory `/home/jxx/gmb/gmb/oprofile-0.9.5/libopagent' /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o libopagent.la - rpath /usr/local/lib/oprofile -version-info 1:0:0 -Wl,--version- script=../libopagent/opagent_symbols.ver libopagent_la-opagent.lo -lbfd - liberty -ldl gcc -shared .libs/libopagent_la-opagent.o -lbfd -liberty -ldl -Wl,--version- script=../libopagent/opagent_symbols.ver -Wl,-soname -Wl,libopagent.so.1 - o .libs/libopagent.so.1.0.0 /usr/local/bin/ld: /usr/lib/gcc/x86_64-redhat- linux/4.1.2/../../../../lib64/libbfd.a(archures.o): relocation R_X86_64_32 against `bfd_i386_arch' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libbfd.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libopagent.la] Error 1 make[2]: Leaving directory `/home/jxx/gmb/gmb/oprofile-0.9.5/libopagent' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jxx/gmb/gmb/oprofile-0.9.5' make: *** [all] Error 2 I have tried to add -fPIC to CFLAGS, but it still cannot work. I have checked my binuils and it also seems normal: # rpm -qa|grep binutil binutils-devel-2.17.50.0.18-1 binutils-2.17.50.0.18-1 binutils-devel-2.17.50.0.18-1 Now I have no idea how to fix this problem. I'm really looking forward for your help! Thx!! |