Sorry, I changed the LDFLAGS and CPPFLAGS to the correct path, and got the same error.
--- On Thu, 6/12/08, Ralf S. Engelschall <rse+rpm-users@rpm5.org> wrote:
> From: Ralf S. Engelschall <rse+rpm-users@rpm5.org>
> Subject: Re: problem with popt when cross-compiling rpm-5.1.2
> To: rpm-users@rpm5.org
> Date: Thursday, June 12, 2008, 11:19 AM
> On Thu, Jun 12, 2008, lai wei wrote:
>
> > I am cross-compiling rpm-5.1.2 in host system i686 for
> target
> > powerpc, my targetsys files are installed in
> /home/wlai/targetsys
> > directory, where I have installed popt whose lib in is
> > /home/wlai/targetsys/usr/lib.
> >
> > I run the configure with the following parameters:
> > CC=powerpc-unknown-linux-gnu-ar
> AR=powerpc-unknown-linux-gnu-ar
> AS=powerpc-unknown-linux-gnu-as
> CXX=powerpc-unknown-linux-gnu-g++
> > LD=powerpc-unknown-linux-gnu-ld
> NM=powerpc-unknown-linux-gnu-nm
> > RANLIB=powerpc-unknown-linux-gnu-ranlib
> > STRIP=powerpc-unknown-linux-gnu-strip
> > OBJCOPY=powerpc-unknown-linux-gnu-objcopy
> OBJDUMP=powerpc-unknown-linux-gnu-objdump
> > CPPFLAGS=" -I/targetsys/usr/include"
> > LDFLAGS="-L/targetsys/usr/lib
> -L/targetsys/lib"
> > ./configure --without-selinux --disable-nls
> --build=i686-cross-linux --host=powerpc-unknown-linux-gnu
> >
> > then run make, and got the following erros:
> > /usr/lib/libpopt.so: could not read symbols: File in
> wrong format
> >
> > why the libpopt.so in /usr/lib is catched and not in
> my tagetsys dir?
> > how can I force it to find library in my targetsys
> dir?
>
> Because you specified -L/targetsys/... in the
> LDFLAGS variable and not -L/home/wlai/targetsys/...?
>
> Ralf S. Engelschall
> rse@engelschall.com
> www.engelschall.com
>
> ______________________________________________________________________
> RPM Package Manager
> http://rpm5.org
> User Communication List
> rpm-users@rpm5.org
Received on Thu Jun 12 16:49:08 2008