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

Cannot build without another Perl #22390

Closed
JonathanWilbur opened this issue Jul 10, 2024 · 8 comments
Closed

Cannot build without another Perl #22390

JonathanWilbur opened this issue Jul 10, 2024 · 8 comments

Comments

@JonathanWilbur
Copy link

JonathanWilbur commented Jul 10, 2024

Description
Perl cannot be built without using another Perl. I found a repo where somebody managed to bootstrap Perl by using hard-coded files and other tricks, but having to pull of this much of a stunt just to build Perl without an existing Perl is obnoxious. It would be really nice if there were just C programs that would compile and run to perform any setup needed for a build.

Expected behavior
Be able to build Perl without an existing Perl.

Perl configuration
I am trying this with Perl 5.40.0, fetched from the CPAN website.

I would like to add that I would be will to submit a PR to convert the Perl scripts to C programs, if somebody can just point out what/where these are, and if this idea isn't rejected outright.

@guest20
Copy link

guest20 commented Jul 10, 2024

@JonathanWilbur Where were you building it? Some kind of jail, or a docker or something like that?

@JonathanWilbur
Copy link
Author

It was in docker, yes.

@xenu
Copy link
Member

xenu commented Jul 10, 2024

I've just built perl-5.40.0 on a clean Alpine Linux installation with no perl present, and it finished successfully.

What errors are you getting?

@mauke
Copy link
Contributor

mauke commented Jul 10, 2024

Perl cannot be built without using another Perl.

citation needed

@demerphq
Copy link
Collaborator

I wonder if there is a difference between building Perl using a git repo, and using a tarball. I STR that we do require Perl to build from a git checkout, but we dont for a tarball.

@demerphq
Copy link
Collaborator

The linked repo seems to be for 5.000?

@JonathanWilbur
Copy link
Author

I see. That was a mistake on my part. I guess it used to require an existing Perl?

Building with no existing Perl did work for me; it didn't work the first time because I was copying generated files into the Docker container, which is obviously not how it was intended to be used.

Sorry, I guess I should have actually tested it for myself, but I assumed this to still be true when I saw this in INSTALL:

First, make sure you have an up-to-date version of Perl.

In light of my reading that you need an existing Perl, I interpreted the above sentence to mean that you need an existing Perl.

Sorry to have jumped the gun, but I guess now you have a "tombstone issue" so others can see that this is no longer a requirement to build. Thank you for your help! Closing.

@mauke
Copy link
Contributor

mauke commented Jul 10, 2024

What INSTALL means is really: "First, make sure you have an up-to-date version of [the] Perl [source code]."

You don't need perl just to build perl and I don't think you ever did.

If you're a developer working on perl, you may have to regenerate certain derived files, which requires perl. But that's exactly why those files are generated during development: So users can just compile them without having to install bison or a binary version of perl first.

mauke added a commit to mauke/perl5 that referenced this issue Jul 10, 2024
You don't need an installed, runnable "up-to-date version of Perl" to
build perl, just a reasonably recent source tree.

Also, update references to 5.8 and 5.10 to the more current versions
5.38 and 5.40.

(See also: GH Perl#22390)
mauke added a commit to mauke/perl5 that referenced this issue Jul 11, 2024
You don't need an installed, runnable "up-to-date version of Perl" to
build perl, just a reasonably recent source tree.

Also, update references to 5.8 and 5.10 to the more current versions
5.38 and 5.40.

(See also: GH Perl#22390)
mauke added a commit that referenced this issue Jul 11, 2024
You don't need an installed, runnable "up-to-date version of Perl" to
build perl, just a reasonably recent source tree.

Also, update references to 5.8 and 5.10 to the more current versions
5.38 and 5.40.

(See also: GH #22390)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants