OpenWrt Forum Archive

Topic: Perf Compilation Error

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I would like to use perf in my MIPS hardware. I compiled trunk (revision 29925) with perf and elf2utils. These two I found in feeds section.
I am getting compilation error as given below.

checking host system type... mips-openwrt-linux-gnu
checking for mips-openwrt-linux-gcc... mips-openwrt-linux-uclibc-gcc
checking whether the C compiler works... no
configure: error: in `/home/trunk/build_dir/target-mips_r2_uClibc-0.9.32/elfutils-0.152':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[3]: *** [/home/trunk/build_dir/target-mips_r2_uClibc-0.9.32/elfutils-0.152/.configured_] Error 77
make[3]: Leaving directory `/home/trunk/package/elfutils'
make[2]: *** [package/elfutils/compile] Error 2
make[2]: Leaving directory `/home/trunk'
make[1]: *** [/home/trunk/staging_dir/target-mips_r2_uClibc-0.9.32/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/trunk'
make: *** [world] Error 2

Please let me know how to solve this problem.

Thanks in advance.

Sadhan

See `config.log' for more details

You'll find it in /home/trunk/build_dir/target-mips_r2_uClibc-0.9.32/elfutils-0.152/config.log

Hi,
Thanks for the reply.

I made little progress after modifying couple of lines in "/home/trunk/package/elfutils/Makefile" file as shown below

define Build/Configure
        (cd $(PKG_BUILD_DIR); \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
                ./configure \
                --host=mips-openwrt-linux-uclibc \
        );
endef

I also copied a header files (libintl.h) into staging_dir.

However I am now getting a different compilation error as given below.

make[6]: Entering directory `/home/trunk/build_dir/target-mips_r2_uClibc-0.9.32/elfutils-0.152/libelf'
mips-openwrt-linux-uclibc-gcc -std=gnu99 -Wall -Wshadow  -Wunused -Wextra -fgnu89-inline -Wformat=2    -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -msoft-float -I/home/trunk/staging_dir/target-mips_r2_uClibc-0.9.32/usr/lib/libiconv-stub/include -I/home/trunk/staging_dir/target-mips_r2_uClibc-0.9.32/usr/lib/libintl-stub/include   -o libelf.so -shared -o libelf.so -Wl,--whole-archive,libelf_pic.a,--no-whole-archive \
                -Wl,--version-script,./libelf.map,--no-undefined \
                -Wl,--soname,libelf.so.1,-z,defs,-z,relro
libelf_pic.a(elf_error.os): In function `elf_errmsg':
elf_error.c:(.text+0x1bc): undefined reference to `dcgettext'
elf_error.c:(.text+0x1cc): undefined reference to `dcgettext'
collect2: ld returned 1 exit status
make[6]: *** [libelf.so] Error 1

Please let me know how to solve this problem.

Sadhan

(Last edited by Sadhan on 17 Aug 2012, 08:56)

The discussion might have continued from here.