develooper Front page | perl.perl5.porters | Postings from February 2020

Fwd: Re: mod_perl, compilation issues, cont

Thread Next
From:
aw
Date:
February 5, 2020 11:12
Subject:
Fwd: Re: mod_perl, compilation issues, cont
Message ID:
56ec0f7f-64d5-cdca-6578-e69e98d94854@ice-sa.com
Hi everyone.
I apologise for posting the following to this list, and I realise that this is not exactly 
on-topic. But I tried several other avenues before, and I don't seem to elicit any response.
My basic issue is in the forwarded emails below, and it concerns the installation of 
mod_perl2 on a Windows 10 laptop.
Examaning the source of the issue as deeply as I can by myself, it seems to boil down to 
the following line in DynaLoader.pm :

around line 193 :

     my $libref = dl_load_file($file, $flags) or
	croak("Can't load '$file' for module $module: ".dl_error());

and in my case, dl_load_file() must return false, because the croak message is generated 
(see below).

This is thus my question here :

What I do not know, nor can easily find out, is *why* dl_load_file() would/could return 
false in this case (considering what DynaLoader prints just previously, see also below).
Knowing this would at least allow me to look for any underlying issue, be it in Windows 10 
in general, or on that particular laptop.

Thanks in advance for any information allowing me to dig further (perhaps just where I 
could find the source code of this dl_load_file() function).


-------- Forwarded Message --------
Subject: Re: mod_perl, compilation issues, cont
Date: Mon, 3 Feb 2020 10:56:42 +0100
From: André Warnier (tomcat/perl) <aw@ice-sa.com>
To: modperl@perl.apache.org

Additional info :

I checked the permissions of all below c:/strawberry/perl, and one thing I can say is that 
all directories and files below that point have at least permissions read/write/execute 
for all "authenticated users".

On the other hand, I also ran the following (why did I not think of that before ?), just 
to make sure that the issue would be reproducible with only the "vanilla" installed Apache 
2.4, perl 5.26.3, mod_perl 2.x :

C:\strawberry\perl\site>set PERL_DL_DEBUG=1

C:\strawberry\perl\site>perl -cw C:/Strawberry/perl/site/lib/Apache2/Const.pm
DynaLoader.pm loaded (C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib 
C:/Strawberry/perl/lib, C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib 
C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\7.1.0)
DynaLoader::bootstrap for ModPerl::Const (auto/ModPerl/Const/Const.xs.dll)
dl_findfile(-LC:/Strawberry/perl/site/lib/auto/ModPerl/Const -LC:/Strawberry/perl/site/lib 
-LC:/Strawberry/perl/vendor/lib -LC:/Strawberry/perl/lib Const)
  checking in C:/Strawberry/perl/site/lib/auto/ModPerl/Const for Const.xs.dll
  checking in C:/Strawberry/perl/site/lib/auto/ModPerl/Const for Const.dll
dl_findfile found: C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll
Can't load 'C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll' for module 
ModPerl::Const: load_file:Das angegebene Modul wurde nicht gefunden at 
C:/Strawberry/perl/lib/DynaLoader.pm line 193.
   at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
Compilation failed in require at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
BEGIN failed--compilation aborted at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.

(Note : to make extra sure, I also ran this in a CMD window "run as administrator"; the 
results are the same.)


Any other clue, anyone ?

>perl -V :

  C:\strawberry\perl\site>perl -V
Summary of my perl5 (revision 5 version 26 subversion 3) configuration:

   Platform:
     osname=MSWin32
     osvers=10.0.17134.407
     archname=MSWin32-x64-multi-thread
     uname='Win32 strawberry-perl 5.26.3.1 #1 Sun Dec  2 22:57:44 2018 x64'
     config_args='undef'
     hint=recommended
     useposix=true
     d_sigaction=undef
     useithreads=define
     usemultiplicity=define
     use64bitint=define
     use64bitall=undef
     uselongdouble=undef
     usemymalloc=n
     default_inc_excludes_dot=define
     bincompat5005=undef
   Compiler:
     cc='gcc'
     ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO 
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv 
-fno-strict-aliasing -mms-bitfields'
     optimize='-s -O2'
     cppflags='-DWIN32'
     ccversion=''
     gccversion='7.1.0'
     gccosandvers=''
     intsize=4
     longsize=4
     ptrsize=8
     doublesize=8
     byteorder=12345678
     doublekind=3
     d_longlong=define
     longlongsize=8
     d_longdbl=define
     longdblsize=16
     longdblkind=3
     ivtype='long long'
     ivsize=8
     nvtype='double'
     nvsize=8
     Off_t='long long'
     lseeksize=8
     alignbytes=8
     prototype=define
   Linker and Libraries:
     ld='g++'
     ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'
     libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib 
