Open snunez1 opened 5 years ago
Hi, I suggest you try to rebuild pmcl-OSX-kernel
on your Mac OS X 10.6. I can't do this, because my only Mac OS X 10.6 machine is with Xcode 4.2, which cannot generate PPC binary. The current pmcl-OSX-kernel
, according to Git commit log, was rebuilt by Terje Anderson on 10.6.x, however we don't know the compiler and exact OS version. Now I tend to think the existing pmcl-OSX-kernel
binary has some problems and should never work.
The procedure is not mentioned in the Wiki, but it's mentioned in the rmcl-notes.pdf
(by Gary Bayer). All you need to do is go to pmcl/OSX
directory and execute make
there, than copy the newly built pmcl-OSX-kernel
file back to MCL's top directory. This procedure is confirmed working on Mac OS X 10.5 with Xcode 3.2.
I tried that. I rebuilt pmcl-OSX-kernel, but it had no effect. I also turned on -Wall to see if it caught anything. -Wall is always a bit noisy, but sometimes useful; sadly, not in this case. I think to get to the bottom of this will take running it in a debugger, which I unfortunately can't do right now.
On Thu, Nov 22, 2018 at 4:52 PM Chun Tian notifications@github.com wrote:
Hi, I suggest you try to rebuild pmcl-OSX-kernel on your Mac OS X 10.6. I can't do this, because my only Mac OS X 10.6 machine is with Xcode 4.2, which cannot generate PPC binary. The current pmcl-OSX-kernel, according to Git commit log, was rebuilt by Terje Anderson on 10.6.x, however we don't know the compiler and exact OS version. Now I tend to think the existing pmcl-OSX-kernel binary has some problems and should never work.
The procedure is not mentioned in the Wiki, but it's mentioned in the rmcl-notes.pdf (by Gary Bayer). All you need to do is go to pmcl/OSX directory and execute make there, than copy the newly built pmcl-OSX-kernel file back to MCL's top directory. This procedure is confirmed working on Mac OS X 10.5 with Xcode 3.2.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/binghe/MCL/issues/2#issuecomment-440956823, or mute the thread https://github.com/notifications/unsubscribe-auth/AHak8BDAGGwWyb7VmBcI3caMfW5EHis_ks5uxmXpgaJpZM4YuvNP .
I'll also downgrade my Xcode to get to the same page with you. I believe this issue could be finally resolved by understanding and modifying those C and assembly code in pmcl/OSX
directory. Good luck, both us.
I thought about this some more, and I do not think it is pmcl-OSX-kernel after all. Doesn't PPCCL use this kernel? PPCCL works fine except for an occasional crash or so. If PPCCL is working with pmcl-OSX-kernel, then the problem likely lies with ppc-boot. Gary Byers writes in rmcl-notes (edited for clarity):
On OSX, CFM applications are loaded into memory by a native helper application "LaunchCFMApp" ... that tries to find external CFM libraries that the CFM application is linked against and resolve references to symbols defined in those libraries; if it's successful, it transfers control to initialization and startup routines in the CFM executable.
MCL refers to a CFM library named "pmcl-kernel", and its initialization and startup routines call functions that are defined in that library. On traditional MacOS, this file was "the kernel" and provided image loading and saving, exception handling, and other services for the MCL application. On OSX, a separate copy of the C kernel sources were compiled into a "native" kernel (compiled and linked as a native Mach-O object file and named "pmcl-OSX-kernel"
So, if PPCCL works, but the ppc-boot that is generate by the rebuild process does not, it seems reasonable that the jump point to "transfer control to initialization and startup routines" might be incorrectly set somewhere in the lisp code. The question is: how to find out where in lisp this is done before the call to generate-application.
After building a ppc-boot, running it produces:
Probably thread 3 crashing somehow rolled up to Thread 0. After reading rmcl-notes.pdf, a theory is that the ppc-boot file which jumps into pmcl-OSX-kernel is somehow out of sync or different between 10.5 and 10.6. That is nothing more than a guess. Here is the hardware spec: