Perldoc error: "Could not create temp file"

Perldoc error: "Could not create temp file"

am 17.04.2008 08:11:17 von Robbie Hatley

Greetings, groups. I'm running Windows 2000 and djgpp, and trying
to read the built-in perl documentation via "perldoc", but it's
not working. Perldoc fails both when invoked from the Windows
command processor (cmd.exe) or from Bash. In either case, I get
an error like this:

wd=C:\djgpp\bin
%bash
bash-2.04$ perldoc perl
Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not create temp file c:
/djgpp/tmp/zkQ06tqlcH: Invalid argument (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod
/Perldoc.pm line 1483
bash-2.04$ exit
exit
wd=C:\djgpp\bin
%perl perldoc perl
Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create temp file C:/TEMP
/0mfgo64w9W: Invalid argument (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p
m line 1483
wd=C:\djgpp\bin
%

Now, when I look at perldoc.pm line 1483, I see:

#........................................................... ...............
sub new_tempfile { # $self->new_tempfile( [$suffix, [$infix] ] )
my $self = shift;

++$Temp_Files_Created;

if( IS_MSWin32 ) {
my @out = $self->MSWin_perldoc_tempfile(@_);
return @out if @out;
# otherwise fall thru to the normal stuff below...
}

require File::Temp;
return File::Temp::tempfile(UNLINK => 1); ######### LINE 1483 #########
}
#........................................................... ...............

So, why would the parameters of File::Temp::tempfile be "invalid"?
And what the heck is "UNLINK"? That doesn't look like a variable.

I'm getting this problem both on my computer at work, and here at home.
Both computers are running MS Windows 2000, and both are using djgpp
and Perl version 5.8.8 .

I tried changing environment variable "tmpdir" to "C:\Temp", but I get
that same "Invalid argument on line 1483" error.

I'm not sure if this is a Perl issue or a djgpp issue (or both), so I'm
posting this in both comp.lang.perl.misc and comp.os.msdos.djgpp .

--
Cheers,
Robbie Hatley
perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'
perl -le 'print "\150ttp\72//\167ww.\167ell.\143om/~\154onewolf/"'

Re: Perldoc error: "Could not create temp file"

am 17.04.2008 09:19:19 von 1usa

"Robbie Hatley" wrote in
news:zd6dnbRZ8J5AdJvVnZ2dnUVZ_rignZ2d@giganews.com:

> wd=C:\djgpp\bin
> %bash
> bash-2.04$ perldoc perl
> Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not
> create temp file c: /djgpp/tmp/zkQ06tqlcH: Invalid argument
> (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod /Perldoc.pm line 1483
> bash-2.04$ exit
> exit
> wd=C:\djgpp\bin
> %perl perldoc perl
> Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create
> temp file C:/TEMP /0mfgo64w9W: Invalid argument (EINVAL) at
> /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p m line 1483
> wd=C:\djgpp\bin
> %

You have a permissions problem. Either c:\djgpp\tmp does not exist or
you do not have permissions to write there. Same applies to
C:\TEMP

I did use DJGPP for a long time. However, unless you really are doing
DOS development, I see very little point in trying to make do with
Perl in the DOS environment.

> return File::Temp::tempfile(UNLINK => 1); ######### LINE 1483
> #########
>
> So, why would the parameters of File::Temp::tempfile be "invalid"?
> And what the heck is "UNLINK"? That doesn't look like a variable.

No, the fat comma, =>, automatically quotes a bare string consisting
only of \w characters. Therefore, the statement above is identical to

return File::Temp::tempfile('UNLINK', 1);

> I'm getting this problem both on my computer at work, and here at
> home. Both computers are running MS Windows 2000, and both are
> using djgpp and Perl version 5.8.8 .
>
> I tried changing environment variable "tmpdir" to "C:\Temp", but I
> get that same "Invalid argument on line 1483" error.

If I remember correctly, there was problem where DJGPP tools were not
seeing the proper TEMP directory .. ah, yes, here is something that
might be useful:

http://groups.google.com/group/comp.os.msdos.djgpp/msg/ec8ac 77e5e94a579

>
> I'm not sure if this is a Perl issue or a djgpp issue (or both),
> so I'm posting this in both comp.lang.perl.misc and
> comp.os.msdos.djgpp .
>

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 17.04.2008 10:43:44 von Robbie Hatley

"A. Sinan Unur" wrote:

> "Robbie Hatley" wrote:
>
> > wd=C:\djgpp\bin
> > %bash
> > bash-2.04$ perldoc perl
> > Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not
> > create temp file c: /djgpp/tmp/zkQ06tqlcH: Invalid argument
> > (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod /Perldoc.pm line 1483
> > bash-2.04$ exit
> > exit
> > wd=C:\djgpp\bin
> > %perl perldoc perl
> > Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create
> > temp file C:/TEMP /0mfgo64w9W: Invalid argument (EINVAL) at
> > /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p m line 1483
> > wd=C:\djgpp\bin
> > %
>
> You have a permissions problem. Either c:\djgpp\tmp does not exist or
> you do not have permissions to write there. Same applies to
> C:\TEMP

No.

First of all, in that situation, the error is different,
and says "Permission Denied" (EACESS or EPERM) not
"Invalid Argument (EINVAL)".

Secondly, that was the first thing I thought of. I tried setting
tmpdir first to "C:\djgpp\tmp", then to "C:\Temp". In each case
I set the permissions (NTFS file system) to "Everyone: Full Control".
But I still get "cannot create temp file: invalid argument".

> I did use DJGPP for a long time. However, unless you really are doing
> DOS development, I see very little point in trying to make do with
> Perl in the DOS environment.

What environment would you suggest? My Perl installation
works fine for my purposes in the Win2K command console
environment (cmd.exe), or a Bash sub-shell run from that.
It's Perldoc.pm that's malfunctioning, not Perl or djgpp
or cmd.exe.

> > return File::Temp::tempfile(UNLINK => 1); ######### LINE 1483
> > #########
> >
> > So, why would the parameters of File::Temp::tempfile be "invalid"?
> > And what the heck is "UNLINK"? That doesn't look like a variable.
>
> No, the fat comma, =>, automatically quotes a bare string consisting
> only of \w characters. Therefore, the statement above is identical to
> return File::Temp::tempfile('UNLINK', 1);

Ok. So under what conditions would ('UNLINK', 1) be "invalid"?

> If I remember correctly, there was problem where DJGPP tools were not
> seeing the proper TEMP directory .. ah, yes, here is something that
> might be useful:
>
> http://groups.google.com/group/comp.os.msdos.djgpp/msg/ec8ac 77e5e94a579

I get:
myenv:
TEMP=C:\TEMP
TEMPDIR=C:\TEMP
TMP=C:\TEMP
TMPDIR=C:\TEMP
set:
TEMP=C:\TEMP
tempdir=C:\TEMP
TMP=C:\TEMP
tmpdir=C:\TEMP
Bash:
TEMP='C:\TEMP'
TEMPDIR='C:\TEMP'
TMP='C:\TEMP'
TMPDIR=c:/TEMP

It's all "C:\Temp" from any point of view. So that's not the
problem. The directory is correct, and the permissions are
correct.

But I still get "Invalid argument", and Perldoc still refuses
to run, on every computer I try it on.

--
Perplexed,
Robbie Hatley
perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'
perl -le 'print "\150ttp\72//\167ww.\167ell.\143om/~\154onewolf/"'

Re: Perldoc error: "Could not create temp file"

am 17.04.2008 16:32:50 von 1usa

"Robbie Hatley" wrote in
news:YNqdnXMJMcgtkJrVnZ2dnUVZ_qOknZ2d@giganews.com:

>
> "A. Sinan Unur" wrote:
>
>> "Robbie Hatley" wrote:
>>
>> > wd=C:\djgpp\bin
>> > %bash
>> > bash-2.04$ perldoc perl
>> > Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not
>> > create temp file c: /djgpp/tmp/zkQ06tqlcH: Invalid argument
>> > (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod /Perldoc.pm line 1483
>> > bash-2.04$ exit
>> > exit
>> > wd=C:\djgpp\bin
>> > %perl perldoc perl
>> > Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create
>> > temp file C:/TEMP /0mfgo64w9W: Invalid argument (EINVAL) at
>> > /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p m line 1483
>> > wd=C:\djgpp\bin
>> > %
>>
>> You have a permissions problem. Either c:\djgpp\tmp does not
>> exist or you do not have permissions to write there. Same applies
>> to C:\TEMP
>
....

> First of all, in that situation, the error is different,
> and says "Permission Denied" (EACESS or EPERM) not
> "Invalid Argument (EINVAL)".

Looking more carefully at the error message you posted, note that
the actual error is coming from File::Temp::_gettemp.

$open_success = sysopen($fh, $path, $flags, 0600);

is returning the error condition. So, the invalid value being passed
is either in $flags or the umask. I suspect $flags.

On a hunch, could you check what the following script prints:

#!/usr/bin/perl

use strict;
use warnings;

use Fcntl;

my $EXLOCK = eval {
local $SIG{__DIE__} = sub {};
local $SIG{__WARN__} = sub {};
&Fcntl::O_EXLOCK();
};

print "'$EXLOCK'\n";

__END__

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 17.04.2008 20:36:17 von Robbie Hatley

"A. Sinan Unur" wrote:

> "Robbie Hatley" wrote in
> news:YNqdnXMJMcgtkJrVnZ2dnUVZ_qOknZ2d@giganews.com:
>
> >
> > "A. Sinan Unur" wrote:
> >
> >> "Robbie Hatley" wrote:
> >>
> >> > wd=C:\djgpp\bin
> >> > %bash
> >> > bash-2.04$ perldoc perl
> >> > Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not
> >> > create temp file c: /djgpp/tmp/zkQ06tqlcH: Invalid argument
> >> > (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod /Perldoc.pm line 1483
> >> > bash-2.04$ exit
> >> > exit
> >> > wd=C:\djgpp\bin
> >> > %perl perldoc perl
> >> > Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create
> >> > temp file C:/TEMP /0mfgo64w9W: Invalid argument (EINVAL) at
> >> > /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p m line 1483
> >> > wd=C:\djgpp\bin
> >> > %
> >>
> >> You have a permissions problem. Either c:\djgpp\tmp does not
> >> exist or you do not have permissions to write there. Same applies
> >> to C:\TEMP
> >
> ...
>
> > First of all, in that situation, the error is different,
> > and says "Permission Denied" (EACESS or EPERM) not
> > "Invalid Argument (EINVAL)".
>
> Looking more carefully at the error message you posted, note that
> the actual error is coming from File::Temp::_gettemp.
>
> $open_success = sysopen($fh, $path, $flags, 0600);
>
> is returning the error condition. So, the invalid value being passed
> is either in $flags or the umask. I suspect $flags.
>
> On a hunch, could you check what the following script prints:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use Fcntl;
>
> my $EXLOCK = eval {
> local $SIG{__DIE__} = sub {};
> local $SIG{__WARN__} = sub {};
> &Fcntl::O_EXLOCK();
> };
>
> print "'$EXLOCK'\n";
>
> __END__

Hmmm. That gives:

cwd = C:\
$p einval.p
Use of uninitialized value in concatenation (.) or string at
C:\scripts\einval.p line 14.
''
So it's just printing '', since $EXLOCK is uninitialized.
Whatever that indicates. I'm afraid its going way over my head.

--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant

Re: Perldoc error: "Could not create temp file"

am 17.04.2008 21:45:00 von 1usa

"Robbie Hatley" wrote in
news:CuSdnZLhluU2BZrVnZ2dnUVZ_oaonZ2d@giganews.com:

>
> "A. Sinan Unur" wrote:
>> On a hunch, could you check what the following script prints:
>>
>> #!/usr/bin/perl
>>
>> use strict;
>> use warnings;
>>
>> use Fcntl;
>>
>> my $EXLOCK = eval {
>> local $SIG{__DIE__} = sub {};
>> local $SIG{__WARN__} = sub {};
>> &Fcntl::O_EXLOCK();
>> };
>>
>> print "'$EXLOCK'\n";
>>
>> __END__
>
> Hmmm. That gives:
>
> cwd = C:\
> $p einval.p
> Use of uninitialized value in concatenation (.) or string at
> C:\scripts\einval.p line 14.
> ''
> So it's just printing '', since $EXLOCK is uninitialized.
> Whatever that indicates. I'm afraid its going way over my head.

That indicates that the problem flag is one of the other ones.

Here is my guess, File::Temp is OK, but Pod::Perldoc only seems to
check and take care of the shortcomings of Win32. However, the same
shortcomings exist in DJGPP running on Win32 as well. I did look at
MSWin_perldoc_tempfile in Perldoc.pm and it looks like the DJGPP
would need special handling as well.

The only Win32 specific part of the special handling seems to be
getting the tick count for generating a unique filename.

I don't have a DJGPP environment set up right now so I can't test a
patch, but, if you don't care much about filenames being
unguessable, replacing the filename generation algorithm to
something along the lines of

sub DJGPP_perldoc_tempfile {

# skip, see sub MSWin_perldoc_tempfile

# completely untested

my $ext = 'aaa';

do {

# used also in MSWin_temp_cleanup

$spec = catfile(
$tempdir,
sprintf( 'pd%6.6x.%s', time & 0x00ffffff, $ext ),
);
++ $ext;
} while ( -e $spec );

Alternatively, you can try UNLINK => 0 and see if it solves you
immediate problem.

Sorry, I can't investigate this any further without setting up a
DJGPP environment.

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 02:37:05 von Robbie Hatley

"A. Sinan Unur" wrote:

> Here is my guess, File::Temp is OK, but Pod::Perldoc only seems to
> check and take care of the shortcomings of Win32. However, the same
> shortcomings exist in DJGPP running on Win32 as well. I did look at
> MSWin_perldoc_tempfile in Perldoc.pm and it looks like the DJGPP
> would need special handling as well.
>
> The only Win32 specific part of the special handling seems to be
> getting the tick count for generating a unique filename.
>
> I don't have a DJGPP environment set up right now so I can't test a
> patch, but, if you don't care much about filenames being
> unguessable, replacing the filename generation algorithm to
> something along the lines of
>
> sub DJGPP_perldoc_tempfile {
>
> # skip, see sub MSWin_perldoc_tempfile
>
> # completely untested
>
> my $ext = 'aaa';
>
> do {
>
> # used also in MSWin_temp_cleanup
>
> $spec = catfile(
> $tempdir,
> sprintf( 'pd%6.6x.%s', time & 0x00ffffff, $ext ),
> );
> ++ $ext;
> } while ( -e $spec );

I'll try that, but i'm not hopeful. The error messages show
different random 10-character file names each time I try
running Perldoc. So perldoc.pm is successfully coming up with
random file names, but they apparently get rejected somewhere.

Hmmm... 10 characters... I wonder if something in the DJGPP
version of Perl or perldoc.pm is expecting 8x3 DOS file names?
If so, it may reject 10x3. How would I go about altering
perldoc.pm to use 8x3 instead of 10x3 temp file names?

> Alternatively, you can try UNLINK => 0 and see if it solves you
> immediate problem.

I think that's one of the things I tried last night, but I'll
make sure after work tonight.

I'm curious: Have any of the others in these two groups had
problems running perldoc on DJGPP on Win2K? Or more to the
point, can anyone here SUCCESSFULLY run DJGPP perldoc on
Win2K? I'm wondering if this is a widespread bug, or just
some fluke of setup of the 2 machines I'm seeing it on.

I know that djgpp perldoc USED to work on Win2k. But after
a hard-disk crash a few months ago, I recreated my djgpp folder
with all the lastest stuff, almost certainly newer versions;
so I'm suspecting this may be a bug in the 5.8.8 version
of djgpp Perl.

Is anyone here running DJGPP and Perl 5.8.8 on Win2K? If so,
please try this: Run Bash, then at Bash prompt type
"perldoc perl". Do you get "invalid argument in perldoc.pm
line 1483"? Or does it work fine?

--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 02:47:17 von 1usa

"Robbie Hatley" wrote in
news:jbednbQ7qIihcJrVnZ2dnUVZ_i2dnZ2d@giganews.com:

>
> "A. Sinan Unur" wrote:
>
>> Here is my guess, File::Temp is OK, but Pod::Perldoc only seems
>> to check and take care of the shortcomings of Win32. However, the
>> same shortcomings exist in DJGPP running on Win32 as well. I did
>> look at MSWin_perldoc_tempfile in Perldoc.pm and it looks like
>> the DJGPP would need special handling as well.

....

> I'll try that, but i'm not hopeful. The error messages show
> different random 10-character file names each time I try
> running Perldoc.

The point I was trying to make wasn't about the actual filename
being generated but I was referring to the fact that Windows temp
files required special handling.

> So perldoc.pm is successfully coming up with
> random file names, but they apparently get rejected somewhere.

....

> Hmmm... 10 characters... I wonder if something in the DJGPP
> version of Perl or perldoc.pm is expecting 8x3 DOS file names?
> If so, it may reject 10x3.

Actually, Perldoc.pm generates way more than 10 characters:

perldoc_perlfunc_t4805fd11_1e43f.txt

I don't know where you got 10 from.

> How would I go about altering
> perldoc.pm to use 8x3 instead of 10x3 temp file names?

I used one method in the code I posted: prefix pd, lower 24 bits of
time (6 hex digits) and three character extension.

I only did that to be on the safe side.

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 04:10:22 von Juan Manuel Guerrero

Robbie Hatley schrieb:
[snip]
> I'm curious: Have any of the others in these two groups had
> problems running perldoc on DJGPP on Win2K? Or more to the
> point, can anyone here SUCCESSFULLY run DJGPP perldoc on
> Win2K? I'm wondering if this is a widespread bug, or just
> some fluke of setup of the 2 machines I'm seeing it on.

Perl 5.8.8 compiled with djdev203 runs flawlessly on my Win98SE box
and perl 5.8.8 compiled with djdev204 runs flawlessly on my
WinXP box too. I can not reproduce the error you are reporting in
any way.
Even if I let point TMPDIR to a non-existing directory, Perl continues
working without any problem. The rule that Perl uses to create
temporary files is as follows:
1) Evaluate TMPDIR, TMP and TEMP in that order and determinate
if that directory exists *and* is writable. If not descard the
pointer
and try the next environment variable.
2) If non of them worked the try /tmp. This means that it assumes
that the current partition has a /tmp directory. If this is proven
untrue The it defaults to /. It creats the temporary file in the
root directory of the current partition.
It must be noticed that Perl always checks for existance and
for write rights of the directory before trying to create the
file.

The length of the temporary name has no influence;
you use a LFN system.


> I know that djgpp perldoc USED to work on Win2k. But after
> a hard-disk crash a few months ago, I recreated my djgpp folder
> with all the lastest stuff, almost certainly newer versions;
> so I'm suspecting this may be a bug in the 5.8.8 version
> of djgpp Perl.
>
> Is anyone here running DJGPP and Perl 5.8.8 on Win2K? If so,
> please try this: Run Bash, then at Bash prompt type
> "perldoc perl". Do you get "invalid argument in perldoc.pm
> line 1483"? Or does it work fine?
No, it always works on all OS I have tried on different computers.
I am afraid that something is really brocken in your installation.
For some reason the opening of the temporary file is not
possible on your system.

Regards,
Juan M. Guerrero

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 04:33:13 von 1usa

"Robbie Hatley" wrote in news:jbednbQ7qIihcJrVnZ2dnUVZ_i2dnZ2d@giganews.com:

[ follow-ups set to comp.os.msdos.djgpp ]

> Is anyone here running DJGPP and Perl 5.8.8 on Win2K? If so,
> please try this: Run Bash, then at Bash prompt type
> "perldoc perl". Do you get "invalid argument in perldoc.pm
> line 1483"? Or does it work fine?

OK, I gave in and downloaded all the files on those painfully
slow connections ;-)

bash-2.04$ perldoc -f time
time
Returns the number of non-leap seconds since whatever time the
system considers to be the epoch, suitable for feeding to
.... snip. ..

c:\opt\djgpp\tmp\ReFiSi3BxU (END)

The operating system is Windows XP SP2. LFN=y set.

bash-2.04$ perl -v

This is perl, v5.8.8 built for dos-djgpp-stdio

Copyright 1987-2006, Larry Wall

MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis
djgpp v2 port (jpl5003c) by Hirofumi Watanabe, 1996
djgpp v2 port (perl5004+) by Laszlo Molnar, 1997-1999

It looks like you indeed do have a configuration issue.
My original gut feeling was wrong.

Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 15:12:40 von Juan Manuel Guerrero

OFYI:
The error reported can not be reproduced by me on the
systems that are available to me.

The perl 5.8.8 port works flawlessly on the following
operating systems:
1) MSDOS 6.22 (SFN)
2) Win98SE (SFN)
3) Win98SE (LFN)
4) WinXP (home) SP2 (LFN)

It fails and will continue to failing in the future
because I have no intentions to fix it:
1) WinXP (home) SP2 (SFN)

