*bizarre* error building ipkg -- no, really.

From: Robert P. J. Day <rpjday_at_mindspring.com>
Date: Mon, 17 Nov 2003 09:20:20 -0500 (EST)

  i'm absolutely baffled by an error i'm getting in trying to build ipkg for the
PPC using a toolchain from www.denx.de.

  i start by checking out ipkg from cvs.handhelds.org, and the first thing
i do is edit autoconfigure.sh, to make the following changes:

  HOST=ppc-linux
  ./configure --host=${HOST} # fix typo

next, after setting PATH properly to get to the cross-compile tools, and
setting CROSS_COMPILE=ppc_8xx- (to be appropriate for the DENX
toolchain), i run:

  $ ./autoconfigure.sh # this works, gives me a Makefile

finally,

  $make
  .....
  ppc-linux-gcc -g -O -Wall -DHOST_CPU_STR=\"powerpc\" -DBUILD_CPU=i686 -o ipkg args.o ipkg.o ipkg_conf.o user.
o ipkg_message.o ipkg_cmd.o ipkg_configure.o ipkg_download.o ipkg_install.o ipkg_upgrade.o ipkg_remove.o ipkg_uti
ls.o pkg.o pkg_depends.o pkg_extract.o hash_table.o pkg_hash.o pkg_parse.o pkg_vec.o file_util.o md5.o sprintf_al
loc.o str_util.o xregex.o xsystem.o conffile.o conffile_list.o nv_pair.o nv_pair_list.o pkg_dest.o pkg_dest_list.
o pkg_src.o pkg_src_list.o str_list.o void_list.o libbb/libbb.a
/emb/eldk/build/usr/ppc-linux/bin/ld: libbb/libbb.a(unarchive.o): compiled for a little endian system and target
is big endian
File in wrong format: failed to merge target specific data of file libbb/libbb.a(unarchive.o)
/emb/eldk/build/usr/ppc-linux/bin/ld: libbb/libbb.a(copy_file.o): compiled for a little endian system and target
is big endian

  
  following this, a bit further down, i get a *truckload* of errors of the form:

/work/ipkg/libbb/unarchive.c:47: relocation truncated to fit: R_PPC_ADDR24 fseek@@GLIBC_2.0
/work/ipkg/libbb/unarchive.c:47: relocation truncated to fit: R_PPC_ADDR24 __errno_location@@GLIBC_2.0
/work/ipkg/libbb/unarchive.c:49: relocation truncated to fit: R_PPC_ADDR24 fgetc@@GLIBC_2.0
libbb/libbb.a(unarchive.o): In function `extract_archive':
/work/ipkg/libbb/unarchive.c:85: relocation truncated to fit: R_PPC_ADDR24 xstrlen
...
and the make aborts finally.

  i can rerun "make" several fimes, and get the same error every time, but here's where it gets
spooky. all i need to do is:

  $ make clean
  $ make # and it works

now, by "works", all i mean is that i get none of the errors above, and i get an "ipkg"
executable. i still haven't had the chance to test if it will in fact work on my target,
but what's up with this? why should doing a "make clean" suddenly change the build
and let it complete?

  i'm open to suggestions.

rday
Received on Mon Nov 17 2003 - 14:20:22 EST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:18:08 EDT