[squeak-dev] A Bounty for CMake-ifying stack/Cog vm build process

Tobias Pape Das.Linux at gmx.de
Fri Nov 8 15:49:42 UTC 2013


Hi Igor,
hi list,

sorry for replying late,…

My reply was intended to stir the conversation a litte,
to keep it going, which, I assume, it did. I really like
your opinion, Igor :)


On 07.11.2013, at 14:28, Igor Stasenko <siguctua at gmail.com> wrote:

>> 
>> 
>> 
>> On 7 November 2013 08:58, Tobias Pape <Das.Linux at gmx.de> wrote:
>> Hey Tim and all,
>> On 07.11.2013, at 05:00, Ron Teitelbaum <ron at usmedrec.com> wrote:
>> 
>> > Hey Tim,
>> >
>> > Göran and Eliot have been discussing this.  I just talked to Eliot about it
>> > yesterday.  He said he was happy to support cmake but didn't want to have to
>> > do the work himself.  I'm hoping that the work Göran is doing on this now
>> > can be turned over to Eliot when it is finished.  I think there is agreement
>> > that combining the excellent work of pharo build with Eliot's new vm work is
>> > a very good thing to do.  The work to merge the build environments is
>> > already being done at 3D ICC.  We are working on this for the Mac also but
>> > have not discussed it with Ian yet.
>> >
>> > Ron Teitelbaum
>> >
>> >> -----Original Message-----
>> >> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
>> >> bounces at lists.squeakfoundation.org] On Behalf Of tim Rowledge
>> >> Sent: Wednesday, November 06, 2013 9:04 PM
>> >> To: The general-purpose Squeak developers list
>> >> Subject: Re: [squeak-dev] A Bounty for CMake-ifying stack/Cog vm build
>> > process
>> >>
>> >>
>> >> Wow, no interest? Is it because make is painful or because nobody needs to
>> >> make any more money?
>> 
>> 
>> I actually have interest but I am currently reluctant,
>> for time-capturing reasons in my personal and work life.
>> 
>> However, Here is what I would do:
>> 
>> • Start from Ians CMake work, and try to generalize it for the
>>   non-Linux platforms
>> • Windows would be kind-of straight-forward,
>> • For OS X, I would really want to have the Cocoa-based VM stuff
>>   (aka Squeak VM 5.4.7.x) integrated and proper Xcode files
>>   generated, especially to be able to have iOS VMs built automatically.
>>    Here, some information from John McIntosh would be helpfull, especially
>>   a simple walk-through.
>>    I have some experience with that[1]
>> 
>> 
>> Despite all admiration I have for the way the PharoVM is built, there is one
>> thing that bothers me:
>> • You first somehow generate the VM sources (which is fine, and the automated way is amazing)
>> • THEN, the a Script generates CMake-Files
>> • CMake then generates Makefiles
>> • and then finally a vm is compiled.
>> This is one generating step too much, for my taste.
>> Personally, I'd prefer CMake to just pick up the C-files generated by VMMaker,
>> so that adding a new platform does not need to change the VMMaker…
>> 
>> The main big issue with 'platform-neutral' static source files, that they tend to
>> grow with tons of #ifdef-s over time, reducing readability and creating a mess.
>> 
> My point is that one or another way you have to deal with platform differences,
> and the way how i prefer to do it is using smalltalk code,
> but not .m4 files, or .cmake files, or writing a medium novel long configuration files
> using strange (better to say weird) scripting DSL.
> I can express all build process logic in smalltalk, which does not lessens the amount
> of work to deal with all platform nuances and dependencies etc, but at least it allows me to organize and shape it
> into some manageable form, which is easy to change & learn.
>  
>  And another difference is, that i prefer working with browser & classes than
> with dozens of directories and files lying here and there.


I did not want to imply we have to do it my way, not at all.
And you are certainly right. Smalltalk is a good way to do things.

The only thing that got me thinking is, 
  a lot of people use tools like CMake to drive build processes, and
  they know the edges of the domain very well. Building software can
  be quite complex: think Platforms, compiler quirks, SDK restrictions,
  cross compilations, to just name a few.
   CMake (even more than autotools) is quite good at these tasks, 
  especially regarding the cross-platform part.
If we now start to, effectively, reimplement CMake or autotools, we will
run in the issues, those tools all have solved years ago. CMake even has
beautiful output.

I think it would take an tremendous effort to get a Build tool that
(only thinking of the Squeak/Pharo VM)
• can build well with different compilers (Clang/Gcc, probably Microsoft)
• can handle the platform-discovery (Linux, OSX, Windows, RISC!)
• can handle library discovery (finding stuff like libuuid)
• can do cross-compilation and the signing-stuff (iOS, perhaps android)

If we get this working, this would be amazing. 
I am a bit reluctant, it would be a lot of work for me…



> 
> But sure thing, it is a question of taste. If you prefer to maintain this:
> -------------------------

> [22 lines old CMAKE]

> --------------------------
> And/or this:
> --------------------------

> [96 lines autoconf/make/whatever]

> ----------------------------
> 
> instead of plain smalltalk code, it is up to you.
> 
> But that's about 'too much' for my taste. 

I concur.

My impression is, we can choose from four “evils”[1]:
	1. Accept the status quo. Painful for starters with its 8+ ways 
           of doing essentially the same and every single one has some kind of
           big drawback.
	2. Use CMake completely. Painful, because we have to maintain two
           bodies of knowledge, VMMaker and CMake.
	3. Use cmake through CMakeVMMaker. Painful, because it can not fully 
           benefit from Smalltalk nor from CMake. You have always to make up your
           mind whether to implement something on the Smalltalk or the CMake level
        4. Have a Smalltalk-only build too. Painful, because it is going to take
           a lot of time.

I can accept any of them, but the first :)
2. and 3. have the benefits that they are already there, to certain degrees.
(2. only in the Unix-vm part, done by Ian, 3. currently only used by the Pharo 
 community)

How shall we as the VM community[2] decide?

Best
	-Tobias

[1] not really evil, only each painful to a certain degree
[2] Who are we actually?
    • The Pharo and Squeak people,
    • The Cuis people
    • The Newspeak People
    • The CogVM people
    • Whom am I missing?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1665 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131108/541766f6/signature.pgp


More information about the Squeak-dev mailing list