C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\7.1.0
     libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 
-lodbccp32 -lcomctl32
     perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 
-lodbccp32 -lcomctl32
     libc=
     so=dll
     useshrplib=true
     libperl=libperl526.a
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs
     dlext=xs.dll
     d_dlsymun=undef
     ccdlflags=' '
     cccdlflags=' '
     lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'


Characteristics of this binary (from libperl):
   Compile-time options:
     HAS_TIMES
     HAVE_INTERP_INTERN
     MULTIPLICITY
     PERLIO_LAYERS
     PERL_COPY_ON_WRITE
     PERL_DONT_CREATE_GVSV
     PERL_IMPLICIT_CONTEXT
     PERL_IMPLICIT_SYS
     PERL_MALLOC_WRAP
     PERL_OP_PARENT
     PERL_PRESERVE_IVUV
     USE_64_BIT_INT
     USE_ITHREADS
     USE_LARGE_FILES
     USE_LOCALE
     USE_LOCALE_COLLATE
     USE_LOCALE_CTYPE
     USE_LOCALE_NUMERIC
     USE_LOCALE_TIME
     USE_PERLIO
     USE_PERL_ATOF
   Built under MSWin32
   Compiled at Dec  2 2018 23:03:33
   %ENV:
     PERL_DL_DEBUG="1"
   @INC:
     C:/Strawberry/perl/site/lib
     C:/Strawberry/perl/vendor/lib
     C:/Strawberry/perl/lib

C:\strawberry\perl\site>

Environment :
C:\strawberry\perl\site>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\aw\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=ANDRE-PC
ComSpec=C:\WINDOWS\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
EFSDIR=D:\EFS
EFSLIB=D:\EFS\lib
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
GIT_SSH=C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe
HOMEDRIVE=H:
HOMEPATH=\
HOMESHARE=\\192.168.245.150\scans\user\homeshare\aw
LOCALAPPDATA=C:\Users\aw\AppData\Local
LOGONSERVER=\\KIRK
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\aw\OneDrive
OS=Windows_NT
Path=C:\Program Files (x86)\ActiveState Komodo IDE 11\;c:\programs\local;C:\Program Files 
(x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program 
Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program 
Files\Intel\Intel(R) Management Engine 
Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program 
Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program 
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files 
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) 
Management Engine Components\IPT;C:\Program Files\PuTTY\;C:\Program 
Files\OpenVPN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
(x86)\Attachmate\Reflection\;C:\Program Files\TortoiseGit\bin;C:\Program 
Files\Git\cmd;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Users\aw\AppData\Local\Microsoft\WindowsApps;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PERL_DL_DEBUG=1
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8e0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program 
Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SVN_SSH=C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\aw\AppData\Local\Temp
TMP=C:\Users\aw\AppData\Local\Temp
USERDNSDOMAIN=MIRA-GLOMAS.INTERN
USERDOMAIN=MIRA-GLOMAS
USERDOMAIN_ROAMINGPROFILE=MIRA-GLOMAS
USERNAME=aw
USERPROFILE=C:\Users\aw
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
windir=C:\WINDOWS

C:\strawberry\perl\site>

