On 26 September 2012 05:13, Yanni Chiu yanni@rogers.com wrote:
On 25/09/12 11:33 AM, Yanni Chiu wrote:
So any ideas?
I tried to build the CogVM.
- search for build instructions, blog post, etc.
- almost give up in frustration before discovering the process noted below
:)
- download the tar ball from:
https://ci.lille.inria.fr/pharo/view/Cog/job/Cog-VM/Architecture=32,OS=mac/
- find and install cmake
- already had a C compiler installed
- the HOWTOBUILD file said: cd build cmake . make
- the build path is hard coded so:
yes, this is an unavoidable outcome of being able to specify custom paths by developer for sources/build directories.. they are written into directories.cmake file. Initially all paths there was relative, but since user can specify own (absolute) custom paths, there is no way how it can keep working using relative paths.
You can edit this file, or you can just run an image placed in ./image subdirectory and rerun cmake files generation on you machine, so paths will be fixed automagically.
% mkdir -p Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/ % mv ~/src Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/cog # where ~/src is the un-tar'ed tar ball from above
- run cmake and make again (sometimes had to remove CMakeCache.txt file)
- build fails at:
==== [ 77%] Building CXX object CMakeFiles/CogVM.dir/Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.m.o In file included from /Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.m:44: /Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.h:46: error: cannot find protocol declaration for ‘NSApplicationDelegate’ make[2]: *** [CMakeFiles/CogVM.dir/Users/hudson/jenkins/workspace/Cog-VM/Architecture/32/OS/mac/cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.m.o] Error 1 make[1]: *** [CMakeFiles/CogVM.dir/all] Error 2 make: *** [all] Error 2 ====
- the culprit is the line:
@interface SqueakOSXAppDelegate : sqSqueakAppDelegate
<NSApplicationDelegate> - web search for NSApplicationDelegate - find Apple dev page that says: NSApplicationDelegate - Available in OS X v10.6 and later.
So, is there an important reason to use NSApplicationDelegate? IIUC, it results in the VM requiring OSX 10.6 or higher, which means my 10.5.8 will never work with CogVM's built this way.
is there a reason why you cannot upgrade your OS?
On 26/09/12 6:03 AM, Igor Stasenko wrote:
- the culprit is the line:
@interface SqueakOSXAppDelegate : sqSqueakAppDelegate
<NSApplicationDelegate> - web search for NSApplicationDelegate - find Apple dev page that says: NSApplicationDelegate - Available in OS X v10.6 and later.
is there a reason why you cannot upgrade your OS?
No reason other than it used to happen automatically when I got a new machine. That hasn't happened yet.
I'll try a bit more to get it to work on 10.5.8, now that I can build a VM.
On 26/09/12 11:07 AM, Yanni Chiu wrote:
I'll try a bit more to get it to work on 10.5.8, now that I can build a VM.
Okay, got it to work!
Three changes:
1. SqueakOSXAppDelegate.h - use NSObject instead ofNSApplicationDelegate
2. sqSqueakOSXScreenAndWindow.h - use NSObject instead of NSWindowDelegate
3. SqueakOSXAppDelegate.m - use CoreGraphics instead of OpenGL
//#ifndef USE_CORE_GRAPHICS //# import "sqSqueakOSXOpenGLView.h" //# define ContentViewClass sqSqueakOSXOpenGLView //#else # import "sqSqueakOSXCGView.h" # define ContentViewClass sqSqueakOSXCGView //#endif
====
Along the way, I found:
Issue 5650: OneClick 1.4 can't be launched on MacOSX Mac Air 10.5.8 http://code.google.com/p/pharo/issues/detail?id=5650
While I agree that support for old OS releases should have a reasonable limit, I don't buy 10.5 dropped when 10.8 is around the corner is the right limit. My machine is circa 2009, just three years or so. Apple may have good reason to want to move the user/developer base off of 10.5, because of hardware (pad/phone) and UI native widget changes. In the Squeak/Pharo case, we just need a single window to draw in - that should hardly obsolete a three year old computer.
I'll add this thread to the issue report (5650).
vm-dev@lists.squeakfoundation.org