The reason for this failure is that AFAIK there is
no way to inhibit the generation of numeric tails
for short file names. This means that a long file
name like this:
longfilename.extension
has a short file name alias that looks like this:
longfi~1.ext
and this will not be found by perl or any other djgpp
program. On Win98 there is always the possibility to
disable the numeric tail generation so that:
longfilename.extension
is cleanly truncated to 8.3 and becomes:
longfile.ext
The OS will truncated in this way the long file name
passed by the application (perl) and looks for the file
with the truncated name and will find it.
If the long file name is not truncated in this way to the
8.3 length but changed by the OS like this
longfi~1.ext
the application will never find the file.
To be able to run djgpp applications with an OS that
generates numeric tails for the SFN aliases almost the
complete stdio of the application must be replaced and
I have not the time to do that.
IMHO there is no reason to use SFN where LFN support is
available.
In conclusion; *no one* of the ports I have produced is
able to run in SFN environments that use numeric tails.
I have never added djgpp specific code that is able to
handle SFN with numeric tails and that is started if
the file can not be found using the long file name.


Anyway all this does not explain the failure that has been
reported. On my WinXP box I have set LFN=n in djgpp.env
and started bash. I started the command:
perldoc perl
and got the following output:


perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "de"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /dev/env/
DJDIR/lib/perl5 /dev/env/DJDIR/lib/perl5/site /dev/env/DJDIR/lib/perl5/
site /dev/env/DJDIR/lib/perl5/site .) at /dev/env/DJDIR/lib/perl5/Pod/
Perldoc.pm line 10.
BEGIN failed--compilation aborted at /dev/env/DJDIR/lib/perl5/Pod/
Perldoc.pm line 10.
Compilation failed in require at c:/djgpp/bin/perldoc line 9.
BEGIN failed--compilation aborted at c:/djgpp/bin/perldoc line 9.


