Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power


#Servers
#Programminglanguages
 View Only
  • 1.  Segfault when building CMake 3.23

    Posted 05/02/22 09:38 AM

    Hello,

    I have been trying to install CMake 3.23 from source, which, according to this blog post, recognizes IBM XLC correctly. I loaded the advanced toolchain 15.0m and then using `CXX=/opt/ibm/xlC/16.1.1/bin/xlC CC=/opt/ibm/xlC/16.1.1/bin/xlc`, run my CMake build script, which correctly works using clang and gcc. When building CMake, I get a segfault at the "Detecting C compiler ABI info" step.

    ```

    tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/md5.c -o rhash-librhash-md5.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/rhash.c -o rhash-librhash-rhash.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha1.c -o rhash-librhash-sha1.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha256.c -o rhash-librhash-sha256.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha3.c -o rhash-librhash-sha3.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha512.c -o rhash-librhash-sha512.c.o
    /opt/ibm/xlC/16.1.1/bin/xlC -std=gnu++14 -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/std -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities cmAddCustomCommandCommand.o cmAddCustomTargetCommand.o cmAddDefinitionsCommand.o cmAddDependenciesCommand.o cmAddExecutableCommand.o cmAddLibraryCommand.o cmAddSubDirectoryCommand.o cmAddTestCommand.o cmArgumentParser.o cmBinUtilsLinker.o cmBinUtilsLinuxELFGetRuntimeDependenciesTool.o cmBinUtilsLinuxELFLinker.o cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOLinker.o cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.o cmBinUtilsWindowsPELinker.o cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.o cmBreakCommand.o cmBuildCommand.o cmCMakeLanguageCommand.o cmCMakeMinimumRequired.o cmCMakePath.o cmCMakePathCommand.o cmCMakePolicyCommand.o cmCPackPropertiesGenerator.o cmCacheManager.o cmCommand.o cmCommandArgumentParserHelper.o cmCommands.o cmCommonTargetGenerator.o cmComputeComponentGraph.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmComputeTargetDepends.o cmConsoleBuf.o cmConditionEvaluator.o cmConfigureFileCommand.o cmContinueCommand.o cmCoreTryCompile.o cmCreateTestSourceList.o cmCryptoHash.o cmCustomCommand.o cmCustomCommandGenerator.o cmCustomCommandLines.o cmDefinePropertyCommand.o cmDefinitions.o cmDocumentationFormatter.o cmELF.o cmEnableLanguageCommand.o cmEnableTestingCommand.o cmExecProgramCommand.o cmExecuteProcessCommand.o cmExpandedCommandArgument.o cmExportBuildFileGenerator.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmExportSet.o cmExportTryCompileFileGenerator.o cmExprParserHelper.o cmExternalMakefileProjectGenerator.o cmFileCommand.o cmFileCopier.o cmFileInstaller.o cmFileSet.o cmFileTime.o cmFileTimeCache.o cmFileTimes.o cmFindBase.o cmFindCommon.o cmFindFileCommand.o cmFindLibraryCommand.o cmFindPackageCommand.o cmFindPathCommand.o cmFindProgramCommand.o cmForEachCommand.o cmFunctionBlocker.o cmFunctionCommand.o cmFSPermissions.o cmGeneratedFileStream.o cmGeneratorExpression.o cmGeneratorExpressionContext.o cmGeneratorExpressionDAGChecker.o cmGeneratorExpressionEvaluationFile.o cmGeneratorExpressionEvaluator.o cmGeneratorExpressionLexer.o cmGeneratorExpressionNode.o cmGeneratorExpressionParser.o cmGeneratorTarget.o cmGetCMakePropertyCommand.o cmGetDirectoryPropertyCommand.o cmGetFilenameComponentCommand.o cmGetPipes.o cmGetPropertyCommand.o cmGetSourceFilePropertyCommand.o cmGetTargetPropertyCommand.o cmGetTestPropertyCommand.o cmGlobalCommonGenerator.o cmGlobalGenerator.o cmGlobVerificationManager.o cmHexFileConverter.o cmIfCommand.o cmIncludeCommand.o cmIncludeGuardCommand.o cmIncludeDirectoryCommand.o cmIncludeRegularExpressionCommand.o cmInstallCommand.o cmInstallCommandArguments.o cmInstallDirectoryGenerator.o cmInstallExportGenerator.o cmInstallFileSetGenerator.o cmInstallFilesCommand.o cmInstallFilesGenerator.o cmInstallGenerator.o cmInstallGetRuntimeDependenciesGenerator.o cmInstallImportedRuntimeArtifactsGenerator.o cmInstallRuntimeDependencySet.o cmInstallRuntimeDependencySetGenerator.o cmInstallScriptGenerator.o cmInstallSubdirectoryGenerator.o cmInstallTargetGenerator.o cmInstallTargetsCommand.o cmInstalledFile.o cmLDConfigLDConfigTool.o cmLDConfigTool.o cmLinkDirectoriesCommand.o cmLinkItem.o cmLinkItemGraphVisitor.o cmLinkLineComputer.o cmLinkLineDeviceComputer.o cmListCommand.o cmListFileCache.o cmLocalCommonGenerator.o cmLocalGenerator.o cmMSVC60LinkLineComputer.o cmMacroCommand.o cmMakeDirectoryCommand.o cmMakefile.o cmMarkAsAdvancedCommand.o cmMathCommand.o cmMessageCommand.o cmMessenger.o cmNewLineStyle.o cmOSXBundleGenerator.o cmOptionCommand.o cmOrderDirectories.o cmOutputConverter.o cmParseArgumentsCommand.o cmPathLabel.o cmPolicies.o cmProcessOutput.o cmProjectCommand.o cmValue.o cmPropertyDefinition.o cmPropertyMap.o cmGccDepfileLexerHelper.o cmGccDepfileReader.o cmReturnCommand.o cmRulePlaceholderExpander.o cmRuntimeDependencyArchive.o cmScriptGenerator.o cmSearchPath.o cmSeparateArgumentsCommand.o cmSetCommand.o cmSetDirectoryPropertiesCommand.o cmSetPropertyCommand.o cmSetSourceFilesPropertiesCommand.o cmSetTargetPropertiesCommand.o cmSetTestsPropertiesCommand.o cmSiteNameCommand.o cmSourceFile.o cmSourceFileLocation.o cmStandardLevelResolver.o cmState.o cmStateDirectory.o cmStateSnapshot.o cmString.o cmStringAlgorithms.o cmStringReplaceHelper.o cmStringCommand.o cmSubcommandTable.o cmSubdirCommand.o cmSystemTools.o cmTarget.o cmTargetCompileDefinitionsCommand.o cmTargetCompileFeaturesCommand.o cmTargetCompileOptionsCommand.o cmTargetIncludeDirectoriesCommand.o cmTargetLinkLibrariesCommand.o cmTargetLinkOptionsCommand.o cmTargetPrecompileHeadersCommand.o cmTargetPropCommandBase.o cmTargetPropertyComputer.o cmTargetSourcesCommand.o cmTest.o cmTestGenerator.o cmTimestamp.o cmTransformDepfile.o cmTryCompileCommand.o cmTryRunCommand.o cmUnsetCommand.o cmUVHandlePtr.o cmUVProcessChain.o cmVersion.o cmWhileCommand.o cmWorkingDirectory.o cmake.o cmakemain.o cmcmd.o cmDepends.o cmDependsC.o cmDependsCompiler.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmProcessTools.o fs_path.o string_view.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmExprLexer.o cmExprParser.o cmGccDepfileLexer.o cmListFileLexer.o Directory.o EncodingCXX.o FStream.o Glob.o RegularExpression.o Status.o SystemTools.o EncodingC.o ProcessUNIX.o String.o
    System.o Terminal.o uv-src-strscpy.c.o uv-src-timer.c.o uv-src-uv-common.c.o uv-src-unix-cmake-bootstrap.c.o uv-src-unix-core.c.o uv-src-unix-fs.c.o uv-src-unix-loop.c.o uv-src-unix-loop-watcher.c.o uv-src-unix-no-fsevents.c.o uv-src-unix-pipe.c.o uv-src-unix-poll.c.o uv-src-unix-posix-hrtime.c.o uv-src-unix-posix-poll.c.o uv-src-unix-process.c.o uv-src-unix-signal.c.o uv-src-unix-stream.c.o uv-src-unix-tcp.c.o rhash-librhash-algorithms.c.o rhash-librhash-byte_order.c.o rhash-librhash-hex.c.o rhash-librhash-md5.c.o rhash-librhash-rhash.c.o rhash-librhash-sha1.c.o rhash-librhash-sha256.c.o rhash-librhash-sha3.c.o rhash-librhash-sha512.c.o -ldl -lrt -o cmake
    loading initial cache file /scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk/InitialCacheFlags.cmake
    -- The C compiler identification is XLClang 16.1.1.3
    -- The CXX compiler identification is XLClang 16.1.1.3
    -- Detecting C compiler ABI info
    /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/bootstrap: line 2030: 1499772 Segmentation fault (core dumped) "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
    ---------------------------------------------
    Error when bootstrapping CMake:
    Problem while running initial CMake
    ---------------------------------------------
    ***************
    *** ABORTED ***
    ***************
    An error occurred. Exiting...
    ```

    Then I tried using the advanced toolchain versions of xlC, i.e., `CXX=/opt/ibm/xlC/16.1.1/bin/xlC_at CC=/opt/ibm/xlC/16.1.1/bin/xlc_at` (also after executing module load at15.0). In that case, I get linker errors during the build:

    ```
    er/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha256.c -o rhash-librhash-sha256.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc_at -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha3.c -o rhash-librhash-sha3.c.o
    /opt/ibm/xlC/16.1.1/bin/xlc_at -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities -c /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/cmlibrhash/librhash/sha512.c -o rhash-librhash-sha512.c.o
    /opt/ibm/xlC/16.1.1/bin/xlC_at -std=gnu++14 -D_FILE_OFFSET_BITS=64 -DCMAKE_BOOTSTRAP -I/scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/LexerParser -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities/std -I/scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Utilities cmAddCustomCommandCommand.o cmAddCustomTargetCommand.o cmAddDefinitionsCommand.o cmAddDependenciesCommand.o cmAddExecutableCommand.o cmAddLibraryCommand.o cmAddSubDirectoryCommand.o cmAddTestCommand.o cmArgumentParser.o cmBinUtilsLinker.o cmBinUtilsLinuxELFGetRuntimeDependenciesTool.o cmBinUtilsLinuxELFLinker.o cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOLinker.o cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.o cmBinUtilsWindowsPELinker.o cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.o cmBreakCommand.o cmBuildCommand.o cmCMakeLanguageCommand.o cmCMakeMinimumRequired.o cmCMakePath.o cmCMakePathCommand.o cmCMakePolicyCommand.o cmCPackPropertiesGenerator.o cmCacheManager.o cmCommand.o cmCommandArgumentParserHelper.o cmCommands.o cmCommonTargetGenerator.o cmComputeComponentGraph.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmComputeTargetDepends.o cmConsoleBuf.o cmConditionEvaluator.o cmConfigureFileCommand.o cmContinueCommand.o cmCoreTryCompile.o cmCreateTestSourceList.o cmCryptoHash.o cmCustomCommand.o cmCustomCommandGenerator.o cmCustomCommandLines.o cmDefinePropertyCommand.o cmDefinitions.o cmDocumentationFormatter.o cmELF.o cmEnableLanguageCommand.o cmEnableTestingCommand.o cmExecProgramCommand.o cmExecuteProcessCommand.o cmExpandedCommandArgument.o cmExportBuildFileGenerator.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmExportSet.o cmExportTryCompileFileGenerator.o cmExprParserHelper.o cmExternalMakefileProjectGenerator.o cmFileCommand.o cmFileCopier.o cmFileInstaller.o cmFileSet.o cmFileTime.o cmFileTimeCache.o cmFileTimes.o cmFindBase.o cmFindCommon.o cmFindFileCommand.o cmFindLibraryCommand.o cmFindPackageCommand.o cmFindPathCommand.o cmFindProgramCommand.o cmForEachCommand.o cmFunctionBlocker.o cmFunctionCommand.o cmFSPermissions.o cmGeneratedFileStream.o cmGeneratorExpression.o cmGeneratorExpressionContext.o cmGeneratorExpressionDAGChecker.o cmGeneratorExpressionEvaluationFile.o cmGeneratorExpressionEvaluator.o cmGeneratorExpressionLexer.o cmGeneratorExpressionNode.o cmGeneratorExpressionParser.o cmGeneratorTarget.o cmGetCMakePropertyCommand.o cmGetDirectoryPropertyCommand.o cmGetFilenameComponentCommand.o cmGetPipes.o cmGetPropertyCommand.o cmGetSourceFilePropertyCommand.o cmGetTargetPropertyCommand.o cmGetTestPropertyCommand.o cmGlobalCommonGenerator.o cmGlobalGenerator.o cmGlobVerificationManager.o cmHexFileConverter.o cmIfCommand.o cmIncludeCommand.o cmIncludeGuardCommand.o cmIncludeDirectoryCommand.o cmIncludeRegularExpressionCommand.o cmInstallCommand.o cmInstallCommandArguments.o cmInstallDirectoryGenerator.o cmInstallExportGenerator.o cmInstallFileSetGenerator.o cmInstallFilesCommand.o cmInstallFilesGenerator.o cmInstallGenerator.o cmInstallGetRuntimeDependenciesGenerator.o cmInstallImportedRuntimeArtifactsGenerator.o cmInstallRuntimeDependencySet.o cmInstallRuntimeDependencySetGenerator.o cmInstallScriptGenerator.o cmInstallSubdirectoryGenerator.o cmInstallTargetGenerator.o cmInstallTargetsCommand.o cmInstalledFile.o cmLDConfigLDConfigTool.o cmLDConfigTool.o cmLinkDirectoriesCommand.o cmLinkItem.o cmLinkItemGraphVisitor.o cmLinkLineComputer.o cmLinkLineDeviceComputer.o cmListCommand.o cmListFileCache.o cmLocalCommonGenerator.o cmLocalGenerator.o cmMSVC60LinkLineComputer.o cmMacroCommand.o cmMakeDirectoryCommand.o cmMakefile.o cmMarkAsAdvancedCommand.o cmMathCommand.o cmMessageCommand.o cmMessenger.o cmNewLineStyle.o cmOSXBundleGenerator.o cmOptionCommand.o cmOrderDirectories.o cmOutputConverter.o cmParseArgumentsCommand.o cmPathLabel.o cmPolicies.o cmProcessOutput.o cmProjectCommand.o cmValue.o cmPropertyDefinition.o cmPropertyMap.o cmGccDepfileLexerHelper.o cmGccDepfileReader.o cmReturnCommand.o cmRulePlaceholderExpander.o cmRuntimeDependencyArchive.o cmScriptGenerator.o cmSearchPath.o cmSeparateArgumentsCommand.o cmSetCommand.o cmSetDirectoryPropertiesCommand.o cmSetPropertyCommand.o cmSetSourceFilesPropertiesCommand.o cmSetTargetPropertiesCommand.o cmSetTestsPropertiesCommand.o cmSiteNameCommand.o cmSourceFile.o cmSourceFileLocation.o cmStandardLevelResolver.o cmState.o cmStateDirectory.o cmStateSnapshot.o cmString.o cmStringAlgorithms.o cmStringReplaceHelper.o cmStringCommand.o cmSubcommandTable.o cmSubdirCommand.o cmSystemTools.o cmTarget.o
    cmTargetCompileDefinitionsCommand.o cmTargetCompileFeaturesCommand.o cmTargetCompileOptionsCommand.o cmTargetIncludeDirectoriesCommand.o cmTargetLinkLibrariesCommand.o cmTargetLinkOptionsCommand.o cmTargetPrecompileHeadersCommand.o cmTargetPropCommandBase.o cmTargetPropertyComputer.o cmTargetSourcesCommand.o cmTest.o cmTestGenerator.o cmTimestamp.o cmTransformDepfile.o cmTryCompileCommand.o cmTryRunCommand.o cmUnsetCommand.o cmUVHandlePtr.o cmUVProcessChain.o cmVersion.o cmWhileCommand.o cmWorkingDirectory.o cmake.o cmakemain.o cmcmd.o cmDepends.o cmDependsC.o cmDependsCompiler.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmProcessTools.o fs_path.o string_view.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmExprLexer.o cmExprParser.o cmGccDepfileLexer.o cmListFileLexer.o Directory.o EncodingCXX.o FStream.o Glob.o RegularExpression.o Status.o SystemTools.o EncodingC.o ProcessUNIX.o String.o System.o Terminal.o uv-src-strscpy.c.o uv-src-timer.c.o uv-src-uv-common.c.o uv-src-unix-cmake-bootstrap.c.o uv-src-unix-core.c.o uv-src-unix-fs.c.o uv-src-unix-loop.c.o uv-src-unix-loop-watcher.c.o uv-src-unix-no-fsevents.c.o uv-src-unix-pipe.c.o uv-src-unix-poll.c.o uv-src-unix-posix-hrtime.c.o uv-src-unix-posix-poll.c.o uv-src-unix-process.c.o uv-src-unix-signal.c.o uv-src-unix-stream.c.o uv-src-unix-tcp.c.o rhash-librhash-algorithms.c.o rhash-librhash-byte_order.c.o rhash-librhash-hex.c.o rhash-librhash-md5.c.o rhash-librhash-rhash.c.o rhash-librhash-sha1.c.o rhash-librhash-sha256.c.o rhash-librhash-sha3.c.o rhash-librhash-sha512.c.o -ldl -lrt -o cmake
    cmSystemTools.o: In function `void std::__do_alloc_on_move<std::allocator<char> >(std::allocator<char>&, std::allocator<char>&, std::integral_constant<bool, true>)':
    /scratch/maximilian.boether/tmp/cmake-3.23_source-at-xlc/cmake-3.23.1/Source/cmSystemTools.cxx:(.text+0xddfc): undefined reference to `std::allocator<char>::operator=(std::allocator<char> const&)'
    gmake: *** [Makefile:2: cmake] Error 1
    ---------------------------------------------
    Error when bootstrapping CMake:
    Problem while running gmake
    ---------------------------------------------
    Log of errors: /scratch/maximilian.boether/tmp/cmake-3.23_build-at-xlc/Bootstrap.cmk/cmake_bootstrap.log
    ---------------------------------------------
    ***************
    *** ABORTED ***
    ***************
    An error occurred. Exiting...

    ```

    This looks like the C++ standard library is not being linked correctly; however, I don't understand why this happens only when using the _at versions of XLC. 

    Is this issue known? Am I doing something wrong?

    Thank you so much for your help!

    Best,
    Maximilian



    ------------------------------
    Maximilian Böther
    ------------------------------

    #C/C++andFortran



  • 2.  RE: Segfault when building CMake 3.23

    Posted 05/10/22 12:22 PM
    Hi Maximilian

    Sorry for the delay in getting back to you.  The blog about cmake 3.23 you mentioned is for the Open XL compiler which introduced new compiler invocation commands and macros.  The XL compiler (such as XL C/C++ for Linux 16.1.1) is supported by older versions of cmake.  For example, I use cmake 3.17 with XL C/C++ for Linux 16.1.1 on my development machine without problem.

    I am able to successfully build cmake 3.23 using XL C/C++ for Linux 16.1.1 on both RHEL 7 and 8.  Specifically, I tried on 7.6 and 8.4.  RHEL doesn't change library versions in minor RHEL versions, so this should also work on any 7.x and 8.x.

    I can reproduce the errors you reported with AT15.  I can also reproduce them on Ubuntu 20.04 without AT15.  The errors appear to be related to the compiler not working well with the upgraded C++ library that ships with these systems.  This is not surprising since XL C/C++ for Linux 16.1.1 does not support AT15, Ubuntu 20.04 or RHEL 9.




    ------------------------------
    Rafik Zurob
    ------------------------------