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

perl path and @INC on win32 #4167

Closed
p5pRT opened this issue Jul 3, 2001 · 6 comments
Closed

perl path and @INC on win32 #4167

p5pRT opened this issue Jul 3, 2001 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 3, 2001

Migrated from rt.perl.org#7222 (status was 'open')

Searchable as RT7222$

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2001

From Michal.Polak@tconsult.cz

Created by michal.polak@turboconsult.cz

Symptoms​:
I have two perl versions.
I reserved l​:\Pgm\perl directory for it.
I wanted to install first to l​:\Pgm\perl\5.005_03 and second to
l​:\Pgm\perl\5.6.1 (I cannot afford to mix the versions, I do not want to
uncomment INST_VER in Makefile).
When I installed it, there is problem with @​INC, see "Description​:" section.
Provisionally I installed it to l​:\Pgm\perl\5.005_03\perl and
l​:\Pgm\perl\5.6.1\perl, but it is ugly. I think it is not feature because I
did not notice this behaviour on Linux or HP-UX.

Description​:
When I compile and install perl (see Makefile) to d​:\work\perl\patched5.6.1,
everything is OK (perl -V)​:

  @​INC​:
  D​:/work/perl/patched5.6.1/lib
  D​:/work/perl/patched5.6.1/site/lib
  .

If I rename d​:\work\perl\patched5.6.1 to d​:\work\perl\5.6.1, it is BAD​:

  @​INC​:
  D​:/work/perl/5.6.1/lib
  .

When I make empty D​:\work\perl\site\lib directory, (perl -V) returns​:

  @​INC​:
  D​:/work/perl/5.6.1/lib
  D​:/work/perl/site/lib
  .

When I delete D​:\work\perl\site\lib directory and move perl to
D​:\work\perl\level\5.6.1 , (perl -V) returns​:

  @​INC​:
  D​:/work/perl/level/5.6.1/lib
  .

When I make empty D​:\work\perl\site\lib directory, no change in @​INC.
When I make empty D​:\work\perl\level\site\lib directory, (perl -V) returns​:

  @​INC​:
  D​:/work/perl/level/5.6.1/lib
  D​:/work/perl/level/site/lib
  .

But I compiled perl without versioning ! I do not want to mix several
versions together !
It seems to me there is problem if I install perl to directory named like
version.
Your suggestion to solve my problem from "Symptoms​:" section will be highly
appreciated.

Thank you.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.6.1:

Configured by polakm at Tue Jul  3 07:31:25 2001.

Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT   -DPERL_MSVCRT_READFIX',
    optimize='-O1 -MD -DNDEBUG',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='', ldflags ='-nologo -nodefaultlib -release
-libpath:"d:\work\perl\patched5.6.1\lib\CORE"  -machine:x86'
    libpth=""C:\Program Files\Microsoft Visual Studio\VC98"\lib"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-libpath:"d:\work\perl\patched5.6.1\lib\CORE"  -machine:x86'

Locally applied patches:
    


@INC for perl v5.6.1:
    D:/work/perl/patched5.6.1/lib
    D:/work/perl/patched5.6.1/site/lib
    .


Environment for perl v5.6.1:
    HOME=d:\private\home
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
 
PATH=D:\work\perl\patched5.6.1\bin;h:\batch;C:\programs\exes;l:\bin;C:\WINNT
\system32;C:\WINNT;C:\progra~1\ntreskit;C:\Progra~1\MSSQL7\BINN;C:\Program
Files\Mts;C:\progra~1\Informix\Bin;C:\Program Files\Microsoft Visual
Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual
Studio\Common\Tools;C:\Program Files\Microsoft Visual
Studio\VC98\bin;C:\Program Files\Informix\bin;C:\WINNT\System32\WBEM
    PERL_BADLANG (unset)
    SHELL (unset)

--
Michal Polak
system programmer, TurboConsult s.r.o.
mpolak@email.cz, michal.polak@turboconsult.cz
ICQ: 106342077
Tel:+420 5 4121 2898

Everyone should hold strong convictions, I am convinced I will have another
glass.


@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2001

From Michal.Polak@tconsult.cz

Makefile

@p5pRT
Copy link
Author

p5pRT commented Oct 21, 2012

From @jkeenan

The bug report above was filed in 2001. I suspect that the original
poster has gotten beyond this problem by now. But is there anyone who
could offer a diagnosis so we can close the ticket?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 2012

From @bulk88

On Sun Oct 21 16​:02​:40 2012, jkeenan wrote​:

The bug report above was filed in 2001. I suspect that the original
poster has gotten beyond this problem by now. But is there anyone who
could offer a diagnosis so we can close the ticket?

Thank you very much.
Jim Keenan

I'm not sure I understand this problem. I think Win32 perl gets it
directories from path of the EXE or perl5*.dll, env vars, hard coded
compiled in values, registry entries, and maybe (no clue) Config.pm?.
This is also relevant
http​://perldoc.perl.org/perlwin32.html#Usage-Hints-for-Perl-on-Windows .
Someone elses eyes would be useful here.

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 2012

From @jandubois

On Sun, 21 Oct 2012, bulk 88 via RT wrote​:

On Sun Oct 21 16​:02​:40 2012, jkeenan wrote​:

The bug report above was filed in 2001. I suspect that the original
poster has gotten beyond this problem by now. But is there anyone who
could offer a diagnosis so we can close the ticket?

I'm not sure I understand this problem. I think Win32 perl gets it
directories from path of the EXE or perl5*.dll, env vars, hard coded
compiled in values, registry entries, and maybe (no clue) Config.pm?.

There is some special code in win32/win32.c in the get_emd_parts()
function that navigates back from the location of the perl5xx.dll to the
location of the lib and site directories. It is treating directories
that matches a Perl version number differently to deal with "versioned"
Perl installations. However, that code breaks if you install Perl
without the versioned intermediate directories, but use a Perl version
number for the base install directory.

Given that all major distributions for Perl on Windows have switched to
unversioned installations a long time ago, I would be in favor of
removing support for versioned installs in win32/Makefile (INST_VER),
and in get_emd_parts() to avoid this issue.

Cheers,
-Jan

@mpolak
Copy link

mpolak commented Jan 31, 2020

Let's close this issue, it's prehistoric.
Note: michal.polak@turboconsult.cz is mine.

@toddr toddr closed this as completed Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants