Cross-compile dynamic apps for mpc860 on ix86

Wolfgang Denk wd at denx.de
Mon Jan 24 19:02:13 EST 2000


Dony,

you did not get my point:

In message <388BEE23.A42DFCB5 at huawei.com.cn> you write:
>
> > > Yes.  I have successfully built glibc-2.1.1 and glibc-2.1.2 with egcs-1.1.2 and binutils-2.9.1.0.19a.
> > > I have copied all the shared libraries to my nfs root filesystem under /lib.  I still get segmentation faults when I try to
> > > run the dynamic application.  Arghh !!!  This is so annoying.
> >
> > Make sure you use ONLY files compiled in your  new  environment,  not
> > ANY files that might exist from older versions in your NFS tree.
> >
> > Make sure the shell you are running is statically linked!
>
> Not needed. Both my shell (sash) and my test app can run dynamically.

Then what do you complain  about  segmentation  faults  when  running
dynamically linked applications???

> > The easiest way to test this is to copy all relevant files to  a  new
> > place (say, /test/bin and /test/lib) and then test with "chroot /test".
>
> In a cross-compile environment, It is impossible to do so.  i.e., You can not run any apps for Powerpc on X86 box.

I did not say you should try. Sorry, I thought at  least  *this*  was
obvious.


Ok, once more in detail:

1. Get your PPC target running with the root filesystem mounted  over
   NFS with a known set of working tools (shell, libraries, ...). For
   instance, you can start with the files from the `mbxroot.full.tgz'
   tarball.

2. Put all your new binaries and libraries in  a  separate  directory
   tree.

3. Run a statically linked shell on your PPC  target.  You  may  also
   want to have some more statically linked tools available.

4. Do a "chroot" to your separate directory tree  with  the  binaries
   and  libraries  you  want to test. Try to execute some dynamically
   linked binaries.

5. Fix the problems.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I have the simplest tastes.  I am always satisfied with the best.
                                                       -- Oscar Wilde

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list