-
Notifications
You must be signed in to change notification settings - Fork 560
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
Installing CPAN modules for a custom Perl install with installprefix
different from prefix
#22875
Comments
See https://github.com/Perl/perl5/blob/blead/INSTALL#changing-the-installation-directory and the following section, in case they are useful |
Yeah, that's where I learned of I also cannot use Is INC burned into the perl binary itself? (or e.g. in |
Yes, if files aren't installed to the place where they're expected to be installed, lots of things break. In particular it seems that in this case it can't find the header files. AFAICT it's all working as advertised. I don't quite understand why you're using
Yes. |
Because I wanted to use
Is it burned into Basically I'd like to use some accessible prefix during modules install (like |
It's burned into libperl.
Why would you want that? |
I'm building a custom fully static app which embeds a Perl interpreter (manually packing biber essentially https://github.com/busytex/busybiber/blob/main/.github/workflows/busybiber.yml) and shipping inside the binary all the files via a virtual file system. So I wanted to make sure that this Perl never even tries to use any host Perl install's prefix and instead better errors out if it cannot find the required modules in the virtual file system (as it likely indicates an error on my part). |
I also wonder, is it possible to do proper module installs using |
Then just make sure the paths aren't the same? It really sounds like you're making your own life harder than it needs to be.
Pure perl might actually work, I don't think XS will. I'm not sure it's something we should want to support. |
This is what I tried to do with my initial attempt to use prefix != installprefix. But this unfortunately breaks further Perl install preparation (i.e. installation of extra modules)...
Any example of calling |
Which object file in libperl.a contains the value of INC burned in? Maybe I could manually rebuild/replace this object? Thanks! |
Probably |
I'm building a custom Perl install which includes:
cpan
after Perl build because of Perl 5.40.0 hangs forever during building when certainextras
packages are specified #22786)After steps (1)-(2)-(3) my custom Perl build should be complete and not modified any further.
Another peculiarity is that I'm building this Perl build in order to make it available at run time in some path like
/opt/myperlprefix
(but this path is not available at build time), so I thought I'd use-Dprefix=/opt/myperlprefix
and-Dinstallprefix
set to some path existing at build time.(1) passes well, but (2) fails badly. The first problem is that (2) tries to use
prefix
and does not use at allinstallprefix
for module search, so I had to providePERLLIB
andCPATH
to makeinstallprefix
discoverable. But then it producesNOT OK
and nasty warning messages during the modules' build time.If I don't use a separate
installprefix != prefix
, all works well.How could I properly prepare such a perl install? E.g. if I don't use a separate
installprefix
, how can I redefine INC after the install? (i.e. I'd like that after my build setup and perl install is complete, only/opt/myperlprefix
is used for module search path) If it's not possible, how to properly runcpan
to make the Perl build fully discoverable without sketchy patches usingPERLLIB
/CPATH
? (and currentlycpan
produces NOT OK anyway)Thanks!
log_cpan.txt
My GitHub Actions workflow file, using Ubuntu and Alpine:
The text was updated successfully, but these errors were encountered: