Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of cmake for build subsystem #102

Closed
vrurg opened this issue Sep 10, 2019 · 6 comments
Closed

Use of cmake for build subsystem #102

vrurg opened this issue Sep 10, 2019 · 6 comments
Assignees
Labels
fallback If no other label fits

Comments

@vrurg
Copy link
Contributor

vrurg commented Sep 10, 2019

A couple of months ago there was a discussion on IRC about getting rid of perl5 in build subsystem. I would like to find out if cmake could serve as a cross-platform replacement.

@vrurg vrurg added the fallback If no other label fits label Sep 10, 2019
@vrurg
Copy link
Contributor Author

vrurg commented Sep 10, 2019

First of all, for the record, I don't know almost nothing about cmake itself. The sole purpose of this ticket is to find out if it makes sense of removing perl5 from the build process and if cmake can serve as a good replacement. I propose it because it became a de-facto standard for a cross-platform build tool. But before getting any deeper into it I would like to find out more about other opinions about it.

Another alternative considered by that discussion was using NQP for the Configure script. But the prerequisites of this approach are such that wouldn't allow as to use it for a long time. One of the most problematic requirements is having pre-compiled and easily available MoarVM for all major platforms. Yet, even in this case MoarVM itself would require perl5 to be compiled.

@coke
Copy link
Contributor

coke commented Sep 10, 2019

If you're looking to remove perl5 from the build process, I don't think it makes sense to remove it just from rakudo's build. If it goes forward, I think we'd want this work to cover MoarVM, NQP and Rakudo.

@vrurg
Copy link
Contributor Author

vrurg commented Sep 10, 2019

I didn't mention it after all. Yes, it only makes sense if everything is using cmake.

@MasterDuke17
Copy link

My personal opinion fwiw, but I don't see the point in removing perl5 only to replace it with something that I believe is less commonly available than perl5. Perl5 is available on every platform that Rakudo+NQP+MoarVM supports. I could see removing perl5 and replacing what it was used for with a tool already in use by the toolchain to reduce the total number of different tools needed. But otherwise it seems like a lot of work for too little gain.

@jnthn
Copy link
Contributor

jnthn commented Sep 10, 2019

First of all, for the record, I don't know almost nothing about cmake itself.

Me either, but I've had to interact with it a few times, iirc on Windows, and I don't remember it being terribly good fun. Not that I've ever found any build system good fun... :-)

The sole purpose of this ticket is to find out if it makes sense of removing perl5 from the build process

If we do that, I'd rather we do it for NQP and Rakudo by:

  1. Writing the configure stuff in NQP
  2. Using the bundled stage0 in the NQP repository in order to run it
  3. Providing a small configure.sh/configure.bat wrapper that eases its invocation

That way we have it written in something that more members of the community are likely to comprehend and work on, rather than less (I'm quite sure that moving from Perl 5 to cmake would reduce the already-small number of people who are up for working on build stuff). Further, since we have a stage0 for all backends, the only dependency is the VM that you are wishing to build NQP/Rakudo to target, which by definition you're going to need anyway, so we actually end up with less build dependencies that way! (Granted that still leaves MoarVM, but it has a bit of a different situation in many senses.)

All of that said: who are we doing this for? If we expect most end users to use a package, MSI, etc. then the source builds are primarily for those of us who are working on it, and for those building packages. So the question is probably what's best for those two groups of people.

@vrurg
Copy link
Contributor Author

vrurg commented Sep 10, 2019

Ok, I now have enough reasons for sparing my time for something more useful than learning cmake.

Just for the bottom line, after it is agreed that cmake is a bad option:

  1. The current state of things is such that MoarVM cannot be built without perl5. No alternatives could be seen on the horizon. Therefore there is little sense of not using it for NQP and Rakudo.

  2. At some point I would consider NQP as being the Configure language for the purpose of getting access to Grammar which would allow me to re-implement template macros in more flexible and extendable way. For example, I would like to see something like:

    @if[var1==val1 && var2!=val2](makefile statement)@
    

    in place of current:

     @if(var1==val1 @if(var2==val2 makefile statement)@)@
    

    But this will happen not before the infrastructure allows.

@vrurg vrurg closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fallback If no other label fits
Projects
None yet
Development

No branches or pull requests

5 participants