The application fails before it reaches the point where the
temporary file is created. The applications is not even
capable to start because it can not load the required
modules. This is due the numeric tails in the file and
directory names.

Regards,
Juan M. Guerrero

Re: Perldoc error: "Could not create temp file"

am 18.04.2008 22:40:18 von Robbie Hatley

Juan Manuel Guerrero wrote:

> Robbie Hatley schrieb:
> [snip]
> > I'm curious: Have any of the others in these two groups had
> > problems running perldoc on DJGPP on Win2K? Or more to the
> > point, can anyone here SUCCESSFULLY run DJGPP perldoc on
> > Win2K? I'm wondering if this is a widespread bug, or just
> > some fluke of setup of the 2 machines I'm seeing it on.
>
> Perl 5.8.8 compiled with djdev203 runs flawlessly on my Win98SE box
> and perl 5.8.8 compiled with djdev204 runs flawlessly on my
> WinXP box too. I can not reproduce the error you are reporting in
> any way.

Win98SE and WinXP are not Win2K.

> No, it always works on all OS I have tried on different computers.

On all OSs except Win2K, apparently.

Is anyone here running djgpp Perl 5.8.8 on Microsoft Windows 2000
Professional? If so, does perldoc work for you? If you launch Bash
and type "perldoc perl", do you get an error message saying:

Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX:
Could not create temp file c:/djgpp/tmp/zkQ06tqlcH:
Invalid argument (EINVAL) at
/dev/env/DJDIR/lib/perl5/Pod/Perldoc.pm line 1483

