Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

[Win32] Why did they add '-perlio'

by syphilis (Archbishop)
on Jun 22, 2022 at 13:25 UTC ( [id://11144944]=perlquestion: print w/replies, xml ) Need Help??

syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

As I mentioned earlier my unthreaded builds of perl were, upon installation, being assigned an @INC that was empty.
Well .... silly me .... I had assumed that an archname of 'MSWin32-x64-multi-thread' would, upon becoming neither 'multi' nor threaded, change to simply 'MSWin32-x64'.
But, no - the win32/makefiles decree that it becomes 'MSWin32-x64-perlio' if USE_PERLIO is defined.
The fact that USE_PERLIO is also defined for the multi-threaded build is apparently unworthy of mention, even though defining USE_PERLIO is equally optional for both multi-thread and non-multi-thread builds of perl, AFAICS.

So why do they add '-perlio' for the unthreaded build only ?
Is there a good reason ? (Not that one is required, of course ... heaven forbid !!)

UPDATE - to elaborate a little on how this led to @INC being empty:
In these unthreaded builds I was specifying (eg) INST_ARCH=MSWin32-x64 and that didn't match the actual designated archname of MSWin32-x64-perlio .
Now, I don't exactly know why that resulted in an empty @INC, but the problem went away as soon as I changed to specifying INST_ARCH=MSWin32-x64-perlio .

Cheers,
Rob

Replies are listed 'Best First'.
Re: [Win32] Why did they add '-perlio'
by ikegami (Patriarch) on Jun 23, 2022 at 07:36 UTC

    It doesn't really matter what the arch name is. You can get it from the following:

    eval "$( perl -V:archname )"

    (Well, once you rebuild your broken perl.)

      The problem was that the directory I specified for $(INST_ARCH) was different to $(ARCHNAME), as determined by the GNUmakefile.
      I still don't know whether that *should* lead to @INC being empty ... but I know from experience that it certainly does.

      If you're wondering what happens when such a mismatch occurs, gmake install puts the architecture-specific stuff into the directory specified by $(INST_ARCH), not the directory specified by $(ARCHNAME).

      There's no problem if (and only if) either:
      1) $(INST_ARCH) is unset (undef);
      or
      2) $(INST_ARCH) is set to $(ARCHNAME).

      I don't really see why it should matter. Everything would be fine if @INC was set in accordance with $(INST_ARCH).
      If it's so important that this not be allowed, then maybe it ought to be stated clearly that, when $(INST_ARCH) is set, it must be set to $(ARCHNAME).

      Cheers,
      Rob
Re: [Win32] Why did they add '-perlio' ( that one unix guy )
by Anonymous Monk on Jun 23, 2022 at 11:43 UTC
      what does linux do?

      AFAICS linux does exactly what I *expected* Windows to do.
      I can't recall ever seeing the string "perlio" in a linux archname.

      Cheers,
      Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11144944]
Approved by marto
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found