Problem on building oprofile

Vinoth Natarajan <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <CADaxUdEV083iuN_VO3gqydDcv+v+uV6NSOOpkmN8o3=VtE0HFw@mail.gmail.com>
Hello Team,



Good Day.



Could you please clarify the following problem am facing when building
oprofile.



Am using VM ( 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux )

Cross compiler crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25 to
build oprofile 0.9.9 ,which failed with the following Error.(same for
oprofile_1.2.0)



*"checking for bfd_fdopenr in -lbfd... no*

*configure: error: bfd library not found*

*make: *** [conditional_build] Error 1"*



In the same machine,if i compile with
crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL, oprofile
is being built successfully.



In both compilation, linking the already compiled static library files
built for their respective host names.



for linux_3.4



./configure --host=arm-unknown-linux \

                --prefix=/home/xxxx/lib/oprofile \


--with-kernel=/home/xxx/kernel/linux-3.4rt/
\

                LDFLAGS="-static -L/home/xxx/gpl/libs/popt-1.16/.libs
-L/home/xxx/gpl/apps/oprofile/binutils-2.29/libiberty
-L/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs
-L/home/xxx/gpl/libs/zlib-1.2.7"; \



for linux 4.1



configure --host=arm-buildroot-linux-uclibcgnueabi \

                --prefix=/home/xxxx/lib/oprofile \

                LDFLAGS="-static -L/home/xxx/gpl/libs/popt-1.16/.libs
-L/home/xxx/gpl/apps/oprofile/binutils-2.29/libiberty
-L/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs
-L/home/xxx/gpl/libs/zlib-1.2.7"; \




*Why oprofile is not being build for glibc?*



I have tried to bypass the configure script by removing the check for if
test "x$ac_cv_lib_bfd_bfd_fdopenr" = x""yes; then” and hard coded to
continue the compilation.

It stopped with the following errors.



/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(bfd.o): In
function `_bfd_default_error_handler':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/bfd.c:789: undefined
reference to `__fputc_unlocked'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(opncls.o): In
function `bfd_fdopenr':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/opncls.c:339:
undefined reference to `fcntl64'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(elf32-arm.o):
In function `elf32_arm_print_private_bfd_data':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/elf32-arm.c:13437:
undefined reference to `__fputc_unlocked'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(elf.o): In
function `bfd_elf_print_symbol':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/elf.c:1872:
undefined reference to `__fputc_unlocked'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(elf.o): In
function `print_segment_map':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/elf.c:4981:
undefined reference to `__fputc_unlocked'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(plugin.o): In
function `message':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/plugin.c:119:
undefined reference to `__fputc_unlocked'

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/plugin.c:119:
undefined reference to `__stdout'

/home/xxx/gpl/apps/oprofile/binutils-2.29/bfd/.libs/libbfd.a(bfdio.o): In
function `close_on_exec':

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/bfdio.c:76:
undefined reference to `fcntl64'

/home/che21908/latest/oprofile-0.9.9/binutils-2.27/bfd/bfdio.c:78:
undefined reference to `fcntl64'

collect2: error: ld returned 1 exit status



Please help me understand this issue and provide your valuable comments.

Thanks in advance.



Vinoth Natarajan.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.