As promised, here is the report:
1a) using https://github.com/devernay/xcodelegacy I can compile the 32bit Macosx cog spur from vm cog branch revision 3475 with the legacy MacCarbon VM / gcc 4.2 / Xcode 7.0.1 on El Capitan
1b) the compiled vm pass most tests in Squeak 5.0 trunk only SqueakSSL segfault while executing a primitive, so I disabled this test...
2a) I can compile my own VMMaker branch with same configuration using the LLVM clang 7.0 compiler / legacy MacCarbon repository http://smalltalkhub.com/mc/nice/NiceVMExperiments/main (but i have also a few unpublished changes in the platform c sources)
2b) My own brand also pass most tests - same number of failures/errors (also segfault in SqueakSSL test)
So YES, it is possible to compile a slightly modified VM with latest apple clang modulo a few VMMaker/platform source changes.
3a) Upgrading to svn 3478, I can also compile the 32bits cog spur cocoa flavours with ./miosvm -A For some reason (see below the LOGF report) only the CocoaDebug.app is produced by the script.
3b) the Cocoa also pass most tests - with almost same score (+2 failures , -1 failure) but it seems like IntegerTest>testReciprocalModulo failure was not reproducible...
So YES, at least with gcc4.2, it is possible to compile the ios/cocoa flavour of latest cog.
I can also try to compile the cocoa with my own VMMaker and clang LLVM 7.0, but if it's only CocoaDebug.app there's no point, we want -O2 or -O3, it's where clang might hurt...
__________________________
The reference cog config:
Image ----- /Users/nicolas/Smalltalk/Squeak/trunk/trunk46-spur.image Squeak4.5 latest update: #15290 Current Change Set: Unnamed1 Image format 6521 (32 bit)
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog_orig/build.macos32x86/squeak.cog.spur/Fast.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1468] Squeak Cog Spur 5.0.3444 Mac OS X built on Oct 20 2015 17:25:02 UTC Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 20 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 20 2015
_____________________
my own VM branch config:
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog/build.macos32x86/squeak.cog.spur/Fast.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1494] Squeak Cog Spur 5.0.3444 Mac OS X built on Oct 21 2015 20:34:04 UTC Compiler: 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72) platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 StackToRegisterMappingCogit VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015
__________________________
The CocoaVM config:
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog_orig/build.macos32x86/squeak.cog.spur/CocoaDebug.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1468] 6 Mac Cocoa Cog 5.8b12 21-Sep-10 >1B0534FA-246C-47C5-AB29-7A76C81CCDCB< platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 21 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 21 2015
__________________________
Tests results are attached below in png.
__________________________
The LOGF telling why CocoaFast.app was not built:
cp: CocoaFast.app/Contents/Resources: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle: unable to copy extended attributes to CocoaFast.app/Contents/Resources: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle/Contents: unable to copy extended attributes to CocoaFast.app/Contents/Resources/Contents: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/Info.plist: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/MacOS: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle/Contents/MacOS: unable to copy extended attributes to CocoaFast.app/Contents/Resources/Contents/MacOS: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/MacOS/UnixOSProcessPlugin: No such file or directory
__________________________
The crash dump for Squeak SSL ran with assert vm:
Segmentation fault Wed Oct 21 22:41:40 2015
/Users/nicolas/Smalltalk/Squeak/vm_cog/build.macos32x86/squeak.cog.spur/Assert.app/Contents/MacOS/Squeak Squeak VM version: 5.0 5.0.3444 Mac OS X built on Oct 21 2015 20:33:43 UTC Compiler: 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72) [Assert Spur VM] Built from: CoInterpreter VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 With: StackToRegisterMappingCogit VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 Revision: VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
C stack backtrace & registers: eax 0x00000000 ebx 0x0000c02c ecx 0x0000002b edx 0x97d207fe edi 0x0000c02c esi 0x0000c02c ebp 0xbff5d078 esp 0xbff5d060 eip 0x97d2387d (0 libsystem_coretls.dylib 0x97d2387d SelectNewCiphersuite + 143) 1 Squeak 0x000492d6 reportStackState + 166 2 Squeak 0x00049970 sigsegv + 144 3 libsystem_platform.dylib 0x9316b79b _sigtramp + 43 4 ??? 0xffffffff 0x0 + 4294967295 5 libsystem_coretls.dylib 0x97d28b0e SSLAdvanceHandshake + 502 6 libsystem_coretls.dylib 0x97d2964d SSLProcessHandshakeRecordInner + 237 7 libsystem_coretls.dylib 0x97d29f06 SSLProcessHandshakeRecord + 1018 8 libsystem_coretls.dylib 0x97d2e41a tls_handshake_process + 135 9 Security 0x9093278b SSLHandshakeProceed + 174 10 Security 0x909326ca SSLHandshake + 155 11 SqueakSSL 0x01e1fedc sqAcceptSSL + 620 12 SqueakSSL 0x01e20a70 primitiveAccept + 464 13 Squeak 0x000b2c72 primitiveExternalCall + 770 14 Squeak 0x000a1555 interpret + 25365 15 Squeak 0x000a70e5 enterSmalltalkExecutiveImplementation + 245 16 Squeak 0x0009b3dc interpret + 412 17 Squeak 0x0003ec3c EventLoopEventHandler + 28 18 HIToolbox 0x954eb68b _Z22_InvokeEventHandlerUPPP25OpaqueEventHandlerCallRefP14OpaqueEventRefPvPFlS0_S2_S3_E + 36 19 HIToolbox 0x954939a0 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1832 20 HIToolbox 0x95492bb4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 402 21 HIToolbox 0x95492a1a SendEventToEventTargetWithOptions + 40 22 HIToolbox 0x954cc212 _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 1994 23 HIToolbox 0x95493def _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2935 24 HIToolbox 0x95492bb4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 402 25 HIToolbox 0x954a5f6d SendEventToEventTarget + 34 26 HIToolbox 0x9564309e ToolboxEventDispatcher + 82 27 HIToolbox 0x95642f5f RunApplicationEventLoop + 240 28 Squeak 0x0003ebfa RunApplicationEventLoopWithSqueak + 186 29 Squeak 0x0004989b main + 1067 30 Squeak 0x00002035 start + 53
Smalltalk stack dump: 0xbff9d3d8 I SqueakSSL>accept:from:to:into: 0x61a4748: a(n) SqueakSSL 0xbff9d418 I SqueakSSL>accept 0x61a4748: a(n) SqueakSSL 0xbff9d430 M [] in SqueakSSLTest>testConnectAccept 0x79d2e38: a(n) SqueakSSLTest 0xbff9d44c M BlockClosure>on:do: 0x61a7718: a(n) BlockClosure 0xbff9d470 M [] in SqueakSSLTest>testConnectAccept 0x79d2e38: a(n) SqueakSSLTest 0xbff9d490 I [] in BlockClosure>newProcess 0x61a7538: a(n) BlockClosure
---------- Forwarded message ---------- From: Nicolas Cellier nicolas.cellier.aka.nice@gmail.com Date: 2015-10-21 23:57 GMT+02:00 Subject: Compilation of MacOSX 32bit cog spur with Clang LLVM 7.0 / El capitan To: Squeak Virtual Machine Development Discussion < vm-dev@lists.squeakfoundation.org>
As promised, here is the report:
1a) using https://github.com/devernay/xcodelegacy I can compile the 32bit Macosx cog spur from vm cog branch revision 3475 with the legacy MacCarbon VM / gcc 4.2 / Xcode 7.0.1 on El Capitan
1b) the compiled vm pass most tests in Squeak 5.0 trunk only SqueakSSL segfault while executing a primitive, so I disabled this test...
2a) I can compile my own VMMaker branch with same configuration using the LLVM clang 7.0 compiler / legacy MacCarbon repository http://smalltalkhub.com/mc/nice/NiceVMExperiments/main (but i have also a few unpublished changes in the platform c sources)
2b) My own brand also pass most tests - exact same number of failures/errors (also segfault in SqueakSSL test)
So YES, it is possible to compile a slightly modified VM with latest apple clang modulo a few VMMaker/platform source changes.
3a) Upgrading to svn 3478, I can also compile the 32bits cog spur cocoa flavours with ./miosvm -A For some reason (see below the LOGF report) only the CocoaDebug.app is produced by the script.
3b) the Cocoa also pass most tests - with almost same score (+2 failures , -1 failure) but it seems like IntegerTest>testReciprocalModulo failure was not reproducible...
So YES, at least with gcc4.2, it is possible to compile the ios/cocoa flavour of latest cog.
I can also try to compile the cocoa with my own VMMaker and clang LLVM 7.0, but if it's only CocoaDebug.app there's no point, we want -O2 or -O3, it's where clang might hurt...
__________________________
The reference cog config:
Image ----- /Users/nicolas/Smalltalk/Squeak/trunk/trunk46-spur.image Squeak4.5 latest update: #15290 Current Change Set: Unnamed1 Image format 6521 (32 bit)
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog_orig/build.macos32x86/squeak.cog.spur/Fast.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1468] Squeak Cog Spur 5.0.3444 Mac OS X built on Oct 20 2015 17:25:02 UTC Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 20 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 20 2015
_____________________
my own VM branch config:
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog/build.macos32x86/squeak.cog.spur/Fast.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1494] Squeak Cog Spur 5.0.3444 Mac OS X built on Oct 21 2015 20:34:04 UTC Compiler: 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72) platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 StackToRegisterMappingCogit VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015
__________________________
The CocoaVM config:
Virtual Machine --------------- /Users/nicolas/Smalltalk/Squeak/vm_cog_orig/build.macos32x86/squeak.cog.spur/CocoaDebug.app/Contents/MacOS/Squeak Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1468] 6 Mac Cocoa Cog 5.8b12 21-Sep-10 >1B0534FA-246C-47C5-AB29-7A76C81CCDCB< platform sources revision VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 21 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1468 uuid: 2b6a8fd8-cddf-447d-bee4-11d53d2ef9bc Oct 21 2015
__________________________
Tests results are attached below in png.
__________________________
The LOGF telling why CocoaFast.app was not built:
cp: CocoaFast.app/Contents/Resources: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle: unable to copy extended attributes to CocoaFast.app/Contents/Resources: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle/Contents: unable to copy extended attributes to CocoaFast.app/Contents/Resources/Contents: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/Info.plist: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/MacOS: No such file or directory cp: UnixOSProcessPlugin/build/Release/UnixOSProcessPlugin.bundle/Contents/MacOS: unable to copy extended attributes to CocoaFast.app/Contents/Resources/Contents/MacOS: No such file or directory cp: CocoaFast.app/Contents/Resources/Contents/MacOS/UnixOSProcessPlugin: No such file or directory
__________________________
The crash dump for Squeak SSL ran with assert vm:
Segmentation fault Wed Oct 21 22:41:40 2015
/Users/nicolas/Smalltalk/Squeak/vm_cog/build.macos32x86/squeak.cog.spur/Assert.app/Contents/MacOS/Squeak Squeak VM version: 5.0 5.0.3444 Mac OS X built on Oct 21 2015 20:33:43 UTC Compiler: 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72) [Assert Spur VM] Built from: CoInterpreter VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 With: StackToRegisterMappingCogit VMMaker.oscog-nice.1494 uuid: fe9853ed-0415-469f-b47b-a2760d270606 Oct 21 2015 Revision: VM: r3444 http://squeakvm.org/svn/squeak/branches/Cog Date: 2015-09-24 21:19:28 +0200 Plugins: r3472 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
C stack backtrace & registers: eax 0x00000000 ebx 0x0000c02c ecx 0x0000002b edx 0x97d207fe edi 0x0000c02c esi 0x0000c02c ebp 0xbff5d078 esp 0xbff5d060 eip 0x97d2387d (0 libsystem_coretls.dylib 0x97d2387d SelectNewCiphersuite + 143) 1 Squeak 0x000492d6 reportStackState + 166 2 Squeak 0x00049970 sigsegv + 144 3 libsystem_platform.dylib 0x9316b79b _sigtramp + 43 4 ??? 0xffffffff 0x0 + 4294967295 5 libsystem_coretls.dylib 0x97d28b0e SSLAdvanceHandshake + 502 6 libsystem_coretls.dylib 0x97d2964d SSLProcessHandshakeRecordInner + 237 7 libsystem_coretls.dylib 0x97d29f06 SSLProcessHandshakeRecord + 1018 8 libsystem_coretls.dylib 0x97d2e41a tls_handshake_process + 135 9 Security 0x9093278b SSLHandshakeProceed + 174 10 Security 0x909326ca SSLHandshake + 155 11 SqueakSSL 0x01e1fedc sqAcceptSSL + 620 12 SqueakSSL 0x01e20a70 primitiveAccept + 464 13 Squeak 0x000b2c72 primitiveExternalCall + 770 14 Squeak 0x000a1555 interpret + 25365 15 Squeak 0x000a70e5 enterSmalltalkExecutiveImplementation + 245 16 Squeak 0x0009b3dc interpret + 412 17 Squeak 0x0003ec3c EventLoopEventHandler + 28 18 HIToolbox 0x954eb68b _Z22_InvokeEventHandlerUPPP25OpaqueEventHandlerCallRefP14OpaqueEventRefPvPFlS0_S2_S3_E + 36 19 HIToolbox 0x954939a0 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1832 20 HIToolbox 0x95492bb4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 402 21 HIToolbox 0x95492a1a SendEventToEventTargetWithOptions + 40 22 HIToolbox 0x954cc212 _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 1994 23 HIToolbox 0x95493def _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2935 24 HIToolbox 0x95492bb4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 402 25 HIToolbox 0x954a5f6d SendEventToEventTarget + 34 26 HIToolbox 0x9564309e ToolboxEventDispatcher + 82 27 HIToolbox 0x95642f5f RunApplicationEventLoop + 240 28 Squeak 0x0003ebfa RunApplicationEventLoopWithSqueak + 186 29 Squeak 0x0004989b main + 1067 30 Squeak 0x00002035 start + 53
Smalltalk stack dump: 0xbff9d3d8 I SqueakSSL>accept:from:to:into: 0x61a4748: a(n) SqueakSSL 0xbff9d418 I SqueakSSL>accept 0x61a4748: a(n) SqueakSSL 0xbff9d430 M [] in SqueakSSLTest>testConnectAccept 0x79d2e38: a(n) SqueakSSLTest 0xbff9d44c M BlockClosure>on:do: 0x61a7718: a(n) BlockClosure 0xbff9d470 M [] in SqueakSSLTest>testConnectAccept 0x79d2e38: a(n) SqueakSSLTest 0xbff9d490 I [] in BlockClosure>newProcess 0x61a7538: a(n) BlockClosure
Editor's note - you are seeing two versions of this post because the first one was a little to large for the mailing list limit. I scrambled to approve it, meanwhile Nicolas re-posted with smaller attachments.
Dave
On Thu, Oct 22, 2015 at 12:24:29AM +0200, Nicolas Cellier wrote:
---------- Forwarded message ---------- From: Nicolas Cellier nicolas.cellier.aka.nice@gmail.com Date: 2015-10-21 23:57 GMT+02:00 Subject: Compilation of MacOSX 32bit cog spur with Clang LLVM 7.0 / El capitan To: Squeak Virtual Machine Development Discussion < vm-dev@lists.squeakfoundation.org>
As promised, here is the report:
2015-10-22 0:27 GMT+02:00 David T. Lewis lewis@mail.msen.com:
Editor's note - you are seeing two versions of this post because the first one was a little to large for the mailing list limit. I scrambled to approve it, meanwhile Nicolas re-posted with smaller attachments.
Dave
Yep sorry, I reposted before clicking the delete link in the notification, just a question of seconds...
vm-dev@lists.squeakfoundation.org