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

Why is $Config{installsitescript} not populated? #15068

Open
p5pRT opened this issue Dec 3, 2015 · 11 comments
Open

Why is $Config{installsitescript} not populated? #15068

p5pRT opened this issue Dec 3, 2015 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 3, 2015

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

Searchable as RT126794$

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2015

From nanis@cpan.org

Created by nanis@cpan.org

I have been thinking this issue is something I am missing in the build
process, but I cannot figure out what I am doing wrong.

Upon install, I have

installsitescript=''

in lib/Config_heavy.pl

When trying to install App​::cpanoutdated which uses Module​::Build​::Tiny,
I get

C​:\...\cpan-outdated-0.29> build install
WARNING​: Can't figure out install path for types​: script
Files will not be installed.

Editing lib/Config_heavy.pl fixes that. For example​:

installsitescript='c​:\opt\perl\site\5.22.1\bin'

gives me​:

C​:\...\cpan-outdated-0.29> build install
Installing C​:\opt\perl\site\5.22.1\bin\cpan-outdated
Installing C​:\opt\perl\site\5.22.1\bin\cpan-outdated.bat

Interestingly, other values such as

installsitearch='c​:\opt\perl\site\5.22.1\lib'
installsitelib='c​:\opt\perl\site\5.22.1\lib'

were already correctly populated by the build process.

On the other hand, I am not sure why

installsitebin='c​:\opt\perl\5.22.1\bin'

is not

installsitebin='c​:\opt\perl\site\5.22.1\bin'

I do not exactly how/where these values are generated, so I thought
I would bring it to your attention.

FYI, this is not specific to the Perl distribution version.
I had this problem with other recent releases as well. On the other
hand, I do not remember running into this when I first discovered
App​::cpanoutdated.

Perl Info

Flags:
    category=install
    severity=medium

Site configuration information for perl 5.22.1:

Configured by sinan at Thu Dec  3 11:46:19 2015.

Summary of my perl5 (revision 5 version 22 subversion 1) configuration:

  Platform:
    osname=MSWin32, osvers=10.0, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -Ox -MD -Zi -DNDEBUG
-favor:INTEL64 -fp:precise -Qpar -GL -fp:precise -DWIN32 -D_CONSOLE
-DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS',
    optimize='-Ox -MD -Zi -DNDEBUG -favor:INTEL64 -fp:precise -Qpar
-GL -fp:precise',
    cppflags='-DWIN32'
    ccversion='18.00.31101', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8,
byteorder=12345678, doublekind=3
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8,
longdblkind=0
    ivtype='__int64', ivsize=8, nvtype='double', nvsize=8,
Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-ltcg  -libpath:"c:\opt\perl\5.22.1\lib\CORE"  -machine:AMD64
"/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'"'
    libpth="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64"
    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 ws2_32.lib mpr.lib winmm.lib  version.lib
odbc32.lib odbccp32.lib comctl32.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 ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl522.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -ltcg  -libpath:"c:\opt\perl\5.22.1\lib\CORE"
-machine:AMD64 "/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'"'

Locally applied patches:
    RC3


@INC for perl 5.22.1:
    c:/opt/perl/site/5.22.1/lib/MSWin32-x64-multi-thread
    c:/opt/perl/site/5.22.1/lib
    c:/opt/perl/5.22.1/lib
    .


Environment for perl 5.22.1:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=...
    PERLDOC_PAGER=c:\opt\cygwin64\bin\less.exe -+C -E -F -g -i
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2015

From @jkeenan

On Thu Dec 03 10​:06​:12 2015, nanis@​cpan.org wrote​:

This is a bug report for perl from nanis@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.22.1.

-----------------------------------------------------------------
[Please describe your issue here]

I have been thinking this issue is something I am missing in the build
process, but I cannot figure out what I am doing wrong.

Upon install, I have

installsitescript=''

in lib/Config_heavy.pl

When trying to install App​::cpanoutdated which uses
Module​::Build​::Tiny,
I get

C​:\...\cpan-outdated-0.29> build install
WARNING​: Can't figure out install path for types​: script
Files will not be installed.

Editing lib/Config_heavy.pl fixes that. For example​:

installsitescript='c​:\opt\perl\site\5.22.1\bin'

gives me​:

C​:\...\cpan-outdated-0.29> build install
Installing C​:\opt\perl\site\5.22.1\bin\cpan-outdated
Installing C​:\opt\perl\site\5.22.1\bin\cpan-outdated.bat

Interestingly, other values such as

installsitearch='c​:\opt\perl\site\5.22.1\lib'
installsitelib='c​:\opt\perl\site\5.22.1\lib'

were already correctly populated by the build process.

On the other hand, I am not sure why

installsitebin='c​:\opt\perl\5.22.1\bin'

is not

installsitebin='c​:\opt\perl\site\5.22.1\bin'

I do not exactly how/where these values are generated, so I thought
I would bring it to your attention.

FYI, this is not specific to the Perl distribution version.
I had this problem with other recent releases as well. On the other
hand, I do not remember running into this when I first discovered
App​::cpanoutdated.

