Home | News | Documentation | Download

ROOT 6.18 not searching under /usr/local/include for header

Hi I find that ROOT 6.18 isn’t searching /usr/local/include. Even if I add said directory to an the include path. How can I fix this?

root [0] .! file /usr/local/include/xtensor-fftw/basic.hpp
/usr/local/include/xtensor-fftw/basic.hpp: C++ source, ASCII text
root [1] #include <xtensor-fftw/basic.hpp>
ROOT_prompt_1:1:10: fatal error: 'xtensor-fftw/basic.hpp' file not found
#include <xtensor-fftw/basic.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~
root [2] gSystem->AddIncludePath("/usr/local/include")
root [3] #include <xtensor-fftw/basic.hpp>
ROOT_prompt_3:1:10: fatal error: 'xtensor-fftw/basic.hpp' file not found
#include <xtensor-fftw/basic.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18
Platform: Linux x64
Compiler: GCC


gSystem->AddIncludePath("-I/usr/local/include")

@Wile_E_Coyote Thanks! But it didn’t work.

root [0] gSystem->AddIncludePath("-I/usr/local/include")
root [1] #include <xtensor-fftw/basic.hpp>
ROOT_prompt_1:1:10: fatal error: 'xtensor-fftw/basic.hpp' file not found
#include <xtensor-fftw/basic.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~

Try:

gInterpreter->AddIncludePath("/usr/local/include");

@Axel It seems that the ROOT 6 ignores the above statement ("gInterpreter->GetIncludePath()" is not changed).

That’s likely already in the system include paths? What does .I (capital i) show?

Here

root [0] .I
-isysroot
/usr
-I
/etc/root
-I
/etc/root/cling
-I
/usr/include
-cxx-isystem
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0
-cxx-isystem
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/x86_64-pc-linux-gnu
-cxx-isystem
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/backward
-isystem
/usr/usr/local/include
-isystem
/etc/root/cling/lib/clang/5.0.0/include
-extern-c-isystem
/usr/include
-extern-c-isystem
/usr/usr/include
-resource-dir
/etc/root/cling/lib/clang/5.0.0
-nostdinc+

I do see /usr/local/include in it. Could it be a bug in ROOT?

Where do you see /usr/local/include? I only see /usr/usr/local/include, which is very weird…

Ohh yeah… it’s /usr/usr/local/include
What is it? That’s so weird. Any advise?

Well most importantly: did your add this? Do you have a statement somewhere that corresponds to -I of that directory? Eg environment variable (CXXFLAGS) or .rootrc or…?

No, I didn’t added this. This seems to happen after I upgraded from 6.16 to 6.18. I checked rootrc and variables. Nothing there either.

What “ROOT Version” (6.18/??) and system (“Platform:”) version and gcc (“Compiler:”) version exactly?

I’m running 6.18/04, running on Arch Linux x64 (kernel 5.4) and compiled with GCC 9.2

This seems to be a problem in how ROOT has been configured/installed. Can you please let us know how you installed ROOT in your system? Please also post the output of root-config --prefix --bindir --libdir --incdir --etcdir. Thank you.

The outputs are:

$ root-config --prefix --bindir --libdir --incdir --etcdir
/usr /usr/bin /usr/lib/root /usr/include /etc/root

Did you build ROOT yourself? How did you configure it - can you post the two files recmake_*.sh from the build directory?

No, I’m using the ROOT package provided by Arch Linux and maintained by Konstantin Gizdov. I’ll build by own an see if that’s the problem.

Hi,

Any news? When you start up Arch’s root, without anything from your side, does .I already show /usr/usr/local/include?

Axel.

I was trying to build root myself. But it segfaults in the building process. And I can’t find the cause nor work around it.

Yes, /usr/usr/local/include is in the include path by default for some reason.

Maybe you need: make -j1

Thank you, but it still segfaults