or does it work fine?

--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 01:35:22 von Robbie Hatley

Juan Manuel Guerrero wrote:

> (reports of successes and failures on MSDOS, Win98,
> and WinXP)

Thanks for the information, but I don't use those OSs.
All the computers I use both at home and at work run
Microsoft Windows 2000 Professional. (IMO, the only
"good" OS Microsoft ever made.)

Djgpp works fine for me on Win2K machines, with the
exception of the documentation for Perl 5.8.8, all of
which (perldoc, info, man) is broken and useless.
(Perldoc.pm crashes w complaints of not being able to
write temporary files; and the man pages cause ntvdm.exe
to crash w "illegal memory access" if you try to read
them. As for the info pages, there aren't any.)

I don't know if this is true on all Win2K machines,
but it's true on the 2 machines I've tried so far.
Unknown if it's fixable at this point; I'm still
struggling with it.

--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 02:41:44 von 1usa

"Robbie Hatley" wrote in
news:hZmdnUQdD63UrZTVnZ2dnUVZ_h6hnZ2d@giganews.com:

> Juan Manuel Guerrero wrote:
>
>> (reports of successes and failures on MSDOS, Win98,
>> and WinXP)
>
> Thanks for the information, but I don't use those OSs.
> All the computers I use both at home and at work run
> Microsoft Windows 2000 Professional. (IMO, the only
> "good" OS Microsoft ever made.)

Opinions vary on that ;-)

