Closed dennisklein closed 2 years ago
@dennisklein, thanks for the report. Can you apply this patch and check if it still does not work for you?
diff --git a/interpreter/cling/include/cling/std.modulemap b/interpreter/cling/include/cling/std.modulemap
index 5498b949c5..c82959a440 100644
--- a/interpreter/cling/include/cling/std.modulemap
+++ b/interpreter/cling/include/cling/std.modulemap
@@ -428,4 +428,8 @@ module "std" [system] {
export *
header "bits/stl_tree.h"
}
+ module "bits/utility.h" {
+ export *
+ header "bits/utility.h"
+ }
}
The error message changed, but there is more needed, it seems:
❯ cat reproducer.def
Bootstrap: docker
From: fedora:36
%post
dnf -y update
dnf -y install git make cmake gcc-c++ gcc binutils ninja-build patch \
libX11-devel libXpm-devel libXft-devel libXext-devel python openssl-devel
dnf -y clean all
mkdir /reproducer && cd /reproducer
git clone -b master --depth 1 http://github.com/root-project/root source
git -C source log
patch -d source -p1 <<EoF
diff --git a/interpreter/cling/include/cling/std.modulemap b/interpreter/cling/include/cling/std.modulemap
index 5498b949c5..c82959a440 100644
--- a/interpreter/cling/include/cling/std.modulemap
+++ b/interpreter/cling/include/cling/std.modulemap
@@ -428,4 +428,8 @@ module "std" [system] {
export *
header "bits/stl_tree.h"
}
+ module "bits/utility.h" {
+ export *
+ header "bits/utility.h"
+ }
}
EoF
cmake -GNinja -S source -B build -Dxrootd=OFF
cmake --build build
-->
FAILED: core/G__Core.cxx lib/Core.pcm /reproducer/build/core/G__Core.cxx /reproducer/build/lib/Core.pcm
cd /reproducer/build/core && /usr/bin/cmake -E env LD_LIBRARY_PATH=/reproducer/build/lib:/.singularity.d/libs /reproducer/build/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -cxxmodule -s /reproducer/build/lib/libCore.so -excludePath /reproducer/source -excludePath /reproducer/build/ginclude -excludePath /reproducer/build/externals -excludePath /reproducer/build/builtins -writeEmptyRootPCM -m _Builtin_intrinsics -mByproduct _Builtin_intrinsics -mByproduct ROOT_Foundation_Stage1_NoRTTI -mByproduct ROOT_Foundation_C -mByproduct ROOT_Rtypes -D__STDC_NO_COMPLEX__ -D__COMPLEX_H__ -D_COMPLEX_H -D__CLANG_STDATOMIC_H -compilerI/usr/include/c++/12 -compilerI/usr/include/c++/12/x86_64-redhat-linux -compilerI/usr/include/c++/12/backward -compilerI/usr/lib/gcc/x86_64-redhat-linux/12/include -compilerI/usr/local/include -compilerI/usr/include -compilerI/usr/lib/gcc/x86_64-redhat-linux/12/include -compilerI/usr/local/include -compilerI/usr/include -I/reproducer/build/include -I/reproducer/build/ginclude -I/reproducer/source/core/base/inc -I/reproducer/source/core/foundation/inc -I/reproducer/source/core/cont/inc -I/reproducer/source/core/gui/inc -I/reproducer/source/core/meta/inc -I/reproducer/source/core/clib/inc -I/reproducer/source/core/rint/inc -I/reproducer/source/core/zip/inc -I/reproducer/source/core/thread/inc -I/reproducer/source/core/textinput/inc -I/reproducer/source/core/clingutils/inc -I/reproducer/source/core/base/v7/inc -I/reproducer/source/core/foundation/v7/inc -I/reproducer/source/core/unix/inc -I/usr/include -I/reproducer/source/builtins/xxhash -I/reproducer/source/builtins/lz4 -I/reproducer/source/builtins/zstd ROOT/TErrorDefaultHandler.hxx ROOT/TSequentialExecutor.hxx ROOT/StringConv.hxx Buttons.h Bytes.h Byteswap.h KeySymbols.h MessageTypes.h Riostream.h Rtypes.h TApplication.h TAtt3D.h TAttAxis.h TAttBBox2D.h TAttBBox.h TAttFill.h TAttLine.h TAttMarker.h TAttPad.h TAttText.h TBase64.h TBenchmark.h TBuffer3D.h TBuffer3DTypes.h TBuffer.h TColor.h TColorGradient.h TDatime.h TDirectory.h TEnv.h TException.h TExec.h TFileCollection.h TFileInfo.h TFolder.h TInetAddress.h TMacro.h TMathBase.h TMD5.h TMemberInspector.h TMessageHandler.h TNamed.h TNotifyLink.h TObject.h TObjString.h TParameter.h TPluginManager.h TPoint.h TPRegexp.h TProcessID.h TProcessUUID.h TQClass.h TQCommand.h TQConnection.h TQObject.h TRedirectOutputGuard.h TRefCnt.h TRef.h TRegexp.h TRemoteObject.h TROOT.h TRootIOCtor.h TStopwatch.h TStorage.h TString.h TStringLong.h TStyle.h TSysEvtHandler.h TSystemDirectory.h TSystemFile.h TSystem.h TTask.h TThreadSlots.h TTime.h TTimer.h TTimeStamp.h TUri.h TUrl.h TUUID.h TVersionCheck.h TVirtualAuth.h TVirtualFFT.h TVirtualGL.h TVirtualMonitoring.h TVirtualMutex.h TVirtualPadEditor.h TVirtualPad.h TVirtualPadPainter.h TVirtualPerfStats.h TVirtualPS.h TVirtualQConnection.h TVirtualRWMutex.h TVirtualTableInterface.h TVirtualViewer3D.h TVirtualX.h ROOT/RDirectoryEntry.hxx ROOT/RIndexIter.hxx strlcpy.h snprintf.h strtok.h ROOT/TSeq.hxx TArrayC.h TArrayD.h TArrayF.h TArray.h TArrayI.h TArrayL64.h TArrayL.h TArrayS.h TBits.h TBtree.h TClassTable.h TClonesArray.h TCollection.h TCollectionProxyInfo.h TExMap.h THashList.h THashTable.h TIterator.h TList.h TMap.h TObjArray.h TObjectTable.h TOrdCollection.h TRefArray.h TRefTable.h TSeqCollection.h TSortedList.h TVirtualCollectionProxy.h ESTLType.h RStringView.h TClassEdit.h TError.h ROOT/RLogger.hxx ROOT/RNotFn.hxx ROOT/RRangeCast.hxx ROOT/RSpan.hxx ROOT/RStringView.hxx ROOT/StringUtils.hxx ROOT/span.hxx ROOT/TypeTraits.hxx TUnixSystem.h root_std_complex.h GuiTypes.h TApplicationImp.h TBrowser.h TBrowserImp.h TCanvasImp.h TClassMenuItem.h TContextMenu.h TContextMenuImp.h TControlBarImp.h TGuiFactory.h TInspectorImp.h TObjectSpy.h TToggleGroup.h TToggle.h TBaseClass.h TClassGenerator.h TClass.h TClassRef.h TClassStreamer.h TDataMember.h TDataType.h TDictAttributeMap.h TDictionary.h TEnumConstant.h TEnum.h TFileMergeInfo.h TFunction.h TFunctionTemplate.h TGenericClassInfo.h TGlobal.h TInterpreter.h TInterpreterValue.h TIsAProxy.h TListOfDataMembers.h TListOfEnums.h TListOfEnumsWithLock.h TListOfFunctions.h TListOfFunctionTemplates.h TMemberStreamer.h TMethodArg.h TMethodCall.h TMethod.h TProtoClass.h TRealData.h TSchemaHelper.h TSchemaRule.h TSchemaRuleSet.h TStatusBitsChecker.h TStreamerElement.h TStreamer.h TVirtualIsAProxy.h TVirtualRefProxy.h TVirtualStreamerInfo.h TVirtualArray.h TVirtualObject.h Getline.h /reproducer/source/core/base/inc/LinkDef.h
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:2:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/array:43:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:781:29: error: redefinition of 'tuple_size_v<pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.array'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:9:10: note: std.array defined here
module "array" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:2:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/array:43:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:784:29: error: redefinition of 'tuple_size_v<const pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.array'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:9:10: note: std.array defined here
module "array" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:2:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/array:43:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:790:27: error: redefinition of '__is_pair<pair<_Tp, _Up> >'
inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.array'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:9:10: note: std.array defined here
module "array" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:2:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/array:43:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:793:27: error: redefinition of '__is_pair<const pair<_Tp, _Up> >'
inline constexpr bool __is_pair<const pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.array'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:9:10: note: std.array defined here
module "array" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:4:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bitset:47:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string:50:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:781:29: error: redefinition of 'tuple_size_v<pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.string'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:306:10: note: std.string defined here
module "string" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:4:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bitset:47:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string:50:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:784:29: error: redefinition of 'tuple_size_v<const pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.string'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:306:10: note: std.string defined here
module "string" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:4:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bitset:47:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string:50:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:790:27: error: redefinition of '__is_pair<pair<_Tp, _Up> >'
inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.string'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:306:10: note: std.string defined here
module "string" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:4:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bitset:47:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string:50:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:793:27: error: redefinition of '__is_pair<const pair<_Tp, _Up> >'
inline constexpr bool __is_pair<const pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.string'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:306:10: note: std.string defined here
module "string" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ccomplex:39:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/complex:44:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/cmath:1935:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/specfun.h:45:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:781:29: error: redefinition of 'tuple_size_v<pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.cmath'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:62:10: note: std.cmath defined here
module "cmath" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ccomplex:39:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/complex:44:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/cmath:1935:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/specfun.h:45:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:784:29: error: redefinition of 'tuple_size_v<const pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.cmath'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:62:10: note: std.cmath defined here
module "cmath" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ccomplex:39:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/complex:44:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/cmath:1935:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/specfun.h:45:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:790:27: error: redefinition of '__is_pair<pair<_Tp, _Up> >'
inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.cmath'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:62:10: note: std.cmath defined here
module "cmath" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ccomplex:39:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/complex:44:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/cmath:1935:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/specfun.h:45:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:793:27: error: redefinition of '__is_pair<const pair<_Tp, _Up> >'
inline constexpr bool __is_pair<const pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.cmath'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:62:10: note: std.cmath defined here
module "cmath" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:18:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/condition_variable:42:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr.h:53:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr_base.h:59:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:36:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:781:29: error: redefinition of 'tuple_size_v<pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.tuple'
#include <bits/stl_pair.h> // for std::pair
^
/reproducer/build/etc/cling/std.modulemap:332:10: note: std.tuple defined here
module "tuple" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:18:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/condition_variable:42:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr.h:53:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr_base.h:59:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:36:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:784:29: error: redefinition of 'tuple_size_v<const pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.tuple'
#include <bits/stl_pair.h> // for std::pair
^
/reproducer/build/etc/cling/std.modulemap:332:10: note: std.tuple defined here
module "tuple" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:18:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/condition_variable:42:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr.h:53:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr_base.h:59:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:36:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:790:27: error: redefinition of '__is_pair<pair<_Tp, _Up> >'
inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.tuple'
#include <bits/stl_pair.h> // for std::pair
^
/reproducer/build/etc/cling/std.modulemap:332:10: note: std.tuple defined here
module "tuple" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:18:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/condition_variable:42:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr.h:53:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/shared_ptr_base.h:59:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unique_ptr.h:36:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:793:27: error: redefinition of '__is_pair<const pair<_Tp, _Up> >'
inline constexpr bool __is_pair<const pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/tuple:38:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.tuple'
#include <bits/stl_pair.h> // for std::pair
^
/reproducer/build/etc/cling/std.modulemap:332:10: note: std.tuple defined here
module "tuple" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:33:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/deque:60:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:781:29: error: redefinition of 'tuple_size_v<pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.deque'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:149:10: note: std.deque defined here
module "deque" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:33:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/deque:60:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:784:29: error: redefinition of 'tuple_size_v<const pair<_Tp1, _Tp2> >'
inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.deque'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:149:10: note: std.deque defined here
module "deque" {
^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:33:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/deque:60:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h:790:27: error: redefinition of '__is_pair<pair<_Tp, _Up> >'
inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.algorithm'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:5:10: note: std.algorithm defined here
module "algorithm" {
^
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:64:10: note: '/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_pair.h' included multiple times, additional include site in header from module 'std.deque'
#include <bits/stl_pair.h>
^
/reproducer/build/etc/cling/std.modulemap:149:10: note: std.deque defined here
module "deque" {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
input_line_1:1:10: fatal error: could not build module 'std'
#include <new>
~~~~~~~~^
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /reproducer/build/etc/cling/Interpreter/RuntimeUniverse.h:27:
In file included from <module-includes>:1:
/reproducer/build/etc/cling/Interpreter/DynamicExprInfo.h:13:10: fatal error: could not build module 'std'
#include <string>
~~~~~~~~^
/reproducer/build/etc/cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra'
#include "cling/Interpreter/Visibility.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from input_line_3:1:
In file included from /reproducer/build/etc/cling/lib/clang/9.0.1/include/assert.h:8:
In file included from /usr/include/assert.h:35:
In file included from /usr/include/features.h:514:
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
# include <gnu/stubs-32.h>
^~~~~~~~~~~~~~~~
While building module 'Core':
While building module 'ROOT_Rtypes' imported from /reproducer/build/include/Rtypes.h:23:
In file included from <module-includes>:1:
/reproducer/build/include/RtypesCore.h:28:10: fatal error: could not build module 'std'
#include <cstddef> // size_t, NULL
~~~~~~~~^
/reproducer/build/include/ThreadLocalStorage.h:60:10: fatal error: could not build module 'ROOT_Rtypes'
#include "RtypesCore.h"
~~~~~~~~^~~~~~~~~~~~~~
While building module 'Core':
While building module 'ROOT_Foundation_Stage1_NoRTTI' imported from /reproducer/build/include/Rtypes.h:195:
In file included from <module-includes>:2:
In file included from /reproducer/build/include/ROOT/RStringView.hxx:25:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string_view:40:10: fatal error: could not build module 'std'
#include <iosfwd>
~~~~~~~~^
Error: Error loading the default rootcling header files.
[7048/9103] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TCling.cxx.o
ninja: build stopped: subcommand failed.
FATAL: While performing build: while running engine: exit status 1
@dennisklein, can you do the same but this time for bits/stl_algobase.h
?
sure, it's running. but some questions:
std.modulemap
be generated from the state of the STL include tree?
std.modulemap
, too?The following patch makes the reproducer above compile. However, one would have to test this now with all ROOT features enabled to be sure it is enough (for ROOT)...
--- a/interpreter/cling/include/cling/std.modulemap
+++ b/interpreter/cling/include/cling/std.modulemap
@@ -428,4 +428,16 @@ module "std" [system] {
export *
header "bits/stl_tree.h"
}
+ module "bits/utility.h" {
+ export *
+ header "bits/utility.h"
+ }
+ module "bits/stl_algobase.h" {
+ export *
+ header "bits/stl_algobase.h"
+ }
+ module "bits/stl_pair.h" {
+ export *
+ header "bits/stl_pair.h"
+ }
}
sure, it's running. but some questions:
* Shouldn't this `std.modulemap` be generated from the state of the STL include tree?
It should but there are headers which are not modules friendly and (at least in the old days) required quite a bit of manual work.
* Let's say, even if ROOT will compile then with this approach, how does it help an experiment library that uses something from the STL that ROOT does not (by chance), isn't that file then missing from the `std.modulemap`, too?
Not really, the module std.pcm
contains all of STL, however, some header files (which are implementation details such as the ones in bits
) are re-exported from the submodules, that is, the submodule keeps a textual duplicate of the internal header. This in principle should only affect performance, however clang-9 has bugs when merging two definitions coming from the same textual header but re-exported by a different submodule.
* Also, isn't this compiler version dependent?
STL is vendor dependent to the extent of the internal implemenation. The std.modulemap is the modulemap that ships with the gnu libstdc++. libc++ (used in osx) comes with its own modulemap which we happily find and use. The std.modulemap works (with minor tweaks from time to time) with libstdc++ from 5.1 to 11 (now you just enabled it for 12). In practice, it libstdc++ rarely removes headers and that's what we are exploiting ;)
Hi @vgvassilev, @Axel-Naumann,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely, :robot:
@vgvassilev does this need to be backported to 6.26 and/or 6.24?
I think, this affects 6.26 at least (that's how we found it). So unless I am wrong (always a possibility), I would appreciate a backport to that version at least.
I can confirm this affects the 6.26.02
Building with
-Druntime_cxxmodules=OFF
succeeds.Note: Details for the GCC 12.0.1 used above.
full_log.txt