Cross-compile dynamic apps for mpc860 on ix86
Dony,
you did not get my point:
In message <[email protected]> you write:
Quoted 11 lines
Quoted 9 lines
Quoted 4 lines
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 4 lines
Quoted 2 lines
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: [email protected] 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/
Quoted 6 lines · Wolfgang Denk
Quoted 3 lines
Quoted 1 line
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???
I think you are confusing Dony and myself. Dony has got his dynamic binaries going but I am still having problems. I am about to compile ALL my tools again. binutils-2.9.5.0.24, egcs-1.1.2, glibc-2.1.2. Hopefully I can get gcc-2.95.2 going at some stage but this is a lower concern at the moment.
Quoted 6 lines
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.
I should try this, but I wanted to steer away from the libc-1.99. I have no technical reason for this but Dan Malek mentions that he compiles most things statically. This requires lots of memory and filesystem space. I assumed from his statements that linking dynmaically was not advisable or doesn't work. This must be false as the mbxroot-min.tgz files are dynamically linked.
Brendan Simon.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/