Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Not OK: perl 5.00564 on MSWin32-x86 4.0 '(UNINSTALLED)' #1123

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#2081 (status was 'resolved')

Searchable as RT2081$

p5pRT commented 24 years ago

From pvhp@best.com

During the build on NT Workstation 4 (SP N for some N > 2) using MS VC(++) and nmake I noted the following warnings during the build​:

8\<---------------------------------------------------   copy ..\perl.exe ..\wperl.exe   1 file(s) copied.   editbin /subsystem​:windows ..\wperl.exe Microsoft (R) COFF Binary File Editor Version 5.00.7022 Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored   copy splittree.pl ..   1 file(s) copied.

8---------------------------------------------------

and a bit later on​:

8\<---------------------------------------------------   cl -I..\x2p -nologo -Gf -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONSOLE -DNO_STRICT -DPERLDLL -DPERL_CORE -Od -MD -DNDEBUG -Fo..\x2p\walk. obj -c ..\x2p\walk.c walk.c ..\x2p\walk.c(257) : warning C4305​: '+=' : truncation from 'const int ' to 'char ' ..\x2p\walk.c(852) : warning C4305​: '=' : truncation from 'const int ' to 'char ' ..\x2p\walk.c(854) : warning C4305​: '=' : truncation from 'const int ' to 'char ' ..\x2p\walk.c(934) : warning C4305​: '=' : truncation from 'const int ' to 'char ' ..\x2p\walk.c(1011) : warning C4305​: '+=' : truncation from 'const int ' to 'cha r ' ..\x2p\walk.c(1063) : warning C4305​: '+=' : truncation from 'const int ' to 'cha r ' ..\x2p\walk.c(1072) : warning C4305​: '+=' : truncation from 'const int ' to 'cha r '

8---------------------------------------------------

  a bit later still​:

8\<---------------------------------------------------   cl -c -Od -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_MSVCRT_REA DFIX -Od -MD -DNDEBUG -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" -I..\..\li b\CORE POSIX.c Microsoft (R) 32-bit C/C++ Standard Compiler Version 11.00.0000 for 80x86 Copyright (C) Microsoft Corp 1984-1997. All rights reserved.

POSIX.c c​:\program files\devstudio\vc\include\stddef.h(96) : warning C4005​: 'errno' : ma cro redefinition POSIX.xs(192) : warning C4273​: 'strtod' : inconsistent dll linkage. dllexport a ssumed. POSIX.xs(193) : warning C4273​: 'strtol' : inconsistent dll linkage. dllexport a ssumed. POSIX.xs(194) : warning C4273​: 'strtoul' : inconsistent dll linkage. dllexport assumed. "Running Mkbootstrap for POSIX ()"

8---------------------------------------------------

Finally the `nmake test` results were​:

io/fs...............ok 29/29FAILED test 16   Failed 1/29 tests\, 96.55% okay (-12 skipped tests​: 16 okay\, 55.17%)

Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------------------- io/fs.t 29 1 3.45% 16 22 tests and 74 subtests skipped. Failed 1/233 test scripts\, 99.57% okay. 1/10630 subtests failed\, 99.99% okay. NMAKE : fatal error U1077​: '..\perl.exe' : return code '0xff' Stop.

Peter Prymmer

Perl Info ``` Site configuration information for perl 5.00564: Configured by pvhp at Wed Feb 2 22:11:53 2000. Summary of my perl5 (revision 5 version 5 subversion 640) 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 usesocks=undef useperlio=undef d_sfio=undef use64bits=undef uselargefiles=undef usemultiplicity=undef Compiler: cc='cl', optimize='-Od -MD -DNDEBUG', gccversion= cppflags='-DWIN32' ccflags ='-Od -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_MSVCRT_READFIX' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"d:\perl5564\5.5.640\lib\MSWin32-x86\CORE" -machine:x86' libpth=\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 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:\perl5564\5.5.640\lib\MSWin32-x86\CORE" -machine:x86' Locally applied patches: @INC for perl 5.00564: lib D:/pjunk/perl5.5.640/lib . Environment for perl 5.00564: HOME=C:/ LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=c:\perl\bin;c:\mks\mksnt;C:\WINNT\system32;C:\WINNT;C:\bin;C:\DMI\BIN;;c:\program files\devstudio\sharedide\bin\ide;c:\program files\devstudio\sharedide\bin;c:\program files\devstudio\vc\bin;C:\MVIEWER;C:\READIBMW PERL_BADLANG (unset) SHELL=c:/mks/mksnt/sh.exe ```
p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

