hyperblue Posted July 20, 2011 Share Posted July 20, 2011 I've tried installing the SL package of Roestta on Lion and it is a terrible no go. I've been poking around to see what frameworks are needed from old SL in order to get Rosetta to work, but I'm still getting errors. Does anyone know if Rosetta is dependent on the Kernel or just frameworks? Also, is anyone else working on Rosetta support for Lion? Link to comment Share on other sites More sharing options...
smartie77 Posted July 22, 2011 Share Posted July 22, 2011 I've tried installing the SL package of Roestta on Lion and it is a terrible no go. I've been poking around to see what frameworks are needed from old SL in order to get Rosetta to work, but I'm still getting errors. Does anyone know if Rosetta is dependent on the Kernel or just frameworks? Also, is anyone else working on Rosetta support for Lion? so far I investigated a bit in Snow all Rosetta sits in /usr/libexec/oah installing only the rosetta pkg in lion installs only the exe "translate" which is rosetta itself. but it relies on shims and symlinks to system files I have extracted all from SL 10.6 disk via pacifist . With packagemaker I could do a Installer for it, that is no the problem. Activating the translate executable ( associate it to open ppc apps ) would be done by this : sudo sysctl -w kern.exec.archhandler.powerpc=/usr/libexec/oah/RosettaNonGrata sudo sysctl -w kern.exec.archhandler.powerpc=/usr/libexec/oah/translate In Lion and Snow exists a exec file in the directory called RosettaNonGrata : opening in Textedit and comparing them : In Snow this will tell you to install rosetta to run ppc In Lion it will simply bring up the error message that ppc is no longer. question is how and where Apple has blocked to run the translate binary.. Link to comment Share on other sites More sharing options...
smartie77 Posted July 22, 2011 Share Posted July 22, 2011 I found the answer : they disabled it on a kernel base plus removed the files in Lion .. In SnowLeo mach_kernel it contains reference to /usr/libexec/oah/translate ( the rosetta binary ) In Lions mach_kernel all references to /usr/libexec/oah point to "RosettaNonGrata" ( the exec which says ppc support is dead on Lion ) see : So someone needs to recompile the Lion xnu kernel and re-enable it. If we have such a ( otherwise unmodiefied ) 10.7 kernel, adding back the files to /usr/libexec/oah and telling sysctl to associate powerpc apps with /oah/translate it could work again. files needed in /usr/libexec/oah : ( my sl.rosettanongrata is the snow version of the same file,obviously we would need to replace the lion version with the sl version -- the "Shims" folder has all frameworks included that it needs) I never worked with OSX kernel, but I have knowledge how to reconfigure Linux kernels.. I might dive into that now and only for a software.. I never needed a modified Apple kernel for my hardware, this is totally crazy .. update - i did a compile on 10.7 kernel just to get a feeling for it and have now 2 mach_kernels, 32 and 64.. so at least I know now how to use the tools ;-) will dive into that later. Link to comment Share on other sites More sharing options...
hyperblue Posted July 23, 2011 Author Share Posted July 23, 2011 Great research smartie! It seems like you'll soon become the digital savior for many Lion users. I found the answer : they disabled it on a kernel base plus removed the files in Lion .. In SnowLeo mach_kernel it contains reference to /usr/libexec/oah/translate ( the rosetta binary ) In Lions mach_kernel all references to /usr/libexec/oah point to "RosettaNonGrata" ( the exec which says ppc support is dead on Lion ) see : So someone needs to recompile the Lion xnu kernel and re-enable it. If we have such a ( otherwise unmodiefied ) 10.7 kernel, adding back the files to /usr/libexec/oah and telling sysctl to associate powerpc apps with /oah/translate it could work again. files needed in /usr/libexec/oah : ( my sl.rosettanongrata is the snow version of the same file,obviously we would need to replace the lion version with the sl version -- the "Shims" folder has all frameworks included that it needs) I never worked with OSX kernel, but I have knowledge how to reconfigure Linux kernels.. I might dive into that now and only for a software.. I never needed a modified Apple kernel for my hardware, this is totally crazy .. update - i did a compile on 10.7 kernel just to get a feeling for it and have now 2 mach_kernels, 32 and 64.. so at least I know now how to use the tools ;-) will dive into that later. Link to comment Share on other sites More sharing options...
anarkhos Posted July 24, 2011 Share Posted July 24, 2011 update - i did a compile on 10.7 kernel just to get a feeling for it and have now 2 mach_kernels, 32 and 64.. so at least I know now how to use the tools ;-) will dive into that later. Please keep us updated! (didn't even know the Lion kernel source was out yet) Hrm, unfortunately I don't think Rosetta does any ISA translations. This means for Rosetta to work, you will need to have the PowerPC libraries as well. Snow Leopard libraries are FAT and contain the compiled PowerPC binaries. Lion will lack these, so running Rosetta on Lion will require having, at the very least, the Snow Leopard libraries as well. It may be possible to install the Snow Leopard binaries in ~/Library or someplace else and use the DYLD_LIBRARY_* flags point to it. At first I would try running a simple terminal command like Hello World then try a simple Cocoa or Carbon PPC app. Link to comment Share on other sites More sharing options...
earcaraxe Posted July 29, 2011 Share Posted July 29, 2011 AFAIK, but I could be wrong: I haven't gotten into anything regarding kernel recompiling, but unless I'm totally understanding something wrong, if translate were installed correctly and had all of its library dependencies, etc, there shouldn't be anything stopping us from running it manually from the commandline. I copied /usr/libexec/oah/ from a snow leopard machine to /usr/libexec/oah/ on my lion machine. I am showing the same file listing as smartie77. When I attempt to run ./translate I get segfault 11. I have pulled the crash reporter log and posted it here, just for posterity. I'm pretty sure the issue is mainly what anarkhos said regarding the libraries lacking all the code they need, but my knowledge of segfaults is super limited. bash-3.2# cat /Library/Logs/DiagnosticReports/translate_2011-07-29-113946_localhost.crash Process: translate [2258] Path: /usr/libexec/oah/translate Identifier: translate Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [2233] Date/Time: 2011-07-29 11:39:45.406 -0700 OS Version: Mac OS X 10.7 (11A511) Report Version: 9 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000ffff8020 VM Regions Near 0xffff8020: --> shared memory 00000000ffff0000-00000000ffff2000 [ 8K] r-x/r-x SM=SHM Application Specific Information: NO CRASH REPORT Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 translate 0xb80ab74c 0xb8000000 + 702284 1 translate 0xb815c33b spin_lock_wrapper + 95519 2 translate 0xb801d006 0xb8000000 + 118790 3 translate 0xb815d7e9 spin_lock_wrapper + 100813 4 translate 0xb81452f2 spin_lock_wrapper + 1238 5 translate 0xb800e8fd 0xb8000000 + 59645 Thread 0 crashed with X86 Thread State (32-bit): eax: 0xffff8020 ebx: 0xb815c2cb ecx: 0x00000000 edx: 0x00000080 edi: 0x00000001 esi: 0xb81f862c ebp: 0xb7fffb38 esp: 0xb7fffb38 ss: 0x00000023 efl: 0x00010282 eip: 0xb80ab74c cs: 0x0000001b ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0xffff8020 Logical CPU: 0 Binary Images: 0x8fe7a000 - 0x8feac9c7 dyld (195.5 - ???) <134323A7-49DC-3A9D-ACFD-32FAD0FD6BA2> /usr/lib/dyld 0x9126e000 - 0x91270ff7 libdyld.dylib (195.5.0 - compatibility 1.0.0) <637660EA-8D12-3B79-B644-041FEADC9C33> /usr/lib/system/libdyld.dylib 0x929f3000 - 0x929faff5 libsystem_dnssd.dylib (??? - ???) <B3217FA8-A7D6-3C90-ABFC-2E54AEF33547> /usr/lib/system/libsystem_dnssd.dylib 0x92a90000 - 0x92b5bfff libsystem_c.dylib (763.11.0 - compatibility 1.0.0) <44AA09FD-3A8F-3DCF-AD98-BC9071CA7376> /usr/lib/system/libsystem_c.dylib 0x92f4f000 - 0x92f6dff7 libsystem_kernel.dylib (1699.22.73 - compatibility 1.0.0) <D32C2E9C-8184-3FAF-8694-99FC619FC71B> /usr/lib/system/libsystem_kernel.dylib 0x92f6e000 - 0x92f75fff libnotify.dylib (80.0.0 - compatibility 1.0.0) <B3B3875D-311D-31A7-A09F-D1BC56795E00> /usr/lib/system/libnotify.dylib 0x932b2000 - 0x932f5ffd libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) <4BA1F5F1-F0A2-3FEB-BB62-F514DCBB3725> /usr/lib/system/libcommonCrypto.dylib 0x951b7000 - 0x951baff7 libcompiler_rt.dylib (6.0.0 - compatibility 1.0.0) <7F6C14CC-0169-3F1B-B89C-372F67F1F3B5> /usr/lib/system/libcompiler_rt.dylib 0x955c2000 - 0x955c5ff7 libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) <69357047-7BE0-3360-A36D-000F55E39336> /usr/lib/system/libmathCommon.A.dylib 0x959af000 - 0x959ddfe7 libSystem.B.dylib (159.0.0 - compatibility 1.0.0) <FA9B75F7-B989-3DD3-97FD-373EB95C5BA8> /usr/lib/libSystem.B.dylib 0x9645d000 - 0x9645eff0 libunc.dylib (24.0.0 - compatibility 1.0.0) <BCD277D0-4271-3E96-A4A2-85669DBEE2E2> /usr/lib/system/libunc.dylib 0x96e37000 - 0x96e37fff libdnsinfo.dylib (395.6.0 - compatibility 1.0.0) <959E5139-EB23-3529-8881-2BCB5724D1A9> /usr/lib/system/libdnsinfo.dylib 0x97547000 - 0x9755dffe libxpc.dylib (77.16.0 - compatibility 1.0.0) <2EAF3E13-19FA-3EF2-88D6-64ACBC3A6ADB> /usr/lib/system/libxpc.dylib 0x977d5000 - 0x97805ff7 libsystem_info.dylib (??? - ???) <C385F5A9-458A-3B49-9CC7-EA81DC5F9141> /usr/lib/system/libsystem_info.dylib 0x97ddf000 - 0x97dedfff libdispatch.dylib (187.5.0 - compatibility 1.0.0) <1883C8E2-D180-3EA0-8BEF-325F2FEDACD1> /usr/lib/system/libdispatch.dylib 0x980bd000 - 0x980c6fff libc++abi.dylib (14.0.0 - compatibility 1.0.0) <FEB5330E-AD5D-37A0-8AB2-0820F311A2C8> /usr/lib/libc++abi.dylib 0x980d2000 - 0x980daff3 libunwind.dylib (30.0.0 - compatibility 1.0.0) <E8DA8CEC-12D6-3C8D-B2E2-5D567C8F3CB5> /usr/lib/system/libunwind.dylib 0x988a4000 - 0x988a5fff libsystem_blocks.dylib (53.0.0 - compatibility 1.0.0) <B04592B1-0924-3422-82FF-976B339DF567> /usr/lib/system/libsystem_blocks.dylib 0x98cc6000 - 0x98ccbff7 libmacho.dylib (800.0.0 - compatibility 1.0.0) <56A34E97-518E-307E-8218-C5D43A33EE34> /usr/lib/system/libmacho.dylib 0x9a9f7000 - 0x9a9f7ffe libkeymgr.dylib (23.0.0 - compatibility 1.0.0) <7F0E8EE2-9E8F-366F-9988-E2F119DB9A82> /usr/lib/system/libkeymgr.dylib 0x9a9f8000 - 0x9a9fcffa libcache.dylib (47.0.0 - compatibility 1.0.0) <98A82BC5-0DD9-3212-9CAE-35A77278EEB6> /usr/lib/system/libcache.dylib 0x9aaee000 - 0x9aaefff7 libsystem_sandbox.dylib (??? - ???) <BC0A04E9-4F28-3BC8-AA7B-63C3451E9212> /usr/lib/system/libsystem_sandbox.dylib 0x9ab63000 - 0x9ab67ff3 libsystem_network.dylib (??? - ???) <E1455F3E-549B-3D50-A38B-17B394F3C7F6> /usr/lib/system/libsystem_network.dylib 0x9b17c000 - 0x9b184ff5 libcopyfile.dylib (85.1.0 - compatibility 1.0.0) <A1BFC320-616A-30AA-A41E-29D7904FC4C7> /usr/lib/system/libcopyfile.dylib 0x9c239000 - 0x9c23aff5 libremovefile.dylib (21.0.0 - compatibility 1.0.0) <9A1E12B7-F822-3544-8E1D-A6DC81E1F2E6> /usr/lib/system/libremovefile.dylib 0x9c39e000 - 0x9c400ff3 libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) <266CE9B3-526A-3C41-BA58-7AE66A3B15FD> /usr/lib/libstdc++.6.dylib 0x9c5c5000 - 0x9c5c6ff7 libquarantine.dylib (36.0.0 - compatibility 1.0.0) <70782AEC-8933-3EB4-91CA-E44C0E768C90> /usr/lib/system/libquarantine.dylib 0x9c690000 - 0x9c698ff3 liblaunch.dylib (392.18.0 - compatibility 1.0.0) <CD470A1E-0147-3CB1-B44D-0B61F9061826> /usr/lib/system/liblaunch.dylib 0xb8000000 - 0xb81defff translate (??? - ???) <3E4E06B8-E1FC-B232-1371-643DC0FBE8C9> /usr/libexec/oah/translate External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 5688 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=46.0M resident=17.2M(37%) swapped_out_or_unallocated=28.8M(63%) Writable regions: Total=18.1M written=352K(2%) resident=400K(2%) swapped_out=0K(0%) unallocated=17.7M(98%) REGION TYPE VIRTUAL =========== ======= MALLOC 9316K MALLOC guard page 16K Stack 64.0M VM_ALLOCATE 512K __DATA 860K __LINKEDIT 41.5M __MYZEROPAGE 2.0G __OBJC 4K __TEXT 4632K mapped file 204.0M shared memory 12K shared pmap 12.9M =========== ======= TOTAL 2.3G bash-3.2# Link to comment Share on other sites More sharing options...
anarkhos Posted August 1, 2011 Share Posted August 1, 2011 (sorry, been in the woods all week) I do not use Lion yet so I can't debug your error. You have to use gdb to debug the problem. The error simply means you're trying to access an address in VM which doesn't exist or you don't have access to. Usually it means you're trying to access memory that has been released or a pointer that has been overwritten. translate only links to four libraries: otool -L /usr/libexec/oah/translate /usr/libexec/oah/translate: /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 697.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) One can inspect further and see what functions are called and build shim libraries if the Lion ones do not work for whatever reason. Do the listed libraries even exist in Lion? At any rate, these libraries are all open source. For those not in the know, libSystem.B.dylib is an amalgamation of various static libraries in an 'umbrella' library. If you want to know why translate is crashing, you have to use gdb. Link to comment Share on other sites More sharing options...
earcaraxe Posted August 2, 2011 Share Posted August 2, 2011 Apparently upgrading to lion broke all of my xcode tools, so I'm currently updating my tools. In terms of libraries, I took a look and have this to report: /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit This exists. -rwxr-xr-x 1 root wheel 1178960 Jul 28 15:55 IOKit /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) I'm showing: bash-3.2# ls -al | grep libstdc+ -rwxr-xr-x 1 root wheel 1595728 Jul 28 15:55 libstdc++.6.0.9.dylib lrwxr-xr-x 1 root wheel 21 Jul 28 15:56 libstdc++.6.dylib -> libstdc++.6.0.9.dylib lrwxr-xr-x 1 root wheel 17 Jul 28 15:56 libstdc++.dylib -> libstdc++.6.dylib So again, it looks like it exists, although it appears to be a smlink to libstdc++.6.0.9.dylib /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 697.0.0) This, when I search for it, is just again a symlink, but it's a symlink to libSystem.B.dylib Which fits your description of it being an amalgamation of libraries. lrwxr-xr-x 1 root wheel 17 Jul 28 15:56 libgcc_s.1.dylib -> libSystem.B.dylib bash-3.2# ls -al | grep libSystem -r-xr-xr-x 1 root wheel 486336 Jul 28 15:55 libSystem.B.dylib lrwxr-xr-x 1 root wheel 17 Jul 28 15:56 libSystem.dylib -> libSystem.B.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libc.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libdbm.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libdl.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 17 Jul 28 15:56 libgcc_s.1.dylib -> libSystem.B.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libinfo.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libm.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libpoll.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libproc.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 libpthread.dylib -> libSystem.dylib lrwxr-xr-x 1 root wheel 15 Jul 28 15:56 librpcsvc.dylib -> libSystem.dylib I need to find out version numbers on these and get back to you for more information. Link to comment Share on other sites More sharing options...
earcaraxe Posted August 3, 2011 Share Posted August 3, 2011 Here's the output from GDB but appears totally useless, unless someone can read it better than I can. (gdb) run /usr/libexec/oah/translate Starting program: /usr/libexec/oah/translate /usr/libexec/oah/translate Reading symbols for shared libraries + done unable to read unknown load command 0x24 unable to read unknown load command 0x26 Reading symbols for shared libraries ++......................... done Program exited with code 055. (gdb) Here's my otool -L output. I'm showing one less library than you, which I guess makes sense since it's been combined into the libSystem.B.dylib ? bash-3.2# /Developer/usr/bin/otool -L /usr/libexec/oah/translate /usr/libexec/oah/translate: /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) Ok actually I'm missing IOKit Link to comment Share on other sites More sharing options...
anarkhos Posted August 3, 2011 Share Posted August 3, 2011 Here's the output from GDB but appears totally useless, unless someone can read it better than I can. (gdb) run /usr/libexec/oah/translate Starting program: /usr/libexec/oah/translate /usr/libexec/oah/translate Reading symbols for shared libraries + done unable to read unknown load command 0x24 unable to read unknown load command 0x26 Reading symbols for shared libraries ++......................... done Program exited with code 055. (gdb) It looks like the debugging symbols were stripped, and PT_DENY_ATTACH was activated. http://www.steike.com/code/debugging-itunes-with-gdb/ http://landonf.bikemonkey.org/code/macosx/...H.20080122.html You can most likely bypass the ptrace call and continue debugging using the method in the first URL I provided (the 'return' command makes a function return immediately without further execution). Here's my otool -L output. I'm showing one less library than you, which I guess makes sense since it's been combined into the libSystem.B.dylib ? bash-3.2# /Developer/usr/bin/otool -L /usr/libexec/oah/translate /usr/libexec/oah/translate: /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) Ok actually I'm missing IOKit That's odd. I'm using 10.6.8. Link to comment Share on other sites More sharing options...
anarkhos Posted August 3, 2011 Share Posted August 3, 2011 PS: rosetta is mentioned in the kernel: strings /mach_kernel |grep oah /usr/libexec/oah/RosettaNonGrata /usr/libexec/oah/translate Link to comment Share on other sites More sharing options...
mePy2 Posted April 30, 2019 Share Posted April 30, 2019 Is there anybody out there? Link to comment Share on other sites More sharing options...
Sam from Stack Exchange Posted October 31, 2019 Share Posted October 31, 2019 (edited) @mePy2 yes, I am (6 months later). I'm starting to look into making Rosetta work on macOS Sierra, and have a question about it on Stack Exchange. @anarkhos did you ever get Rosetta to work on Lion? Do you know if any more work was ever done on running Rosetta? Edited October 31, 2019 by Sam from Stack Exchange changed capital Y to lowercase y Link to comment Share on other sites More sharing options...
Kennethhuber1 Posted November 12, 2019 Share Posted November 12, 2019 On 7/21/2011 at 12:41 AM, hyperblue said: I've tried installing the SL package of Roestta on Lion and it is a terrible no go. I've been poking around to see what frameworks are needed from old SL in order to get Rosetta to work, but I'm still getting errors. write my term paper Does anyone know if Rosetta is dependent on the Kernel or just frameworks? Also, is anyone else working on Rosetta support for Lion? Try to look here: https://forums.macrumors.com/threads/installing-snow-leopard-and-rosetta-into-parallels-7-in-lion.1365439/page-21 Also Rosetta won't go with applications depending on one or more PowerPC-only kernel extensions. Link to comment Share on other sites More sharing options...
Recommended Posts