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:


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


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/  -o iconv;; \
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/
/usr/lib/ 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/ (from host) being passed to the linker, as opposed to what I believe should be $(PKG_BUILD_DIR)/ipkg-install/usr/lib/, resulting in failure.

There are comments in src/Makefile regarding selecting the proper 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/ /usr/lib/
# After successful compile
# mv /usr/lib/ /usr/lib/

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

as new .

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

Note: See TracTickets for help on using tickets.