You're on Windows, to which I have no access, but I wouldn't be surprised if this were some Windows-specific bug in Configure.

In any event, here's what I find with perl-5.22.0 installed via perlbrew on Linux x86_64.

Config_heavy.pl starts with these 2 lines of comment​:

#####
# This file was created by configpm when Perl was built. Any changes
# made to this file will be lost the next time perl is built.
#####

Looking at configpm, I see its purpose is described as​:

#####
# Regenerate the files
#
# lib/Config.pm
# lib/Config_heavy.pl
# lib/Config.pod
#
#
# from the contents of the static files
#
# Porting/Glossary
# myconfig.SH
#
# and from the contents of the Configure-generated file
#
# config.sh
#
#
# It will only update Config.pm and Config_heavy.pl if the contents of
# either file would be different. Note that *both* files are updated in
# this case, since for example an extension makefile that has a dependency
# on Config.pm should trigger even if only Config_heavy.pl has changed.
#####

Does this provide you with any diagnostic clues?

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2015

From nanis@cpan.org

On Thu, Dec 3, 2015 at 6​:32 PM, James E Keenan via RT
<perlbug-followup@​perl.org> wrote​:

On Thu Dec 03 10​:06​:12 2015, nanis@​cpan.org wrote​:

...

Upon install, I have

installsitescript=''

in lib/Config_heavy.pl

You're on Windows, to which I have no access, but I wouldn't be surprised if this were some Windows-specific bug in Configure.

I am not running Configure. I am using the stock win32/Makefile.

# config.sh
...
Does this provide you with any diagnostic clues?

Thank you.

So, my question becomes essentially the same with an extra level of indirection.

config.sh is generated from config.w32 by a rule in the Makefile. In
this case, config.w32 is config.vc. In config.vc, we have​:

http​://perl5.git.perl.org/perl.git/blob/572cd85091706ffa2e19db60c41c6bb106297e3a​:/win32/config.vc#l802

installsitebin='INST_TOP~~INST_VER\binINST_ARCH'
installsitehtml1dir=''
installsitehtml3dir=''
installsitelib='INST_TOP\siteINST_VER\lib'
...
installsitescript=''

So, I do not know exactly how config.vc was generated, but the
questions remain the same​:

- Why is installsitescript blank?

- And, why isn't installsitebin set to
'INST_TOP\siteINST_VER\binINST_ARCH'

These two commits are relevant​:

http​://perl5.git.perl.org/perl.git/commit/392c4dfd79b131439b1f9f514b4adb6eeab4e4fa?f=win32/config.vc

http​://perl5.git.perl.org/perl.git/commit/93342173b757d10fa4133d719efc52a68025860f?f=win32/config.vc

That is, the values have been this way for a long time. I am assuming
there must be a reason, but the values don't make sense to me.

Thank you,

-- Sinan

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2015

From @bulk88

On Fri Dec 04 05​:12​:42 2015, nanis@​cpan.org wrote​:

So, my question becomes essentially the same with an extra level of
indirection.

config.sh is generated from config.w32 by a rule in the Makefile. In
this case, config.w32 is config.vc. In config.vc, we have​:

572cd85​:/win32/config.vc#l802

installsitebin='INST_TOP~~INST_VER\binINST_ARCH'
installsitehtml1dir=''
installsitehtml3dir=''
installsitelib='INST_TOP\siteINST_VER\lib'
...
installsitescript=''

So, I do not know exactly how config.vc was generated, but the
questions remain the same​:

- Why is installsitescript blank?

Since it has been always blank or non-existant since day 1 of win32 perl, it was turned from non-existant to blank some years ago 392c4df

- And, why isn't installsitebin set to
'INST_TOP\siteINST_VER\binINST_ARCH'

These two commits are relevant​:

http​://perl5.git.perl.org/perl.git/commit/392c4dfd79b131439b1f9f514b4adb6eeab4e4fa?f=win32/config.vc

http​://perl5.git.perl.org/perl.git/commit/93342173b757d10fa4133d719efc52a68025860f?f=win32/config.vc

That is, the values have been this way for a long time. I am assuming
there must be a reason, but the values don't make sense to me.

Thank you,

http​://perl5.git.perl.org/perl.git/commitdiff/08aa1457cd52a368c210ab76a3da91cfadabea1a says

"+## This file was hand coded and a lot of information is invalid"

installsitescript was created in 2002 in 6e1038e in 5.9.0 while the canned-Win32-config files were created in 1997, the %Config var simply didnt exist when the canned configs were born.

Since IDK what the pros or cons of it being blank or filled are, I have no comment on whether it is a bug and whether to fix it. I am inclined to say it is a bug in cpan-outdated as it claims 5.8.0 compat https://metacpan.org/source/TOKUHIROM/cpan-outdated-0.29/Build.PL#L6 or in Module​::Build​::Tiny. Fixing this bug in core is pointless since there is a decade of old Win32 perls that still need to be support by CPAN.

