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 alpine and link statically on linux #16

Closed
wants to merge 1 commit into from
Closed

Conversation

malt3
Copy link

@malt3 malt3 commented Mar 9, 2023

To make the perl toolchain more portable, it should be statically linked (at least for linux).
This PR adds support to build perl on alpine and (optionally) sets the link type to create a fully static perl executable.

file linux-*/perl-linux-*/bin/perl
linux-amd64/perl-linux-amd64/bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped
linux-arm64/perl-linux-arm64/bin/perl: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped

This also resolves #13 and helps resolve bazelbuild/rules_perl#54.

@skaji
Copy link
Owner

skaji commented Mar 9, 2023

Duplicate of #6

According to INSTALL file in perl source code, if we compile perl statically, we won't be able to use any new extension (XS) module without recompiling perl itself.

So I won't compile perl statically for this repository.
But, of course, you can compile perl statically by yourself.

@malt3
Copy link
Author

malt3 commented Mar 9, 2023

Do you think it may be possible to add this as a secondary release artifact? This way, users that don't require new extensions can use a static toolchain.

EDIT: would be happy to rework this PR to add the static perl toolchains as a secondary artifact (next to the dynamically linked perls).

@skaji
Copy link
Owner

skaji commented Mar 9, 2023

I don't think perl without xs modules (such as Net::SSLeay, JSON::XS, DBI, Moose) is very useful.
So I'm not sure I want to build perl statically in this project right now.
Please feel free to build perl statically by yourself.

@malt3 malt3 closed this Mar 9, 2023
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

Successfully merging this pull request may close these issues.

The perl binaries included in the toolchains are not static binaries Some advices
2 participants