Modify

Opened 6 years ago

Last modified 4 years ago

#10693 new defect

libiconv-full fail compile TARGET_X86_64

Reported by: rossb@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Targeted x86_64 in target/linux/x86/Makefile by:

#ARCH:=i386
ARCH:=x86_64

Q1: Is this all that is required? Google indicates so.

Then; iconv-full/compile fails:

case "linux-gnu" in \
          hpux*) x86_64-openwrt-linux-gnu-gcc -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/lib  `if test -n '"../build-aux/reloc-ldflags" "" "/usr/lib"'; then "../build-aux/reloc-ldflags" "" "/usr/lib" /usr/bin; fi` iconv.o ../srclib/libicrt.a -L/mnt/sdb1/OpenWrt_r29322/trunk/build_dir/target-x86_64_glibc-2.13/libiconv-1.11.1/ipkg-install/usr/lib -liconv  `if test -n '/mnt/sdb1/OpenWrt_r29322/trunk/build_dir/target-x86_64_glibc-2.13/libiconv-1.11.1/ipkg-install'; then echo " -Wl,+b -Wl,/usr/lib"; fi` -o iconv;; \
          *) /bin/sh ../libtool --mode=link x86_64-openwrt-linux-gnu-gcc -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/lib  `if test -n '"../build-aux/reloc-ldflags" "" "/usr/lib"'; then "../build-aux/reloc-ldflags" "" "/usr/lib" /usr/bin; fi` iconv.o ../srclib/libicrt.a /mnt/sdb1/OpenWrt_r29322/trunk/build_dir/target-x86_64_glibc-2.13/libiconv-1.11.1/ipkg-install/usr/lib/libiconv.la  -o iconv;; \
        esac
relocation via rpath not supported on this system:
x86_64-openwrt-linux-gnu-gcc iconv.o -o iconv  -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/target-x86_64_glibc-2.13/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/usr/lib -L/mnt/sdb1/OpenWrt_r29322/trunk/staging_dir/toolchain-x86_64_gcc-4.6.1_glibc-2.13/lib ../srclib/libicrt.a /usr/lib/libiconv.so
/usr/lib/libiconv.so: could not read symbols: File in wrong format

I have looked into this. In $(PKG_BUILD_DIR)/src/Makefile is:

RELOCATABLE_LDFLAGS = "$(top_builddir)/build-aux/reloc-ldflags" "$(host)" "$(RELOCATABLE_LIBRARY_PATH)"
iconv_LDFLAGS = `if test -n '$(RELOCATABLE_LDFLAGS)'; then $(RELOCATABLE_LDFLAGS) $(bindir); fi`

...which calls script "reloc-ldflags" with $(host) which is "" as a parameter and, script returns "".

This results in /usr/lib/libiconv.so (from host) being passed to the linker, as opposed to what I believe should be $(PKG_BUILD_DIR)/ipkg-install/usr/lib/libiconv.so, resulting in failure.

There are comments in src/Makefile regarding selecting the proper libiconv.so for the final build of iconv executable, but, this mechanism is failing.

Setting $host to the proper value in src/Makefile results in the same failure without the "relocation via rpath not supported on this system" from the reloc-ldflags script.

I know this is not a standard config, but x86_64 is legitimate on some targets.

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by rossb@…

Temporary workaround:

# Not solved yet, upon build failure:
# mv /usr/lib/libiconv.so.2.4.0 /usr/lib/libiconv.so.2.4.0_host
# After successful compile
# mv /usr/lib/libiconv.so.2.4.0_host /usr/lib/libiconv.so.2.4.0

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.