Full Module​::Build has this curious line https://metacpan.org/source/LEONT/Module-Build-0.4214/Changes#L3391 from 2003 perhaps Module​::Build​::Tiny needs the same patch.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2015

From @Leont

On Fri, Dec 4, 2015 at 9​:28 PM, bulk88 via RT <perlbug-followup@​perl.org>
wrote​:

On Fri Dec 04 05​:12​:42 2015, nanis@​cpan.org wrote​:

So, my question becomes essentially the same with an extra level of
indirection.

config.sh is generated from config.w32 by a rule in the Makefile. In
this case, config.w32 is config.vc. In config.vc, we have​:

572cd85​:/win32/config.vc#l802

installsitebin='INST_TOP~~INST_VER\binINST_ARCH'
installsitehtml1dir=''
installsitehtml3dir=''
installsitelib='INST_TOP\siteINST_VER\lib'
...
installsitescript=''

So, I do not know exactly how config.vc was generated, but the
questions remain the same​:

- Why is installsitescript blank?

Since it has been always blank or non-existant since day 1 of win32 perl,
it was turned from non-existant to blank some years ago
392c4df

This was probably an oversight.

installsitescript was created in 2002 in 6e1038e
in 5.9.0 while the canned-Win32-config files were created in 1997, the
%Config var simply didnt exist when the canned configs were born.

Since IDK what the pros or cons of it being blank or filled are, I have no
comment on whether it is a bug and whether to fix it. I am inclined to say
it is a bug in cpan-outdated as it claims 5.8.0 compat
https://metacpan.org/source/TOKUHIROM/cpan-outdated-0.29/Build.PL#L6 or
in Module​::Build​::Tiny. Fixing this bug in core is pointless since there is
a decade of old Win32 perls that still need to be support by CPAN.

Logically speaking it should have a value, probably the same as
installsitebin.

Full Module​::Build has this curious line
https://metacpan.org/source/LEONT/Module-Build-0.4214/Changes#L3391 from
2003 perhaps Module​::Build​::Tiny needs the same patch.

In MBT (or actually ExtUtils​::InstallPaths) already takes into account
installsitescript not existing on 5.6, it could take this into account.
That said, other Windows perls don't seem to suffer from this.

Leon

@p5pRT
Copy link
Author

p5pRT commented Dec 5, 2015

From nanis@cpan.org

On Fri, Dec 4, 2015 at 6​:49 PM, Leon Timmermans via RT
<perlbug-followup@​perl.org> wrote​:

That said, other Windows perls don't seem to suffer from this.

Presumably because they run Configure instead of using the canned
config.gc file where installsitescript also missing and installsitebin
also doesn't point to site.

-- Sinan

@p5pRT
Copy link
Author

p5pRT commented Dec 5, 2015

From @bulk88

On Fri Dec 04 17​:02​:17 2015, nanis@​cpan.org wrote​:

On Fri, Dec 4, 2015 at 6​:49 PM, Leon Timmermans via RT
<perlbug-followup@​perl.org> wrote​:

That said, other Windows perls don't seem to suffer from this.

Presumably because they run Configure instead of using the canned
config.gc file where installsitescript also missing and installsitebin
also doesn't point to site.

When I ran Configure (metaconfig) on Windows it died very early in an attempt to use it to compile non-Cyg Perl http​://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg228235.html The same enviroment I used in that ML post works successfully for autoconf with MSVC.

I dont think (but not 100% sure) Strawberry uses unix Configure, Strawberry uses win32/GNUMakefile or win32/makefile.mk.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 5, 2015

From nanis@cpan.org

On Fri, Dec 4, 2015 at 8​:16 PM, bulk88 via RT <perlbug-followup@​perl.org> wrote​:

On Fri Dec 04 17​:02​:17 2015, nanis@​cpan.org wrote​:

On Fri, Dec 4, 2015 at 6​:49 PM, Leon Timmermans via RT
<perlbug-followup@​perl.org> wrote​:

That said, other Windows perls don't seem to suffer from this.

Presumably because they run Configure instead of using the canned
config.gc file where installsitescript also missing and installsitebin
also doesn't point to site.

When I ran Configure (metaconfig) on Windows it died very early in an attempt to use it to compile non-Cyg Perl http​://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg228235.html The same enviroment I used in that ML post works successfully for autoconf with MSVC.

I dont think (but not 100% sure) Strawberry uses unix Configure, Strawberry uses win32/GNUMakefile or win32/makefile.mk.

Thank you for the information.

-- Sinan

@toddr
Copy link
Member

toddr commented Feb 13, 2020

I don't see anything that needs to be done here. I suggest closing.

@toddr toddr added the Closable? We might be able to close this ticket, but we need to check with the reporter label Feb 13, 2020
@jkeenan
Copy link
Contributor

jkeenan commented Apr 8, 2020

I don't see anything that needs to be done here. I suggest closing.

Agreed. Closing.

@jkeenan jkeenan removed the Closable? We might be able to close this ticket, but we need to check with the reporter label Apr 8, 2020
@xenu xenu removed the affects-5.22 label Nov 19, 2021
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

4 participants