Re: Building Hello World on an iMac G5 (Debian 12) for a PPC 405EX target?
J05HYYY via crossgcc <[email protected]> Sun, 31 Aug 2025 18:17:44 +0100
| Newsgroups | gmane.comp.gcc.cross-compiling |
|---|---|
| Message-ID | <20250831181744.0a40b642@bnj-lptOld-reset> |
I can't answer you questions exactly but I will try my best to help until someone else shows up who can help better ... "Illegal instruction" error indicates you are compiling using the incorrect gcc or your compiler is not quite right. You should compile with [cross] compiler targetting power pc, assuming the target devices are in-fact powerpc. Likewise: If the target devices are not power pc then a compiler targetting powerpc will not work. This doesn't explain to me however why you would get the GLIBC not found error at all. I would expect another Illegal instruction error(!) Either way, it's not finding GLIBC C library on the target device for some reason. Maybe you have darwin libc on target device or a different version of GLIBC or something idk. The fact that you managed to copy rr_beep off the target device and run it ?on the G5? suggests to me that both devices use GLIBC and you have a different version of GLIBC installed, but it's difficult to interpret what you have written tbh. Busybox from the target device should work if it is compiled statically. It may even work if it is compiled as a shared library and you may get the GLIBC compatibility error one way but not the other. Likewise, if you are using the correct compiler, a statically compiled hello world should work in theory. The error saying about libcrypto.so.1.0.0 is probably because it cannot find the library. It may be that the rr_beep program has been linked to an old library. One way to fix the error might be to make a symlink, but this is a bit of a hack. $ cd "/lib/powerpc-linux-gnu" $ sudo ln -s libcrypto.so.1.0.0 libcrypto.so Finally: BUILD = The architecture of the machine you are building from HOST = The architecture of the machine you wish to run the code on. TARGET = Basically the same as 'HOST' unless this is a canadian cross which is unlikely in your case Best of Luck, Josh -- For unsubscribe information see http://sourceware.org/lists.html#faq