Re: Cross-compile dynamic apps for mpc860 on ix86
From: Wolfgang Denk <hidden>
Date: 2000-01-24 08:02:13
Dony, you did not get my point: In message [off-list ref] you write:
quoted
quoted
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???
quoted
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@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/