I'll give it a shot on my office computer on Monday.

Incidentally, could you tell me the service pack level for your
Win2K installation?

> Djgpp

Not to start another flamewar over names, but I don't think DJ
appreciates his name being mangled like that.

http://www.delorie.com/users/dj/

Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 03:52:12 von benkasminbullock

On Sat, 19 Apr 2008 00:41:44 +0000, A. Sinan Unur wrote:

> Not to start another flamewar over names, but I don't think DJ
> appreciates his name being mangled like that.
>
> http://www.delorie.com/users/dj/

That made me laugh, because it says "It is not correct to insert a space
between the D and the J, or to put periods after them as if they were
initials, or to make either of them lower case" but the title of the page
is "dj delorie" in lower case, and the top graphical bar also says "dj
delorie" in lower case.

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 04:05:01 von 1usa

Ben Bullock wrote in
news:fubj8c$ple$1@ml.accsnet.ne.jp:

> On Sat, 19 Apr 2008 00:41:44 +0000, A. Sinan Unur wrote:
>
>> Not to start another flamewar over names, but I don't think DJ
>> appreciates his name being mangled like that.
>>
>> http://www.delorie.com/users/dj/
>
> That made me laugh, because it says "It is not correct to insert a
> space between the D and the J, or to put periods after them as if
> they were initials, or to make either of them lower case" but the
> title of the page is "dj delorie" in lower case, and the top
> graphical bar also says "dj delorie" in lower case.

