[CMake] Getting CMake to run on OpenVMS

Alan Antonuk antonuka at msu.edu
Sun Sep 30 13:35:08 EDT 2007


Update:
Got a successful compile/link (yay!) with some pretty trivial warnings:
                                        if ( !
yyg->yy_did_buffer_switch_on_eof )
........................................^
%CXX-W-CODEUNREACHABLE, statement is unreachable
at line number 1027 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Bootstrap^.cmk]cmCommandArgumentLex
er.cxx;


      yyssp = yyss + yysize - 1;
......^
%CXX-W-CODEUNREACHABLE, statement is unreachable
at line number 1072 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Bootstrap^.cmk]cmCommandArgumentPar
ser.cxx;

     goto yyerrorlab;
.....^
%CXX-W-CODCAUUNR, statement either is unreachable or causes unreachable
          code
at line number 1511 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Bootstrap^.cmk]cmCommandArgumentPar
ser.cxx;
                while ( num_to_read <= 0 )
........................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "num_to_read"
is being compa
red with a relational operator to a constant whose value is not greater than
zero.  This mi
ght not be what you intended.
at line number 1212 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Bootstrap^.cmk]cmListFileLexer.c;

    newSigChldAction.sa_handler = kwsysProcessesSignalHandler;
....^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer
value "kwsysProces
sesSignalHandler" is "function (int, pointer to struct __siginfo, pointer to
void) returnin
g void", which is not compatible with "function (int) returning void".
at line number 2331 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Source.kwsys]ProcessUNIX.c;3

    return fs.st_ctime >= 0 ? static_cast<long int>(fs.st_ctime) : 0;
.......................^
%CXX-W-UNSCOMZER, pointless comparison of unsigned integer with zero
at line number 1806 in file ROOT:[SRC.dev.cmake-2
^.4^.7.Source.kwsys]SystemTools.cxx;1

The only one that seems serious is the about the signal handler struct.
However, I'm going to wait and see if it causes the thing to blow-up.
Only change required was to add an #ifdef to ProcessUNIX.c on line 2330
(I'll send along a diff as soon as I can get a unix-compatible diff-utility
working)
#ifdef _VMS
    newSigChldAction.sa_handler = kwsysProcessesSignalHandler;
    newSigChldAction.sa_flags = SA_NOCLDSTOP;
#else
    newSigChldAction.sa_sigaction = kwsysProcessesSignalHandler;
    newSigChldAction.sa_flags = SA_NOCLDSTOP | SA_SIGINFO;
#endif


New challenges: getting the thing to actually run:
Next issue I run into is getcwd seems to fail which causes an abort early on
in the program invocation.  Abort seems to cause a OPCCUS failure with a
traceback (seems to be an issue with the C-RTL and the abort function):
%SYSTEM-F-OPCCUS, opcode reserved to customer fault at PC=FFFFFFFF80AA0DF4,
PS=0000001B

Digging into it a bit, the RTL claims there isn't enough space in the buffer
for the resulting string - which I don't understand as 2048 is a pretty big
buffer even for a string that should look like: "/root/src/dev/cmake-2.4.7
/bootstrap.cmk"

-Alan

On 9/28/07, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>
> Well, either an ifdef VMS, or a try_compile should be used to get the
> right signature for the handler.
> Sounds like you are making good progress.  I would recommend getting it
> to build any way possible,
> then send diffs to me and we can work out the right way to do it.
> Sounds like you are making good
> progress!
>
> -Bill
>
>


-- 
+––– –– –  –   –     –      –
| Alan Antonuk
| antonuka at msu.edu, aega at umich.edu
  tel cell: (734) 646-4476
| tel work: (734) 647-1386
  addr: 1705 Morehead Dr., Ann Arbor, MI 48103
| aim: alanxz1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070930/7154756e/attachment.html


More information about the CMake mailing list