[CMake] Continued issues in trying to get CMake working on OpenVMS

Custin, Jay (CSC Sw Middleware) jay.custin at hpe.com
Mon Sep 21 10:17:15 EDT 2015


So I ran into a few minor issues compiling/linking the CMake images (compiler threw a few "warnings" which didn't really prove significant so I simply "silenced" the warnings to enable the code to compile clean and link).  I accomplished this with the following:

bash$ export CFLAGS="-Wc/warnings=disable=all"
bash$ export CXXFLAGS="-Wc/warnings=disable=all"
bash$ ./configure

The bootstrap "happily" compiles and links ALL the code without any issues... but then CMake does some self-evaluation and things get very ugly... very fast.  For whatever reason the bootstrap has no issues "finding" the various C/C++ header files to compile and link the CMake source... but when the "interim" CMake itself then tries to find them... complete and utter failure.

At present I have what I would call the "interim" version of CMake built (which at this phase requires adding the option -DCMAKE_BOOTSTRAP=1 on the end of the cmake command to do much of anything).  I have included an abbreviated version of this build below:

bash$ export CFLAGS="-Wc/warnings=disable=all"
bash$ export CXXFLAGS="-Wc/warnings=disable=all"
bash$ ./configure --system-curl --system-zlib --verbose --init=BuildCMakeOpenVMS_CacheFlags.cmake
---------------------------------------------
Source directory: /PRJ_ROOT/CMAKE-3_3_1
Binary directory: /PRJ_ROOT/CMAKE-3_3_1
Prefix directory: /usr/local
System:           OpenVMS 

---------------------------------------------
CMake 3.3.1, Copyright 2000-2015 Kitware, Inc.
C compiler on this system is: cc -Wc/warnings=disable=all
C++ compiler on this system is: CXX -Wc/warnings=disable=all
%DCL-E-PARSEFAIL, error parsing DCL$PATH:"cc".* -RMS-F-FNM, error in file name Makefile processor on this system is: make %DCL-E-NOTFR, no transfer address CXX is not GNU compiler %DCL-E-NOTFR, no transfer address CXX is not SolarisStudio compiler CXX has setenv CXX has unsetenv CXX does not have environ in stdlib.h CXX has STL in std:: namespace CXX has ANSI streams CXX has streams in std:: namespace CXX has sstream CXX has operator!=(string, char*) CXX has stl iterator_traits CXX has standard template allocator CXX has allocator<>::rebind<> CXX does not have non-standard allocator<>::max_size argument CXX has stl containers supporting allocator objects CXX has stl wstring CXX has header cstddef CXX does not require template friends to use <> CXX supports member templates CXX has standard template specialization syntax CXX has argument dependent lookup CXX does not have struct stat with st_mtim member CXX has ios::binary openmode
---------------------------------------------
CXX -Wc/warnings=disable=all  -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -I/PRJ_ROOT/CMAKE-3_3_1/Source   -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -c /PRJ_ROOT/CMAKE-3_3_1/Source/cmake.cxx -o cmake.o
CXX -Wc/warnings=disable=all  -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -I/PRJ_ROOT/CMAKE-3_3_1/Source   -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -c /PRJ_ROOT/CMAKE-3_3_1/Source/cmakemain.cxx -o cmakemain.o
CXX -Wc/warnings=disable=all  -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -I/PRJ_ROOT/CMAKE-3_3_1/Source   -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -c /PRJ_ROOT/CMAKE-3_3_1/Source/cmcmd.cxx -o cmcmd.o

<<Blah>>
<<Blah>>
<<Blah>>

cc -Wc/warnings=disable=all -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -I/PRJ_ROOT/CMAKE-3_3_1/Source   -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -DKWSYS_NAMESPACE=cmsys  -c /PRJ_ROOT/CMAKE-3_3_1/Source/kwsys/Terminal.c -o Terminal.o
CXX  -Wc/warnings=disable=all  -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk -I/PRJ_ROOT/CMAKE-3_3_1/Source   -I/PRJ_ROOT/CMAKE-3_3_1/Bootstrap_cmk  cmake.o cmakemain.o cmcmd.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmCommandArgumentParserHelper.o cmCPackPrope rtiesGenerator.o cmDefinitions.o cmDepends.o cmDependsC.o cmDocumentationFormatter.o cmPolicies.o cmProperty.o cmPropertyMap.o cmPro pertyDefinition.o cmPropertyDefinitionMap.o cmMakeDepend.o cmMakefile.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmExp ortTryCompileFileGenerator.o cmExportSet.o cmExportSetMap.o cmExternalMakefileProjectGenerator.o cmGeneratorExpressionEvaluationFile
.o cmGeneratedFileStream.o cmGeneratorTarget.o cmGeneratorExpressionContext.o cmGeneratorExpressionDAGChecker.o cmGeneratorExpressio nEvaluator.o cmGeneratorExpressionLexer.o cmGeneratorExpressionNode.o cmGeneratorExpressionParser.o cmGeneratorExpression.o cmGlobal Generator.o cmInstallDirectoryGenerator.o cmLocalGenerator.o cmInstalledFile.o cmInstallGenerator.o cmInstallExportGenerator.o cmIns tallFilesGenerator.o cmInstallScriptGenerator.o cmInstallTargetGenerator.o cmScriptGenerator.o cmSourceFile.o cmSourceFileLocation.o  cmState.o cmSystemTools.o cmTestGenerator.o cmVersion.o cmFileTimeComparison.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefile Generator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityT argetGenerator.o cmOSXBundleGenerator.o cmNewLineStyle.o cmBootstrapCommands1.o cmBootstrapCommands2.o cmCommandsForBootstrap.o cmTa rget.o cmTest.o cmCustomCommand.o cmCustomCommandGenerator.o cmCacheManager.o cmListFileCache.o cmComputeLinkDepends.o cmComputeLink Information.o cmOrderDirectories.o cmComputeTargetDepends.o cmComputeComponentGraph.o cmExprLexer.o cmExprParser.o cmExprParserHelpe r.o cmGlobalNinjaGenerator.o cmLocalNinjaGenerator.o cmNinjaTargetGenerator.o cmNinjaNormalTargetGenerator.o cmNinjaUtilityTargetGen erator.o cmListFileLexer.o Directory.o EncodingCXX.o FStream.o Glob.o RegularExpression.o SystemTools.o EncodingC.o ProcessUNIX.o St ring.o System.o Terminal.o -o cmake

<<Blah>>
<<Blah>>  now the self-testing phase begins... and the responses become things like "no", "not found", failed,...
<<Blah>>

-- Checking if compiler supports C++11 unordered_map
-- Checking if compiler supports C++11 unordered_map - no
-- Looking for unsetenv
-- Looking for unsetenv - not found
-- Looking for environ
-- Looking for environ - not found
-- Checking whether header cstdio is available
-- Checking whether header cstdio is available - no
-- Checking for Large File Support
-- Checking for Large File Support - failed to compile
-- Checking whether STL classes are in std namespace
-- Checking whether STL classes are in std namespace - no
-- Checking whether ANSI stream headers are available
-- Checking whether ANSI stream headers are available - no
-- Checking whether strstream.h is available
-- Checking whether strstream.h is available - no
-- Checking whether strstrea.h is available
-- Checking whether strstrea.h is available - no
-- Checking whether header cstddef is available
-- Checking whether header cstddef is available - no
-- Checking whether stl string has operator!= for char*
-- Checking whether stl string has operator!= for char* - no
-- Checking whether stl has iterator_traits
-- Checking whether stl has iterator_traits - no
-- Checking whether stl has old iterator_category
-- Checking whether stl has old iterator_category - no
-- Checking whether stl has internal __iterator_category
-- Checking whether stl has internal __iterator_category - no
-- Checking whether stl has standard template allocator
-- Checking whether stl has standard template allocator - no
-- Checking whether stl has old non-template allocator
-- Checking whether stl has old non-template allocator - no
-- Checking whether stl containers support allocator objects.
-- Checking whether stl containers support allocator objects. - no
-- Checking whether stl string has ostream operator<<
-- Checking whether stl string has ostream operator<< - no
-- Checking whether stl string has istream operator>>
-- Checking whether stl string has istream operator>> - no
-- Checking whether ios has binary openmode
-- Checking whether ios has binary openmode - no
-- Checking whether "<>" is needed for template friends
-- Checking whether "<>" is needed for template friends - yes
-- Checking for member template support
-- Checking for member template support - no
-- Checking for standard template specialization syntax
-- Checking for standard template specialization syntax - no
-- Checking whether argument dependent lookup is supported
-- Checking whether argument dependent lookup is supported - no
-- Checking whether struct stat has st_mtim member
-- Checking whether struct stat has st_mtim member - no
-- Checking whether C++ compiler has 'long long'
-- Checking whether C++ compiler has 'long long' - no
-- Checking whether C++ compiler has '__int64'
-- Checking whether C++ compiler has '__int64' - no
-- Checking for C type size macros
-- Checking for C type size macros - failed
-- Looking for sys/types.h
-- Looking for sys/types.h - not found
-- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - not found
-- Check size of char
-- Check size of char - failed
-- Check size of short
-- Check size of short - failed
-- Check size of int
-- Check size of int - failed


On and on it goes.

This gets made even more frustrating in that it appears that the testing phase does a VERY good job cleaning up after itself... I had to go in to the files, insert a series of MESSAGE statements to display the code it would try to build, then manually generate one of the files which it said failed to compile... but then I could manually compile and link from the very same Bash shell without any issue.

So the very headers that the configure/bootstrap used to compile and link the CMake images... it then can't find when it RUNS its tests using those same images.  I figure that it MAY have something to do with something like the following:

Modules/CheckIncludeFile.cmake
Modules/ CheckIncludeFileCXX.cmake

Anyone have any suggestions?  

Any ideas on how to get how to get the partially built image (the initial image that requires passing -DCMAKE_BOOTSTRAP=1 to run) to NOT clean up after itself?  I figure this might help me discern where things have got haywire.

JayC



More information about the CMake mailing list