But in that case *both* of them are in lower case (i.e. Guttman-
style is OK ;-)

IIRC from my days on comp.os.msdos.djgpp, it is OK to refer to DJGPP
as djgpp but it is not OK to use DjGPP, dJGPP, Djgpp etc.

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 05:23:40 von benkasminbullock

On Sat, 19 Apr 2008 02:05:01 +0000, A. Sinan Unur wrote:

> IIRC from my days on comp.os.msdos.djgpp, it is OK to refer to DJGPP as
> djgpp but it is not OK to use DjGPP, dJGPP, Djgpp etc.

At one point in my life I had to use a piece of sado-masochism known as
TeX, a language for mathematical typesetting. Not only is the spelling
hideous, but on top of that the "X" in TeX apparently represents not an X
but actually a Greek letter 'χ', so you're supposed to pronounce it
"tech" or even "tef" or something. And to top matters off, when you use
TeX to write the word TeX you are supposed to write it with a kind of
logo in which not only the X but also the E has been corrupted.

Since then I've been suspicious of the motives of those who force others
to use English letters in contorted ways, and have developed the theory
that the more contorted the capitalization of the name, the more sado-
masochistic the system itself is likely to be.

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 05:39:49 von DJ Delorie

Ben Bullock writes:
> but the title of the page is "dj delorie" in lower case, and the top
> graphical bar also says "dj delorie" in lower case.

