[Vm-dev] How to generate a consistent iOS and Unix VM?

Mariano Martinez Peck marianopeck at gmail.com
Fri Apr 22 12:04:24 UTC 2011


On Fri, Apr 22, 2011 at 1:34 PM, Stefan Marr <squeak at stefan-marr.de> wrote:

> Hi Mariano:
>
> Here some feedback to your blog posts, since, well, I had several issues
> with it.
>
> So I did:
>
> $ wget --no-check-certificate
> http://www.pharo-project.org/pharo-download/unstable-core
>
> which gets me: PharoCore-1.3-13159
>
> Then opening a workspace:
>
> -----
> Deprecation raiseWarning: false.
>  Gofer new
>  squeaksource: 'MetacelloRepository';
>  package: 'ConfigurationOfCog';
>  load.
>
> (Smalltalk at: #ConfigurationOfCog) project latestVersion load.
> ---
>
> Bye the way there is a typo on your blog: #latestVersion was originally
> #la_s_testVersion
>
>
First, thanks a lot for the feedback, is really appreaciated.
I've just updated that typo.



> Executing the code results in a 'MessageNotUnderstood: AnObsoleteAutoStart
> class>>addLauncherFirst:'
>
>
Yes. This is because thelastes unstable PharoCore was really *unstable*, and
hence the problem. This is why in the first post ("Building the VM from
scratch using Git and CMakeVMMaker") I say explicitly which pharo image to
use (to avoid problems like this one).
Pharo guys want to be sure that Hudson can always buid the VM, and if it
doesn't (like in this case), be able to detect it and fix it ASAP.



> Ok, just commenting that out and continuing, I run into the next obstacles:
> No class comments,


There are class comment. Not in all classes, but there are. And of course,
you are welcome to help also. Just ask access and commit.


> and your blog posts also do not tell me whether I can just use a plain
> CocoaIOSCogConfig or whether I have to chose between the JIT or Stack
> variant. (That might be obvious for you, but it is not)
>
>
In fact, I have explained that several times. Take into account that my blog
is a sequence of posts. So...just reading a single post may not be enough,
like in this case.
I wrote it here:
http://marianopeck.wordpress.com/2011/04/02/departure-vm-introduction/
under the section "Cog VM and current status"
and here http://marianopeck.wordpress.com/2011/04/16/buildin
g-the-vm-second-part/
under thesection "Available CogVMs" and "CMakeVMaker available
configurations"

what was not clear in particular ?



> Ok, next problem:
>
> You customize the following properties:
>
>
> resourcesDir:'/Users/mariano/Pharo/vm/git/cogVM2/blessed/macbuild/resources';
> outputDir: '/Users/mariano/binaries/results';
>
> but they do not seem to exist.
>

That was an example just to show that you can customize them and set the
directories to whatever place you want.
I've added a comment. Anyway, using the "default" behavior (copying the
image to a subdirectory of /blessed), you should have not that problem.



>
> Ok, lets continue without them.
>
> Still undecided what I want, I go with CocoaIOSCogConfig:
>
> CocoaIOSCogStackConfig new
>  srcDir: '/tmp/make-squeak-vm/squeak-src';
>  platformsDir: '/tmp/make-squeak-vm/from_squeak';
>  buildDir: '/tmp/make-squeak-vm/build';
>  generateSources;
>  generate.
>
> That fails with a very inappropriate error: primCreateDirectory: failed.
>
>
I am not sure why that problem. But this is something expected. In order to
customize the paths, you may have such problems.
Again, if you don't want to face such problems use the default behavior. And
if you find a problem, and have a solution, please submit it.


> *sigh* lets see what's going on:
> >  self primCreateDirectory: (self fullNameFor: localFileName) asVmPathName
>  inspecting '(self fullNameFor: localFileName) asVmPathName' reveals
> '/${topDir}' *sigh*
>
> Ok, what ever, I will probably just have to choose the StackConfig then...
>
> And that of course fails too... because the platform directory was not
> existing.
>

You should point platformsDir: to the platforms directory of the "platform
code". That is, in git for example /blessed/platforms  or in svn the same
/trunk/platforms.
I've just added this piece of text "The "platformsDir" *must*  map with
"platforms" directory that we downloaded with Git, it cannot be choosed
randomly. The same with the "resourcesDir" (which in fact is only for Mac).
The rest of the directories (src, build and output) are not created by
VMMaker nor Git. They are just directories that I have created by my own and
I want to use them instead of the default."


But it fails without reasonable error message and I think it should not
> fail, because you say it is not actually used, and a quick test reveals it
> does not matter whether the directory is empty or the actual code is there
> since the generated code is identical.
>
>
Sorry, I did not understand.

Conclusion for your last problems: use the default/recommended approach:
copy your image to a subdirectory where you downloaded git. And all paths
will be set automatically. The only thing you have to do is XXXConf
generateWithSources.
And, if you want to use specific paths, then send a clear mail to the
mailing lsit, with a way to reproduce it and hopefully someone will fix it.


Cheers

Mariano


>
> Hope that helps ironing out some of the rough edges.
>
>
> Best regards
> Stefan
>
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax:   +32 2 629 3525
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110422/90a54949/attachment.htm


More information about the Vm-dev mailing list