On 03.02.2020 09:36, André Warnier (tomcat/perl) wrote:
> Thank you very much for your reply below. I was getting desperate of getting any at all.
> I will check the permissions issue and post back to the list.
> 
> Maybe in the mneantime an additional question to the list : has *anyone at all* succeeded 
> in installing (and using) Apache 2.4 / perl 5.20+ / mod_perl 2.x on a Windows 10 platform ?
> Knowing that someone else has been able to do that, would already help me in focusing my 
> debugging efforts to something specific to my laptop.
> 
> 
> On 31.01.2020 16:45, Bruce Johnson wrote:
>> I am not a Windows expert by any means, but it it possible that it’s a permissions issue 
>> on that DLL file or enclosing directory(s)?  Folder permissions in Windows will let you 
>> grant directory listing rights but not read rights for the process that’s doing the 
>> compilation…
>>
>> See: 
>> https://www.online-tech-tips.com/computer-tips/set-file-folder-permissions-windows/ under Permission 
>> Types; the specific right is ‘List Folder Contents’
>>
>> This would account for both dl_findfile working and the ‘Can’t Load file’ error because 
>> the first utilizes the listing rights and the second needs to actually read the file.
>>
>>
>>
>>> On Jan 16, 2020, at 1:34 AM, André Warnier (tomcat/perl) <aw@ice-sa.com 
>>> <mailto:aw@ice-sa.com>> wrote:
>>>
>>> Can anyone tell me what the error below really means ?
>>> (and if possible, give me a clue as to what may be happening ?)
>>>
>>> To get possibly more details, I re-ran the compile command after setting PERL_DL_DEBUG 
>>> in the environment (just something I found in Dynaloader.pm). It does give some more 
>>> detail, but I am still stumped..
>>>
>>> Full config described below.
>>> D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm is my module, which compiles just 
>>> fine on Linux servers with similar software installed (Apache, mod_perl, perl).
>>>
>>>
>>> C:\>perl -cw D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm
>>> DynaLoader.pm loaded (C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib 
>>> C:/Strawberry/perl/lib, C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib 
>>> C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\7.1.0)
>>> DynaLoader::bootstrap for ModPerl::Const (auto/ModPerl/Const/Const.xs.dll)
>>> dl_findfile(-LC:/Strawberry/perl/site/lib/auto/ModPerl/Const 
>>> -LC:/Strawberry/perl/site/lib -LC:/Strawberry/perl/vendor/lib -LC:/Strawberry/perl/lib 
>>> Const)
>>> checking in C:/Strawberry/perl/site/lib/auto/ModPerl/Const for Const.xs.dll
>>> checking in C:/Strawberry/perl/site/lib/auto/ModPerl/Const for Const.dll
>>> dl_findfile found: C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll
>>> Can't load 'C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll' for module 
>>> ModPerl::Const: load_file:Das angegebene Modul wurde nicht gefunden at 
>>> C:/Strawberry/perl/lib/DynaLoader.pm line 193.
>>>  at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> Compilation failed in require at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> BEGIN failed--compilation aborted at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> Compilation failed in require at D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm 
>>> line 28.
>>> BEGIN failed--compilation aborted at D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm 
>>> line 28.
>>>
>>> ---------------------
>>>
>>> OS : Windows 10
>>> Apache httpd 2.4.41
>>> perl (Strawberry) : perl 5, version 26, subversion 2 (v5.26.2) built for 
>>> MSWin32-x64-multi-thread
>>> mod_perl : from Steve Hay's mod_perl-2.0.10-strawberryperl-5.26.1.1-64bit.zip,
>>> as per Apache log :
>>> Apache/2.4.41 (Win64) mod_perl/2.0.10 Perl/v5.26.2 configured
>>>
>>> Problem :
>>>
>>> C:\>perl -cw D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm
>>> Can't load 'C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll' for module 
>>> ModPerl::Const: load_file:Das angegebene Modul wurde nicht gefunden at 
>>> C:/Strawberry/perl/lib/DynaLoader.pm line 193.
>>>  at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> Compilation failed in require at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> BEGIN failed--compilation aborted at C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19.
>>> Compilation failed in require at D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm 
>>> line 28.
>>> BEGIN failed--compilation aborted at D:\develop\06_SVN\AP2lib\trunk\modlib\AUTH\UMA2.pm 
>>> line 28.
>>>
>>> Line 28 of UMA2.pm is :
>>>
>>> use Apache2::Const -compile => qw(:common :http :methods :override :proxy :log REDIRECT 
>>> AUTHZ_GRANTED AUTHZ_DENIED AUTHZ_DENIED_NO_USER AUTHZ_GENERAL_ERROR);
>>>
>>> (wrapping due to email)
>>>
>>> C:/Strawberry/perl/site/lib/Apache2/Const.pm line 19 is :
>>>
>>> use ModPerl::Const ();
>>>
>>> File C:\strawberry\perl\site\lib\ModPerl\Const.pm exists, but has no "load_file" in it.
>>>
>>> The file C:/Strawberry/perl/site/lib/auto/ModPerl/Const/Const.dll exists.
>>>
>>> For non-german-speakers, the above message "load_file:Das angegebene Modul wurde nicht 
>>> gefunden" translates as "load_file:the specified module was not found".
>>>
>>> The above module "UMA2.pm" compiles without error on a Linux server with similar httpd, 
>>> perl and mod_perl versions.
>>>
>>> Any clue or additional questions welcome.
>>> Thanks
>>
>> -- 
>> Bruce Johnson
>> University of Arizona
>> College of Pharmacy
>> Information Technology Group
>>
>> Institutions do not have opinions, merely customs
>>
> 

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About