[CMake] CMake port to OpenVMS - confusing behavior in cmliblzma code tree, specifically the config.h file generated from config.h.in

Custin, Jay (CSC Sw Middleware) jay.custin at hpe.com
Fri Nov 13 15:07:22 EST 2015


After somewhat of an archeological dig I have finally traced down the following error message:

[ 12%] Building C object Utilities/cmliblzma/CMakeFiles/cmliblzma_dir/liblzma/check/check.c.o
cd /PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma && /bin/cc   -Wc/warnings=disable=all/lis/show=all -w -I/PRJ_ROOT/CMAKE-3_3_2/Utilities
-I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/common -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/api -I/PRJ_ROOT/CMAKE-3_3_2/
Utilities/cmliblzma/liblzma/check -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/common -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmlib
lzma/liblzma/delta -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/lz -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/lzma -
I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/rangecoder -I/PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblzma/liblzma/simple -I/PRJ_ROOT
/CMAKE-3_3_2/Utilities/cmliblzma    -o CMakeFiles/cmliblzma_dir/liblzma/check/check.c.o   -c /PRJ_ROOT/CMAKE-3_3_2/Utilities/cmliblz
ma/liblzma/check/check.c

   typedef uint64_t uintptr_t;
....................^
%CC-E-NOLINKAGE, In this declaration, "uint32_t" has no linkage and has a prior declaration in this scope at line number 174 in file
LCL_ROOT:[cmake-3_3_2.Utilities.cmliblzma]config.h;7.
at line number 75 in module INTTYPES of text library SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1
make[2]: *** [Utilities/cmliblzma/CMakeFiles/cmliblzma_dir/liblzma/check/check.c.o] Error 2
make[2]: Leaving directory `/PRJ_ROOT/CMAKE-3_3_2'
make[1]: *** [Utilities/cmliblzma/CMakeFiles/cmliblzma_dir/all] Error 2
make[1]: Leaving directory `/PRJ_ROOT/CMAKE-3_3_2'
make: *** [all] Error 2

to a somewhat confusing (at least to me) behavior of the config.h header file generated from the config.h.in file.

Line  Statement
6    /* First, we need to know if the system has already defined them. */
7    #cmakedefine HAVE_INT16_T
8    #cmakedefine HAVE_INT32_T
9    #cmakedefine HAVE_INT64_T
10    #cmakedefine HAVE_INTMAX_T
11
12    #cmakedefine HAVE_UINT8_T
13    #cmakedefine HAVE_UINT16_T
14    #cmakedefine HAVE_UINT32_T
15    #cmakedefine HAVE_UINT64_T
16    #cmakedefine HAVE_UINTMAX_T

Generates these statements in the config.h header file

6    /* First, we need to know if the system has already defined them. */
7    /* #undef HAVE_INT16_T */
 8    /* #undef HAVE_INT32_T */
 9    /* #undef HAVE_INT64_T */
10    /* #undef HAVE_INTMAX_T */
11
12    /* #undef HAVE_UINT8_T */
13    /* #undef HAVE_UINT16_T */
14    /* #undef HAVE_UINT32_T */
15    /* #undef HAVE_UINT64_T */
16    /* #undef HAVE_UINTMAX_T */

Except the generated files Bootstrap_cmk/cmIML/int.h and Utilities/cmIML/int.h (which contain identical content) contain the following sections:

#if defined(__VMS)
# define cmIML_INT_NO_STDINT_H
# define cmIML_INT_HAVE_INTTYPES_H
#endif

And

#if defined(cmIML_INT_HAVE_STDINT_H) || defined(cmIML_INT_HAVE_INTTYPES_H)
#define cmIML_INT_HAVE_INT8_T 1
#define cmIML_INT_HAVE_UINT8_T 1
#define cmIML_INT_HAVE_INT16_T 1
#define cmIML_INT_HAVE_UINT16_T 1
#define cmIML_INT_HAVE_INT32_T 1
#define cmIML_INT_HAVE_UINT32_T 1
#define cmIML_INT_HAVE_INT64_T 1
#define cmIML_INT_HAVE_UINT64_T 1
#define cmIML_INT_NO_INTPTR_T 1
#define cmIML_INT_NO_UINTPTR_T 1
#endif

Near as I can tell no connection exists between the HAVE_xyz_T macros and the cmIML_INT_HAVE_xyz_T macros.  Likewise I can't seem to find anywhere that would actually define the HAVE_xyz_T macros which seems equally confusing.  Aside from having to manually edit the config.h.in can anyone suggest a way to work this?

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151113/0019a4e6/attachment-0001.html>


More information about the CMake mailing list