I consider that to be an artistic rendering of my name, not the name
itself. Likewise, when people complain that my email address is
"dj@delorie.com" and not "DJ@Delorie.com" I reply that "dj" in that
case is my email address, not my name.

However, the rules for "djgpp" are different, because it's not *my*
name, it's *djgpp*'s name. The rules are that all the letters should
be the same case - either DJGPP or djgpp, but never Djgpp.

Funny, at the moment I'm trying to get my insurance cards printed with
my name printed right. Four wrong ones so far...

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 10:48:47 von szr

Robbie Hatley wrote:
> Juan Manuel Guerrero wrote:
>
>> Robbie Hatley schrieb:
>> [snip]
>>> I'm curious: Have any of the others in these two groups had
>>> problems running perldoc on DJGPP on Win2K? Or more to the
>>> point, can anyone here SUCCESSFULLY run DJGPP perldoc on
>>> Win2K? I'm wondering if this is a widespread bug, or just
>>> some fluke of setup of the 2 machines I'm seeing it on.
>>
>> Perl 5.8.8 compiled with djdev203 runs flawlessly on my Win98SE box
>> and perl 5.8.8 compiled with djdev204 runs flawlessly on my
>> WinXP box too. I can not reproduce the error you are reporting in
>> any way.
>
> Win98SE and WinXP are not Win2K.

