This is a continuation of this thread.
[1/921] Generating G__MathCore.cxx, ../../lib/libMathCore_rdict.pcm, ../../lib/libMathCore.rootmap
FAILED: math/mathcore/G__MathCore.cxx lib/libMathCore_rdict.pcm lib/libMathCore.rootmap
cd /home/tuanhtrng/build/root-6.18/math/mathcore && /usr/local/bin/cmake -E env LD_LIBRARY_PATH=/home/tuanhtrng/build/root-6.18/lib: ROOTIGNOREPREFIX=1 /home/tuanhtrng/build/root-6.18/bin/rootcling -rootbuild -v2 -f G__MathCore.cxx -s /home/tuanhtrng/build/root-6.18/lib/libMathCore.so -m libCore_rdict.pcm -excludePath /home/tuanhtrng/src/root -excludePath /home/tuanhtrng/build/root-6.18 -rml libMathCore.so -rmf /home/tuanhtrng/build/root-6.18/lib/libMathCore.rootmap -I/home/tuanhtrng/src/root -I/home/tuanhtrng/build/root-6.18/etc/cling/ -I/home/tuanhtrng/build/root-6.18/include -I/home/tuanhtrng/src/root/math/mathcore/v7/inc -I/home/tuanhtrng/src/root/math/mathcore/inc -I/home/tuanhtrng/src/root/math/mathcore -I/usr/include -I/home/tuanhtrng/src/root/core/base/inc -I/home/tuanhtrng/src/root/core/clib/inc -I/home/tuanhtrng/src/root/core/cont/inc -I/home/tuanhtrng/src/root/core/foundation/inc -I/home/tuanhtrng/src/root/core/macosx/inc -I/home/tuanhtrng/src/root/core/unix/inc -I/home/tuanhtrng/src/root/core/winnt/inc -I/home/tuanhtrng/src/root/core/clingutils/inc -I/home/tuanhtrng/src/root/core/meta/inc -I/home/tuanhtrng/src/root/core/textinput/inc -writeEmptyRootPCM Fit/BasicFCN.h Fit/BinData.h Fit/Chi2FCN.h Fit/DataOptions.h Fit/DataRange.h Fit/FcnAdapter.h Fit/FitConfig.h Fit/FitData.h Fit/FitExecutionPolicy.h Fit/FitResult.h Fit/FitUtil.h Fit/Fitter.h Fit/LogLikelihoodFCN.h Fit/ParameterSettings.h Fit/PoissonLikelihoodFCN.h Fit/SparseData.h Fit/UnBinData.h Math/AdaptiveIntegratorMultiDim.h Math/AllIntegrationTypes.h Math/BasicMinimizer.h Math/BrentMethods.h Math/BrentMinimizer1D.h Math/BrentRootFinder.h Math/ChebyshevPol.h Math/Delaunay2D.h Math/DistFuncMathCore.h Math/DistSampler.h Math/DistSamplerOptions.h Math/Error.h Math/Factory.h Math/FitMethodFunction.h Math/Functor.h Math/GaussIntegrator.h Math/GaussLegendreIntegrator.h Math/GenAlgoOptions.h Math/GoFTest.h Math/IFunction.h Math/IFunctionfwd.h Math/IMinimizer1D.h Math/IOptions.h Math/IParamFunction.h Math/IParamFunctionfwd.h Math/IRootFinderMethod.h Math/Integrator.h Math/IntegratorMultiDim.h Math/IntegratorOptions.h Math/KDTree.h Math/LCGEngine.h Math/Math.h Math/MersenneTwisterEngine.h Math/MinimTransformFunction.h Math/MinimTransformVariable.h Math/Minimizer.h Math/MinimizerOptions.h Math/MinimizerVariableTransformation.h Math/MixMaxEngine.h Math/MultiDimParamFunctionAdapter.h Math/OneDimFunctionAdapter.h Math/ParamFunctor.h Math/PdfFunc.h Math/PdfFuncMathCore.h Math/ProbFunc.h Math/ProbFuncMathCore.h Math/QuantFunc.h Math/QuantFuncMathCore.h Math/Random.h Math/RandomFunctions.h Math/RichardsonDerivator.h Math/RootFinder.h Math/SpecFuncMathCore.h Math/StdEngine.h Math/TDataPoint.h Math/TDataPointN.h Math/TRandomEngine.h Math/Types.h Math/Util.h Math/VirtualIntegrator.h Math/WrappedFunction.h Math/WrappedParamFunction.h TComplex.h TKDTree.h TKDTreeBinning.h TMath.h TRandom.h TRandom1.h TRandom2.h TRandom3.h TRandomGen.h TStatistic.h VectorizedTMath.h /home/tuanhtrng/src/root/math/mathcore/inc/LinkDef.h
Error in <UnknownClass::FindDynamicLibrary>: /home/tuanhtrng/build/root-6.18/math/mathcore/libRIO[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /home/tuanhtrng/build/root-6.18/lib:.:/home/tuanhtrng/build/root-6.18/lib
Error in <UnknownClass::FindDynamicLibrary>: /home/tuanhtrng/build/root-6.18/math/mathcore/libCling[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /home/tuanhtrng/build/root-6.18/lib:.:/home/tuanhtrng/build/root-6.18/lib
error: unable to read PCH file /home/tuanhtrng/build/root-6.18/etc/allDict.cxx.pch: 'No such file or directory'
fatal error: PCH file '/home/tuanhtrng/build/root-6.18/etc/allDict.cxx.pch' not found: module file not found
Those dynamic libraries are available.
/home/tuanhtrng/build/root-6.18/lib/libCling.so
/home/tuanhtrng/build/root-6.18/lib/libRIO.so
Does FindDynamicLibrary fail to find the files?
Also, the missing PCH is puzzling. The top-level CMakeLists.txt indicates etc/allDict.cxx.pch depends on headers, linkdefs, and cppflags which cmake is trying to build.
What do you guys think?