[ 47%] Generating G__Core.cxx, ../lib/Core.pcm
#0 0x00005570dc16d26f PrintStackTraceSignalHandler(void*) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x28ee26f)
#1 0x00005570dc16af6e llvm::sys::RunSignalHandlers() (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x28ebf6e)
#2 0x00005570dc16b0c6 SignalHandler(int) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x28ec0c6)
#3 0x00007fdfffc1c930 __restore_rt (/usr/lib/libpthread.so.0+0x14930)
#4 0x00005570da160442 clang::DiagnosticRenderer::emitDiagnostic(clang::FullSourceLoc, clang::DiagnosticsEngine::Level, llvm::StringRef, llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>, llvm::PointerUnion<clang::Diagnostic const*, clang::StoredDiagnostic const*>) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x8e1442)
#5 0x00005570da132d57 clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level, clang::Diagnostic const&) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x8b3d57)
#6 0x00005570dbe7cc3e clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x25fdc3e)
#7 0x00005570dbe7512b clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x25f612b)
#8 0x00005570dbdf1eac clang::DiagnosticBuilder::Emit() (.part.0) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x2572eac)
#9 0x00005570dbe0d50f clang::ModuleMapParser::parseModuleDecl() (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x258e50f)
#10 0x00005570dbe0e590 clang::ModuleMapParser::parseModuleMapFile() (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x258f590)
#11 0x00005570dbe0e97c clang::ModuleMap::parseModuleMapFile(clang::FileEntry const*, bool, clang::DirectoryEntry const*, clang::FileID, unsigned int*, clang::SourceLocation) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x258f97c)
#12 0x00005570dbdd29d1 clang::HeaderSearch::loadModuleMapFileImpl(clang::FileEntry const*, bool, clang::DirectoryEntry const*, clang::FileID, unsigned int*) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x25539d1)
#13 0x00005570dbdd38c5 clang::HeaderSearch::loadModuleMapFile(clang::FileEntry const*, bool, clang::FileID, unsigned int*, llvm::StringRef) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x25548c5)
#14 0x00005570d9c6f4eb (anonymous namespace)::createCIImpl(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, cling::CompilerOptions const&, char const*, std::unique_ptr<clang::ASTConsumer, std::default_delete<clang::ASTConsumer> >, std::vector<std::shared_ptr<clang::ModuleFileExtension>, std::allocator<std::shared_ptr<clang::ModuleFileExtension> > > const&, bool, bool) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x3f04eb)
#15 0x00005570d9c70e8c cling::CIFactory::createCI(llvm::StringRef, cling::InvocationOptions const&, char const*, std::unique_ptr<clang::ASTConsumer, std::default_delete<clang::ASTConsumer> >, std::vector<std::shared_ptr<clang::ModuleFileExtension>, std::allocator<std::shared_ptr<clang::ModuleFileExtension> > > const&) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x3f1e8c)
#16 0x00005570d9d16abd cling::IncrementalParser::IncrementalParser(cling::Interpreter*, char const*, std::vector<std::shared_ptr<clang::ModuleFileExtension>, std::allocator<std::shared_ptr<clang::ModuleFileExtension> > > const&) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x497abd)
#17 0x00005570d9c79831 cling::Interpreter::Interpreter(int, char const* const*, char const*, std::vector<std::shared_ptr<clang::ModuleFileExtension>, std::allocator<std::shared_ptr<clang::ModuleFileExtension> > > const&, bool, cling::Interpreter const*) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x3fa831)
#18 0x00005570d9c02b06 RootClingMain(int, char**, bool) (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x383b06)
#19 0x00005570d9c0b7cd ROOT_rootcling_Driver (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x38c7cd)
#20 0x00005570d9b506e2 main (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x2d16e2)
#21 0x00007fdfff688153 __libc_start_main (/usr/lib/libc.so.6+0x27153)
#22 0x00005570d9b902be _start (/home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1+0x3112be)
Stack dump:
0.Program arguments: /home/marty/Documents/github-projects/root/builddir/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -cxxmodule -s /home/marty/Documents/github-projects/root/builddir/lib/libCore.so -excludePath /home/marty/Documents/github-projects/root -excludePath /home/marty/Documents/github-projects/root/builddir -I/home/marty/Documents/github-projects/root -I/home/marty/Documents/github-projects/root/builddir/etc/cling/ -I/home/marty/Documents/github-projects/root/builddir/include -I/usr/include -I/home/marty/Documents/github-projects/root/core/base/inc -I/home/marty/Documents/github-projects/root/core/clib/inc -I/home/marty/Documents/github-projects/root/core/cont/inc -I/home/marty/Documents/github-projects/root/core/foundation/inc -I/home/marty/Documents/github-projects/root/core/macosx/inc -I/home/marty/Documents/github-projects/root/core/unix/inc -I/home/marty/Documents/github-projects/root/core/winnt/inc -I/home/marty/Documents/github-projects/root/core/clingutils/inc -I/home/marty/Documents/github-projects/root/core/meta/inc -I/home/marty/Documents/github-projects/root/core/gui/inc -I/home/marty/Documents/github-projects/root/core/textinput/inc -I/home/marty/Documents/github-projects/root/core -I/usr/include -I/home/marty/Documents/github-projects/root/core/base/inc -I/home/marty/Documents/github-projects/root/core/clib/inc -I/home/marty/Documents/github-projects/root/core/cont/inc -I/home/marty/Documents/github-projects/root/core/foundation/inc -I/home/marty/Documents/github-projects/root/core/macosx/inc -I/home/marty/Documents/github-projects/root/core/unix/inc -I/home/marty/Documents/github-projects/root/core/winnt/inc -I/home/marty/Documents/github-projects/root/core/clingutils/inc -I/home/marty/Documents/github-projects/root/core/meta/inc -I/home/marty/Documents/github-projects/root/core/gui/inc -I/home/marty/Documents/github-projects/root/core/textinput/inc -I/home/marty/Documents/github-projects/root/builddir/include -I/home/marty/Documents/github-projects/root -I/usr/include -I/usr/include -I/usr/include -I/usr/include -writeEmptyRootPCM ROOT/StringConv.hxx ROOT/TExecutor.hxx ROOT/TSequentialExecutor.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 TError.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 strlcpy.h snprintf.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 ROOT/RIntegerSequence.hxx ROOT/RMakeUnique.hxx ROOT/RNotFn.hxx ROOT/RSpan.hxx ROOT/RStringView.hxx ROOT/span.hxx ROOT/TypeTraits.hxx TUnixSystem.h root_std_complex.h TClingRuntime.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 Getline.h /home/marty/Documents/github-projects/root/core/base/inc/LinkDef.h 
Segmentation fault
make[2]: *** [core/CMakeFiles/G__Core.dir/build.make:452: core/G__Core.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:17343: core/CMakeFiles/G__Core.dir/all] Error 2
make: *** [Makefile:152: all] Error 2