Hi,

I've downloaded the Perl 5.10.0 tarball, unpacked it, and attempted to build
it.  My system is OpenVMS Alpha V8.3 with the HP C V7.3 compiler (the latest
one).

I ran CONFIGURE.COM with no parameters on the command line and it eventually
failed with this error:

   $ @configure
   .
   .
   .
   Choosing the C types to be used for Perl's internal types...
   (IV will be "long long", 8 bytes)
   (UV will be "unsigned long long", 8 bytes)
   (NV will be "double", 8 bytes)
   Checking whether your NVs can preserve your UVs...
   %RMS-E-EOF, end of file detected
   $

It's probably relevant that I specified the following when asked about what
data sizes to use:

   Try to use 64-bit integers, if available? [n] y
   Try to use maximal 64-bit support, if available? [n] y

The only other questions to which I supplied non-default answers were:

   What is your e-mail address? [EMAIL PROTECTED] [EMAIL PROTECTED]
   Build a DEBUGGING version of Perl? [y] n

I think the problem is that the "C" code used for the test in question is
functionally incomplete.  Here's the relevant bit of CONFIGURE.COM ...

   $ echo4 "Checking whether your NVs can preserve your UVs..."
   $ OS
   $ WS "#if defined(__DECC) || defined(__DECCXX)"
   $ WS "#include <stdlib.h>"
   $ WS "#endif"
   $ WS "#include <stdio.h>"
   $ WS "int main() {"
   $ WS "    ''uvtype' k = (''uvtype')~0, l;"
   $ WS "    ''nvtype' d;"
   $ WS "    l = k;"
   $ WS "    d = (''nvtype')l;"
   $ WS "    l = (''uvtype')d;"
   $ WS "    if (l == k)"
   $ WS "       printf(""preserve\n"");"
   $ WS "    exit(0);"
   $ WS "}"
   $ CS
   $ GOSUB compile

You'll notice that it produces output ("preserve") if the value is preserved,
and produces no output otherwise.  But the COMPILE subroutine expects output
to always be produced:

   $!: define a shorthand compile call
   $compile:
   $ GOSUB link_ok
   $just_mcr_it:
   $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
   $ THEN
   $   OPEN/WRITE CONFIG []try.out
   $   DEFINE/USER_MODE SYS$ERROR CONFIG
   $   DEFINE/USER_MODE  SYS$OUTPUT CONFIG
   $   MCR []try.exe
   $   CLOSE CONFIG
   $   OPEN/READ CONFIG []try.out
   $   READ CONFIG tmp
   $   CLOSE CONFIG
   $   DELETE/NOLOG/NOCONFIRM []try.out;
   $   DELETE/NOLOG/NOCONFIRM []try.exe;
   $ ELSE
   $   tmp = "" ! null string default
   $ ENDIF
   $ RETURN

The READ command fails with "%RMS-E-EOF" if the output file (try.out) is
empty, which it will be if the data values are not preserved.

Which leads me to two questions,

1.  Is my analysis correct, and would the fix be as simple as replacing

        if (l == k)
            printf("preserve\n");
        exit(0);"

    by

        if (l == k) {
            printf("preserve\n");
        }
        else {
            printf("corrupted\n");
        }
        exit(0);

   Or perhaps the better solution would be to fix the COMPILE routine to
   handle an empty output file, either by fixing the READ statement or
   simply appending a line of text (even an empty line) to the CONFIG
   file immediately after running try.exe.  (The latter is probably the
   simpler approach, although less "correct".)


2. Am I being naive in expecting this level of 64-bit support on VMS?

Thanks,

        Jeremy Begg

  +---------------------------------------------------------+
  |            VSM Software Services Pty. Ltd.              |
  |                 http://www.vsm.com.au/                  |
  |       "OpenVMS Systems Management & Programming"        |
  |---------------------------------------------------------|
  | P.O.Box 402, Walkerville, |  E-Mail:  [EMAIL PROTECTED] |
  | South Australia 5081      |   Phone:  +61 8 8221 5188   |
  |---------------------------|  Mobile:  0414 422 947      |
  |  A.C.N. 068 409 156       |     FAX:  +61 8 8221 7199   |
  +---------------------------------------------------------+

Reply via email to