During the build on NT Workstation 4 (SP N for some N > 2) using MS VC(++) and nmake I noted the following warnings during the build​:

8\<--------------------------------------------------- copy ..\perl.exe ..\wperl.exe 1 file(s) copied. editbin /subsystem​:windows ..\wperl.exe Microsoft (R) COFF Binary File Editor Version 5.00.7022 Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored copy splittree.pl .. 1 file(s) copied.

8---------------------------------------------------

Then use MS VC(++) version N for some N>5 (and make sure that namely editbin.exe that comes with MSVC++6.x [for any x] is used).

wperl.exe is the same as perl.exe but without Win32-console\, you hardly will be missing it. :)

and a bit later on​: .... all these warnings may be ignored\, I think.

Finally the `nmake test` results were​: Failed Test Status Wstat Total Fail Failed List of failed ---------------------------------------------------------------------------


io/fs.t 29 1 3.45% 16

My compile (with BC++5.02) was failed at io/fs.t too\, but on different test(s). :(

Good luck\, Vadim.

p5pRT commented 24 years ago

From @gsar

On Wed\, 02 Feb 2000 22​:40​:15 PST\, Peter Prymmer wrote​:

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored

I guess you have an older version of the compiler. (VC6.0's editbin doesn't complain like that.) We need to make the wperl step specific to that version or later\, in that case.

[other known warnings] Finally the `nmake test` results were​:

io/fs...............ok 29/29FAILED test 16 Failed 1/29 tests\, 96.55% okay (-12 skipped tests​: 16 okay\, 55.17%)

Are you testing it on a FAT filesystem? If so\, try NTFS. It doesn't fail here on NTFS.

Sarathy gsar@​ActiveState.com

p5pRT commented 24 years ago

From @gsar

On Thu\, 03 Feb 2000 11​:00​:46 +0300\, "Konovalov\, Vadim" wrote​:

Finally the `nmake test` results were​: Failed Test Status Wstat Total Fail Failed List of failed --------------------------------------------------------------------------- ---- io/fs.t 29 1 3.45% 16

My compile (with BC++5.02) was failed at io/fs.t too\, but on different test(s). :(

I think the failures with bcc32 are benign; they looked like they were due to the 'other' mode bits that are pretty much meaningless. Patch to testsuite welcome.

Sarathy gsar@​ActiveState.com

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

On Fri\, 4 Feb 2000\, Gurusamy Sarathy wrote​:

On Wed\, 02 Feb 2000 22​:40​:15 PST\, Peter Prymmer wrote​:

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored

I guess you have an older version of the compiler. (VC6.0's editbin doesn't complain like that.) We need to make the wperl step specific to that version or later\, in that case.

Yes I am pretty sure that it was version 5.x. If I get back to it I'll try to determine what macro values are there.

[other known warnings] Finally the `nmake test` results were​:

io/fs...............ok 29/29FAILED test 16 Failed 1/29 tests\, 96.55% okay (-12 skipped tests​: 16 okay\, 55.17%)

Are you testing it on a FAT filesystem? If so\, try NTFS. It doesn't fail here on NTFS.

Indeed. It occurred to me only well after I posted this that I ought to have mentioned that the tests were carried out on a FAT32 filesystem. Sorry for raising concern unnecessarily.

Peter Prymmer

p5pRT commented 24 years ago

From @jandubois

On Fri\, 4 Feb 2000 09​:58​:18 -0800 (PST)\, Prymmer/Kahn \pvhp@&#8203;best\.com wrote​:

On Fri\, 4 Feb 2000\, Gurusamy Sarathy wrote​:

On Wed\, 02 Feb 2000 22​:40​:15 PST\, Peter Prymmer wrote​:

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored

I guess you have an older version of the compiler. (VC6.0's editbin doesn't complain like that.) We need to make the wperl step specific to that version or later\, in that case.

Yes I am pretty sure that it was version 5.x. If I get back to it I'll try to determine what macro values are there.

We could also add the appended exetype.pl file to perl/win32/bin and use that one instead. This should also help the MINGW32 users.

-Jan

#!perl -w use strict; unless (@​ARGV == 2) {   print "Usage​: $0 exefile [CONSOLE|WINDOWS]\n";   exit; } unless ($ARGV[1] =~ /^(console|windows)$/i) {   print "Invalid subsystem $ARGV[1]\, please use CONSOLE or WINDOWS\n";   exit; } my ($record\,$magic\,$offset\,$size); open EXE\, "+\< $ARGV[0]" or die "Cannot open $ARGV[0]​: $!"; binmode EXE; read EXE\, $record\, 32*4; ($magic\,$offset) = unpack "Sx58L"\, $record; die "Not an MSDOS executable file" unless $magic == 0x5a4d; seek EXE\, $offset\, 0; read EXE\, $record\, 24; ($magic\,$size) = unpack "Lx16S"\, $record; die "PE header not found" unless $magic == 0x4550; die "Optional header not in NT32 format" unless $size == 224; seek EXE\, $offset+24+68\, 0; print EXE pack "S"\, uc($ARGV[1]) eq 'CONSOLE' ? 3 : 2; close EXE; __END__

=head1 NAME

exetype - Change executable subsystem type between "Console" and "Windows"

=head1 SYNOPSIS

  C​:\perl\bin> copy perl.exe guiperl.exe   C​:\perl\bin> exetype guiperl.exe windows

=head1 DESCRIPTION

This program edits an executable file to indicate which subsystem the operating system must invoke for execution.

You can specify any of the following subsystems​:

=over

=item CONSOLE

The CONSOLE subsystem handles a Win32 character-mode application that use a console supplied by the operating system.

=item WINDOWS

The WINDOWS subsystem handles an application that does not require a console and creates its own windows\, if required.

=back

=head1 AUTHOR

Jan Dubois \jand@&#8203;activestate\.com

=cut

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

On Fri\, 4 Feb 2000\, Prymmer/Kahn wrote​:

On Fri\, 4 Feb 2000\, Gurusamy Sarathy wrote​:

On Wed\, 02 Feb 2000 22​:40​:15 PST\, Peter Prymmer wrote​:

EDITBIN : warning LNK4044​: unrecognized option "subsystem​:windows"; ignored

I guess you have an older version of the compiler. (VC6.0's editbin doesn't complain like that.) We need to make the wperl step specific to that version or later\, in that case.

Yes I am pretty sure that it was version 5.x. If I get back to it I'll try to determine what macro values are there.

Apparently I had used MS VC++ '5.0' to compile that. Here is a sample conditional compile (I do see that _MSC_VER is already mentioned in doio.c\, pp_sys.c\, and util.c)​:

C​:\>type version.c #include \<stdio.h>

int main() {

#if defined(_MSC_VER) # if _MSC_VER \<= 1100   printf("_MSC_VER == %d"\,_MSC_VER); # endif #endif

}

C​:\>cl version.c Microsoft (R) 32-bit C/C++ Standard Compiler Version 11.00.0000 for 80x86 Copyright (C) Microsoft Corp 1984-1997. All rights reserved.

version.c Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022 Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

/out​:version.exe version.obj

C​:\>./version _MSC_VER == 1100 C​:\>

So apparently the marketing version number corresponds to the linker version number not the compiler version number.

Speaking of linkers has anyone had a look at B\<Linkers & Loaders> by John R. Levine ((c) 2000\, Morgan Kaufmann Publishers\, SF CA; ISBN​: 1-55860-496-0)? He mentions the web site http​://linker.iecc.com/ will eventually carry a linker written in Perl that illustrates solutions to homework problems given in the text. I've not seen any code there yet though (it has been a while since I've looked however).

I'd like to take some time to look over Jan's proposed GUI vs non GUI switch script. It certainly looks useful.

Peter Prymmer

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Hello.

From​: Gurusamy Sarathy [mailto​:gsar@​ActiveState.com] On Thu\, 03 Feb 2000 11​:00​:46 +0300\, "Konovalov\, Vadim" wrote​:

Finally the `nmake test` results were​: Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------ io/fs.t 29 1 3.45% 16

My compile (with BC++5.02) was failed at io/fs.t too\, but on different test(s). :(

I think the failures with bcc32 are benign; they looked like they were due to the 'other' mode bits that are pretty much meaningless.

I agree.

Patch to testsuite welcome.

Mine compile failed on tests io/fs.t 5\,7\,9\,10. They all are about stat. I did some tries on 5.5.650 around this and found some intresting things.

First of all\, on 5.005_03 these tests are skipped because $IsDosish is set. Newer io/fs.t allows additional tests and this introduces failures that were not seen in previous versions.

MSVC++ build succeeds on these test while BC++5.2 fails. Why? In MSVC's distribution in file stat.c there are following lines​:

......   if (p = _tcsrchr(name\, _T('.'))) {   if ( !_tcsicmp(p\, _T(".exe")) ||   !_tcsicmp(p\, _T(".cmd")) ||   !_tcsicmp(p\, _T(".bat")) ||   !_tcsicmp(p\, _T(".com")) ) =this_is_my_comment similar idea iimplemented in (perl-src)/win32/win32.c\, in #if __BORLANDC__   ..... #endif =cut   uxmode |= _S_IEXEC;   }

  /* propagate user read/write/execute bits to group/other fields */

  uxmode |= (uxmode & 0700) >> 3;   uxmode |= (uxmode & 0700) >> 6; ......

Note what is happened after /* propagete ... */ comments. Probably MSVC++ does something that is not described in it's manuals and BC++ does not do\, but this probably helps MSVC to be closer to Unix world.

So I propose following patch for 5.5.650. It touches only BC++ compile and makes resulting Perl to pass all tests​:

--- win32.c Mon Feb 07 14​:43​:18 2000 +++ d​:\WORK\PerlCompile\perl5.5.650\win32\win32.c Wed Feb 09 12​:25​:57 2000 @​@​ -1129\,24 +1129\,28 @​@​   }   } #ifdef __BORLANDC__   if (S_ISDIR(sbuf->st_mode))   sbuf->st_mode |= S_IWRITE | S_IEXEC;   else if (S_ISREG(sbuf->st_mode)) { + int p;   if (l >= 4 && path[l-4] == '.') {   const char *e = path + l - 3;   if (strnicmp(e\,"exe"\,3)   && strnicmp(e\,"bat"\,3)   && strnicmp(e\,"com"\,3)   && (IsWin95() || strnicmp(e\,"cmd"\,3)))   sbuf->st_mode &= ~S_IEXEC;   else   sbuf->st_mode |= S_IEXEC;   }   else   sbuf->st_mode &= ~S_IEXEC; + /* Propagate permissions to _group_ and _others_ */ + p = sbuf->st_mode & (S_IREAD|S_IWRITE|S_IEXEC); + sbuf->st_mode |= (p>>3) | (p>>6);   } #endif   }   return res; } End of patch.

Good luck\, Vadim Konovalov. use strict;%;=qw;. @​ @​ .;\,;$;=q;@​;\,$\,=qq>\n>=>print unpack q\,A28\,x6\,join q\,\,\,map{;$;=$;{$;};$;x$_;}split q\,\,\,q \<13321523136131112131213171212121312131711524355111113121613132111316431322>