Actually XP is a direct descendant of 2K, which comes from the NT line,
while 98 descends from 95 which bares roots in the 3.x line.

--
szr

Re: Perldoc error: "Could not create temp file"

am 19.04.2008 16:04:33 von Juan Manuel Guerrero

Robbie Hatley schrieb:
> Juan Manuel Guerrero wrote:
>
> > (reports of successes and failures on MSDOS, Win98,
> > and WinXP)
>
> Thanks for the information, but I don't use those OSs.
> All the computers I use both at home and at work run
> Microsoft Windows 2000 Professional. (IMO, the only
> "good" OS Microsoft ever made.)

I can only report what I have noticed on the OSs
that I have access to. Actually I do not know any
person that runs W2K so I can not test on that.
My intention was to make clear that there is a
file name issue that I will not fix. Perl and all
the other ports I have released during the last
few years are not capable to handle SFN that
use numeric tails. No one should be surprised
if he use some Windows system with LFN support
and he set LFN=n in his environment that the
DJGPP stops working. The only exception to
this rule are those Windows systems where the
user has control over numeric tail generation.
Neitherless all this do not explain the failure you
are reporting.
This implies that I am assuming that run DJGPP
with LFN=y in your environment.


> Djgpp works fine for me on Win2K machines, with the
> exception of the documentation for Perl 5.8.8, all of
> which (perldoc, info, man) is broken and useless.
> (Perldoc.pm crashes w complaints of not being able to
> write temporary files; and the man pages cause ntvdm.exe
> to crash w "illegal memory access" if you try to read
> them. As for the info pages, there aren't any.)

I can read the formated man pages on all my OSs.
What does ntvdm.exe make crash : man.exe or
less.exe ?


Regards,
Juan M. Guerrero

Re: Perldoc error: "Could not create temp file"

am 20.04.2008 16:38:14 von Maurice Lombardi

DJ Delorie a écrit :
> I consider that to be an artistic rendering of my name, not the name
> itself. Likewise, when people complain that my email address is
> "dj@delorie.com" and not "DJ@Delorie.com" I reply that "dj" in that
> case is my email address, not my name.

> Funny, at the moment I'm trying to get my insurance cards printed with
> my name printed right. Four wrong ones so far...

Just curious.
You say that dj is your first name.
I never heard previously of such a first name, and apparently, your
problems come from the fact that everybody is alike.
From what country on earth it comes, has it some meaning in some
language, how do you pronounce it ?

Maurice

--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi@ujf-grenoble.fr

Re: Perldoc error: "Could not create temp file"

am 21.04.2008 22:11:32 von Robert Riebisch

Robbie Hatley wrote:

> Is anyone here running djgpp Perl 5.8.8 on Microsoft Windows 2000

I ran djdev204, bsh205bb, perl588b.

> Professional? If so, does perldoc work for you? If you launch Bash
> and type "perldoc perl", do you get an error message saying:
>
> Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX:
> Could not create temp file c:/djgpp/tmp/zkQ06tqlcH:
> Invalid argument (EINVAL) at
> /dev/env/DJDIR/lib/perl5/Pod/Perldoc.pm line 1483

Yes, same here!

> or does it work fine?

No. ;-)

But perl561b works fine.

--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup ONLY!