delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/04/17/04:45:42

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
NNTP-Posting-Date: Thu, 17 Apr 2008 03:43:28 -0500
From: "Robbie Hatley" <lonewolf AT well DOT com>
Newsgroups: comp.lang.perl.misc,comp.os.msdos.djgpp
References: <zd6dnbRZ8J5AdJvVnZ2dnUVZ_rignZ2d AT giganews DOT com> <Xns9A8321CB0C79asu1cornelledu AT 127 DOT 0 DOT 0 DOT 1>
Subject: Re: Perldoc error: "Could not create temp file"
Date: Thu, 17 Apr 2008 01:43:44 -0700
Organization: Tustin Free Zone
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1914
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914
Message-ID: <YNqdnXMJMcgtkJrVnZ2dnUVZ_qOknZ2d@giganews.com>
Lines: 95
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-qqzwTMqczC6+L5n+esiFzanQyKGJg7qYrA9IBF5fiuGNCZoJA7qQyg/7wptQ2petJgYhAYMTwBFYHZV!//OYgZ9qXLZ7rhu4TgjR85T8A35LGlXQsF3mFg0MjHxo5xyNzXdU0IgrHKyCVJ0BPIMkcGOa+F3i
X-Complaints-To: abuse AT giganews DOT com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.39
X-Original-Bytes: 4275
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT 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

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/ec8ac77e5e94a579

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/"'


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019