From: C K K. <ckk...@gm...> - 2010-08-09 08:43:52
|
Hi, I was trying to build oprofile on RHEL4 x86_84 box. I get the following error - I even tried with ./configure --with-pic - but I get the same error. Could someone please help me with this? make[2]: Entering directory `/home/ckk/profile/oprofile-0.9.6/libopagent' if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF ".deps/libopagent_la-opagent.Tpo" -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo './'`opagent.c; \ then mv -f ".deps/libopagent_la-opagent.Tpo" ".deps/libopagent_la-opagent.Plo"; else rm -f ".deps/libopagent_la-opagent.Tpo"; exit 1; fi mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -o libopagent_la-opagent.o >/dev/null 2>&1 /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/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a(archures.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../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/ckk/profile/oprofile-0.9.6/libopagent' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ckk/profile/oprofile-0.9.6' make: *** [all] Error 2 [ro...@gd...4 oprofile-0.9.6]# -- Regards, Kashyap |
From: C K K. <ckk...@gm...> - 2010-08-09 11:40:43
|
I dug up the archive and found a workaround of creating a soft link to libbfd.so and it worked. The build progressed and crashed here - make[3]: Entering directory `/home/ckk/oprofile-0.9.6/libabi' /bin/sh ../libtool --tag=CXX --mode=link g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -o opimport opimport.o libabi.a ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a ../libutil/libutil.a -lpopt -liberty -ldl g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -o opimport opimport.o libabi.a ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a ../libutil/libutil.a /usr/lib/libpopt.so -liberty -ldl /usr/lib/libpopt.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[3]: *** [opimport] Error 1 make[3]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ckk/oprofile-0.9.6' make: *** [all] Error 2 On Mon, Aug 9, 2010 at 2:13 PM, C K Kashyap <ckk...@gm...> wrote: > Hi, > I was trying to build oprofile on RHEL4 x86_84 box. I get the following > error - > I even tried with ./configure --with-pic - but I get the same error. Could > someone please help me with this? > > make[2]: Entering directory `/home/ckk/profile/oprofile-0.9.6/libopagent' > if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. > -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo > -MD -MP -MF ".deps/libopagent_la-opagent.Tpo" -c -o libopagent_la-opagent.lo > `test -f 'opagent.c' || echo './'`opagent.c; \ > then mv -f ".deps/libopagent_la-opagent.Tpo" > ".deps/libopagent_la-opagent.Plo"; else rm -f > ".deps/libopagent_la-opagent.Tpo"; exit 1; fi > mkdir .libs > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 > -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c > opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 > -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c > opagent.c -o libopagent_la-opagent.o >/dev/null 2>&1 > /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/bin/ld: > /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a(archures.o): > relocation R_X86_64_32 against `a local symbol' can not be used when making > a shared object; recompile with -fPIC > /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../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/ckk/profile/oprofile-0.9.6/libopagent' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/ckk/profile/oprofile-0.9.6' > make: *** [all] Error 2 > [ro...@gd...4 oprofile-0.9.6]# > > -- > Regards, > Kashyap > -- Regards, Kashyap |
From: William C. <wc...@re...> - 2010-08-09 14:45:35
|
On 08/09/2010 07:40 AM, C K Kashyap wrote: > I dug up the archive and found a workaround of creating a soft link to libbfd.so and it worked. The build progressed and crashed here - > make[3]: Entering directory `/home/ckk/oprofile-0.9.6/libabi' > /bin/sh ../libtool --tag=CXX --mode=link g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -o opimport opimport.o libabi.a ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a ../libutil/libutil.a -lpopt -liberty -ldl > g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -o opimport opimport.o libabi.a ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a ../libutil/libutil.a /usr/lib/libpopt.so -liberty -ldl > /usr/lib/libpopt.so: could not read symbols: File in wrong format > collect2: ld returned 1 exit status > make[3]: *** [opimport] Error 1 > make[3]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/ckk/oprofile-0.9.6' > make: *** [all] Error 2 > > > On Mon, Aug 9, 2010 at 2:13 PM, C K Kashyap <ckk...@gm... <mailto:ckk...@gm...>> wrote: > > Hi, > I was trying to build oprofile on RHEL4 x86_84 box. I get the following error - > I even tried with ./configure --with-pic - but I get the same error. Could someone please help me with this? > > make[2]: Entering directory `/home/ckk/profile/oprofile-0.9.6/libopagent' > if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF ".deps/libopagent_la-opagent.Tpo" -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo './'`opagent.c; \ > then mv -f ".deps/libopagent_la-opagent.Tpo" ".deps/libopagent_la-opagent.Plo"; else rm -f ".deps/libopagent_la-opagent.Tpo"; exit 1; fi > mkdir .libs > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -o libopagent_la-opagent.o >/dev/null 2>&1 > /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o libopagent.la <http://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/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a(archures.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC > /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a: could not read symbols: Bad value > collect2: ld returned 1 exit status > make[2]: *** [libopagent.la <http://libopagent.la>] Error 1 > make[2]: Leaving directory `/home/ckk/profile/oprofile-0.9.6/libopagent' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/ckk/profile/oprofile-0.9.6' > make: *** [all] Error 2 > [ro...@gd...4 oprofile-0.9.6]# > > -- > Regards, > Kashyap > Hi Kashyap, One thing you might do is make sure that you have all the rpms used for building the oprofile rpm installed on the machine. The list of packages oprofile srpm's oprofile.spec required to build oprofile are: BuildPreReq: qt-devel BuildPreReq: libxslt BuildPreReq: docbook-style-xsl BuildPreReq: docbook-utils BuildPreReq: elinks BuildPreReq: gtk2-devel BuildPreReq: automake I tried to build the oprofile-0.9.6 from the pristine oprofile-0.9.6.tar.gz on a RHEL-4 i686 machine that has been updated and it built fine. I used the same configure as for the rpmbuild on RHEL-4. The following is i686 machine: ./configure --with-kernel-support --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --build=i686-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-separate-debug-dir=/usr/lib/debug --enable-abi -Will |
From: C K K. <ckk...@gm...> - 2010-08-10 06:54:58
|
Thanks Will, After installing the packages you mentioned, I was able to install - I still had to create a soft link ibbfd.so to point to libbfd-2.15.92.0.2.so though. Now I need to install oprofile on a server machine where there are no X libraries. Are there any recommendations for that? Installing qt etc is not an option there. On Mon, Aug 9, 2010 at 8:15 PM, William Cohen <wc...@re...> wrote: > On 08/09/2010 07:40 AM, C K Kashyap wrote: > > I dug up the archive and found a workaround of creating a soft link to > libbfd.so and it worked. The build progressed and crashed here - > > make[3]: Entering directory `/home/ckk/oprofile-0.9.6/libabi' > > /bin/sh ../libtool --tag=CXX --mode=link g++ -W -Wall -fno-common > -ftemplate-depth-50 -g -O2 -o opimport opimport.o libabi.a > ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a > ../libutil/libutil.a -lpopt -liberty -ldl > > g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -o opimport > opimport.o libabi.a ../libdb/libodb.a ../libopt++/libopt++.a > ../libutil++/libutil++.a ../libutil/libutil.a /usr/lib/libpopt.so -liberty > -ldl > > /usr/lib/libpopt.so: could not read symbols: File in wrong format > > collect2: ld returned 1 exit status > > make[3]: *** [opimport] Error 1 > > make[3]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory `/home/ckk/oprofile-0.9.6/libabi' > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory `/home/ckk/oprofile-0.9.6' > > make: *** [all] Error 2 > > > > > > On Mon, Aug 9, 2010 at 2:13 PM, C K Kashyap <ckk...@gm...<mailto: > ckk...@gm...>> wrote: > > > > Hi, > > I was trying to build oprofile on RHEL4 x86_84 box. I get the > following error - > > I even tried with ./configure --with-pic - but I get the same error. > Could someone please help me with this? > > > > make[2]: Entering directory > `/home/ckk/profile/oprofile-0.9.6/libopagent' > > if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I. -I.. -fPIC -I ../libop -I ../libutil -g -O2 -MT > libopagent_la-opagent.lo -MD -MP -MF ".deps/libopagent_la-opagent.Tpo" -c -o > libopagent_la-opagent.lo `test -f 'opagent.c' || echo './'`opagent.c; \ > > then mv -f ".deps/libopagent_la-opagent.Tpo" > ".deps/libopagent_la-opagent.Plo"; else rm -f > ".deps/libopagent_la-opagent.Tpo"; exit 1; fi > > mkdir .libs > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g > -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo > -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I ../libop -I ../libutil -g > -O2 -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo > -c opagent.c -o libopagent_la-opagent.o >/dev/null 2>&1 > > /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o > libopagent.la <http://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/bin/ld: > /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a(archures.o): > relocation R_X86_64_32 against `a local symbol' can not be used when making > a shared object; recompile with -fPIC > > /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libbfd.a: > could not read symbols: Bad value > > collect2: ld returned 1 exit status > > make[2]: *** [libopagent.la <http://libopagent.la>] Error 1 > > make[2]: Leaving directory > `/home/ckk/profile/oprofile-0.9.6/libopagent' > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory `/home/ckk/profile/oprofile-0.9.6' > > make: *** [all] Error 2 > > [ro...@gd...4 oprofile-0.9.6]# > > > > -- > > Regards, > > Kashyap > > > > Hi Kashyap, > > One thing you might do is make sure that you have all the rpms used for > building the oprofile rpm installed on the machine. The list of packages > oprofile srpm's oprofile.spec required to build oprofile are: > > BuildPreReq: qt-devel > BuildPreReq: libxslt > BuildPreReq: docbook-style-xsl > BuildPreReq: docbook-utils > BuildPreReq: elinks > BuildPreReq: gtk2-devel > BuildPreReq: automake > > I tried to build the oprofile-0.9.6 from the pristine oprofile-0.9.6.tar.gz > on a RHEL-4 i686 machine that has been updated and it built fine. I used the > same configure as for the rpmbuild on RHEL-4. The following is i686 machine: > > ./configure --with-kernel-support --host=i686-redhat-linux-gnu > --target=i386-redhat-linux-gnu --build=i686-redhat-linux-gnu > --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin > --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share > --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec > --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man > --infodir=/usr/share/info --with-separate-debug-dir=/usr/lib/debug > --enable-abi > > > > -Will > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list > -- Regards, Kashyap |
From: William C. <wc...@re...> - 2010-08-10 15:36:38
|
On 08/10/2010 02:54 AM, C K Kashyap wrote: > Thanks Will, > After installing the packages you mentioned, I was able to install - I still had to create a soft link ibbfd.so to point to libbfd-2.15.92.0.2.so <http://libbfd-2.15.92.0.2.so> though. > > Now I need to install oprofile on a server machine where there are no X libraries. Are there any recommendations for that? Installing qt etc is not an option there. > X is only required for oprof_start. You could build oprofile without oprof_start. Use the following with the configure and then build: --without-x -Will |
From: William C. <wc...@re...> - 2010-08-10 18:23:14
|
On 08/10/2010 02:54 AM, C K Kashyap wrote: > Thanks Will, > After installing the packages you mentioned, I was able to install - I still had to create a soft link ibbfd.so to point to libbfd-2.15.92.0.2.so <http://libbfd-2.15.92.0.2.so> though. > > Now I need to install oprofile on a server machine where there are no X libraries. Are there any recommendations for that? Installing qt etc is not an option there. Hi Kashyap, RHEL-4 comes with a version of oprofile. What is the reason for building a local verssion of oprofile? -Will |
From: C K K. <ckk...@gm...> - 2010-08-11 04:39:00
|
My ignorance is the only reason :) Thanks for letting me know. I noticed however that it's from september 2007. btw .. I am experimenting right now inside vmware ... I hope that's not an issue. On Tue, Aug 10, 2010 at 11:53 PM, William Cohen <wc...@re...> wrote: > On 08/10/2010 02:54 AM, C K Kashyap wrote: > > Thanks Will, > > After installing the packages you mentioned, I was able to install - I > still had to create a soft link ibbfd.so to point to libbfd-2.15.92.0.2.so< > http://libbfd-2.15.92.0.2.so> though. > > > > Now I need to install oprofile on a server machine where there are no X > libraries. Are there any recommendations for that? Installing qt etc is not > an option there. > > Hi Kashyap, > > RHEL-4 comes with a version of oprofile. What is the reason for building a > local verssion of oprofile? > > -Will > -- Regards, Kashyap |