Bus error with rootcling


While I’m compiling on unsupported system, I got bus error
Is there anyone having any idea on this?

/bin/sh: line 1:  2394 Bus error               ../../bin/rootcling -rootbuild -f G__TMVAGui.cxx -s /home/genie/build2/lib/libTMVAGui.so -rml libTMVAGui.so -rmf /home/genie/build2/lib/libTMVAGui.rootmap -writeEmptyRootPCM -I/home/genie/root-6.06.02 -I/home/genie/build2/include TMVA/annconvergencetest.h TMVA/deviations.h TMVA/mvaeffs.h TMVA/PlotFoams.h TMVA/TMVAGui.h TMVA/BDTControlPlots.h TMVA/correlationscatters.h TMVA/efficiencies.h TMVA/mvas.h TMVA/probas.h TMVA/BDT.h TMVA/correlationscattersMultiClass.h TMVA/likelihoodrefs.h TMVA/mvasMulticlass.h TMVA/regression_averagedevs.h TMVA/TMVAMultiClassGui.h TMVA/BDT_Reg.h TMVA/correlations.h TMVA/mvaweights.h TMVA/rulevisCorr.h TMVA/TMVARegGui.h TMVA/BoostControlPlots.h TMVA/correlationsMultiClass.h TMVA/network.h TMVA/rulevis.h TMVA/variables.h TMVA/CorrGui.h TMVA/paracoor.h TMVA/rulevisHists.h TMVA/variablesMultiClass.h TMVA/compareanapp.h TMVA/CorrGuiMultiClass.h TMVA/MovieMaker.h TMVA/tmvaglob.h /home/genie/root-6.06.02/tmva/tmvagui/inc/LinkDef.h
make[2]: *** [tmva/tmvagui/G__TMVAGui.cxx] Error 138
make[1]: *** [tmva/tmvagui/CMakeFiles/G__TMVAGui.dir/all] Error 2

System info for your information. ( Compiling on unsupported system )

cpu      : FUJITSU SPARC64 XIfx
manufacture   : 4 (Fujitsu)
impl      : 12
mask      : 17
serial      : 0
fpu      : FUJITSU SPARC64 XIfx
pmu      : SPARC64XIfx
prom      : CPUFW-1.5.0
type      : s64fx
ncpus probed   : 34
ncpus active   : 34
L2$ size   : 12288 KB

uname -m = s64fx
uname -r = 2.6.32
uname -s = Linux
uname -v = #2 SMP Wed Dec 2 15:57:26 JST 2015

I’m suspecting that this happens because of the lines

-- Constructing LLVMBuild project information
-- Targeting X86

It seems configuration tool couldn’t recognize the system…
After I added a line to interpreter/llvm/src/CMakeLists.txt file to force the architecture to Sparc

228 include(AddLLVMDefinitions)
230 option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)

It gives me the right target output

-- Target triple: sparc64-unknown-linux-gnu
[color=#FF0000]-- Native target architecture is Sparc[/color]
-- Threads disabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- OCaml bindings disabled.
-- Building with -fPIC
-- Constructing LLVMBuild project information
[color=#FF0000]-- Targeting Sparc[/color]

However, it still stops at the same point with bus error.
Plus, it gives warning

Thank you in advance for any idea!


Indeed, Spark64 is not supported. We’ll be happy to add support if

  • llvm + clang support Spark, including the MCJIT backend;
  • you can provide the relevant patches for ROOT;
  • we get access to a machine to run our test suite, to make sure it stays supported.

It’s not one of the main platforms used at CERN and I’m not aware of an experiment’s need to change that - which is why we’ll have to rely on your help here!

Cheers, Axel.


Thank you for the reply.
I’m sorry for the delayed reply.

What can I do for checking those you mentioned?
Because I’m just a user of that system, I cannot give you any access permission to the system. Sorry.

But everything you can be done via myself.



As I said - first, you need to figure out whether the JIT is supported on SPARK64.

Build clang from clang.llvm.org (i.e. independent from ROOT), then create a file jittest.cxx:

#include <vector>
extern "C" in printf(const char*,...);
std::vector<int> v{12,13,14};
int main(int, char*[]) {
  printf("vector size: %d\n", (int)v.size());
  return 0;

Then run

clang++ -x c++ -std=c++11 -Xclang -emit-llvm - -o jittest.cxx | lli -jit-kind=orc-mcjit -

If that succeeds we can progress to step 2.

Cheers, Axel.


Thanks for the detailed material.
But, I tackled at the first step :frowning:

#0 0x00000000035d929c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/genie/clangTest/llvm/lib/Support/Unix/Signals.inc:322:0
#1 0x00000000035d96a8 PrintStackTraceSignalHandler(void*) /home/genie/clangTest/llvm/lib/Support/Unix/Signals.inc:379:0
#2 0x00000000035d758c llvm::sys::RunSignalHandlers() /home/genie/clangTest/llvm/lib/Support/Signals.cpp:45:0
#3 0x00000000035d8b6c SignalHandler(int) /home/genie/clangTest/llvm/lib/Support/Unix/Signals.inc:200:0
#4 0xffffffff003c1d88 __libc_sigaction (/lib64/libpthread.so.0+0x11d88)
#5 0x000000000554e1b0 clang::Sema::Sema(clang::Preprocessor&, clang::ASTContext&, clang::ASTConsumer&, clang::TranslationUnitKind, clang::CodeCompleteConsumer*) /home/genie/clangTest/llvm/tools/clang/lib/Sema/Sema.cpp:126:0
#6 0x0000000003ed5710 clang::CompilerInstance::createSema(clang::TranslationUnitKind, clang::CodeCompleteConsumer*) /home/genie/clangTest/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:537:0
#7 0x0000000003f36364 clang::ASTFrontendAction::ExecuteAction() /home/genie/clangTest/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:554:0
#8 0x00000000044637a4 clang::CodeGenAction::ExecuteAction() /home/genie/clangTest/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:844:0
#9 0x0000000003f35c18 clang::FrontendAction::Execute() /home/genie/clangTest/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:457:0
#10 0x0000000003ed8268 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/genie/clangTest/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:874:0
#11 0x0000000004095ee0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/genie/clangTest/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:241:0
#12 0x00000000013b9660 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/genie/clangTest/llvm/tools/clang/tools/driver/cc1_main.cpp:116:0
#13 0x00000000013ac8b4 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/genie/clangTest/llvm/tools/clang/tools/driver/driver.cpp:301:0
#14 0x00000000013ad574 main /home/genie/clangTest/llvm/tools/clang/tools/driver/driver.cpp:381:0
#15 0xffffffff00b7d9d8 __libc_start_main (/lib64/libc.so.6+0x2d9d8)
#16 0x00000000013a9a74 _start (/gwfefs/home/genie/clangTest/install/bin/clang-3.9+0x13a9a74)
Stack dump:
0.	Program arguments: /gwfefs/home/genie/clangTest/install/bin/clang-3.9 -cc1 -triple sparc64-unknown-linux-gnu -S -disable-free -main-file-name - -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases -dwarf-column-info -debugger-tuning=gdb -resource-dir /gwfefs/home/genie/clangTest/install/bin/../lib/clang/3.9.0 -I/data/Q16264/common/gw/local/include -c-isystem /data/Q16264/common/gw/local/include -cxx-isystem /data/Q16264/common/gw/local/include -internal-isystem /usr/local/include -internal-isystem /gwfefs/home/genie/clangTest/install/bin/../lib/clang/3.9.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /home/genie/clangTest -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -emit-llvm -o /tmp/--edd9e6.s -x c++ - 
clang-3.9: error: unable to execute command: Bus error
clang-3.9: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.9.0 (trunk 268212)
Target: sparc64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/genie/clangTest/install/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.9: note: diagnostic msg: Error generating preprocessed source(s) - ignoring input from stdin.
clang-3.9: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
'main' function not found in module.

Is this the end?



Probably, though the failure in Sema is weird - looks like already the clang invocation fails, right? You could ask at the cfe-dev mailing list lists.llvm.org/mailman/listinfo/cfe-dev - they will know for sure!

Cheers, Axel.

Thanks for the advice.

I send out the information and log over the mailing list.
Let’s see what we get :smiley:


I try to run the macro [copytree.C](https://root.cern.ch/doc/v608/copytree_8C.html) in ROOT 6.11/01

andre@andre-QBEX-H61H2-M17:~/Dropbox/Doutorado/FPMC$ root -l copytree.C
root [0] 
Processing copytree.C...
input_line_9:1:10: fatal error: '/opt/root6/test/libEvent.so' file not found
#include "/opt/root6/test/libEvent.so"
root [1]

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

First, In the folder $ROOTSYS/test/
to created : libEvent.so

$ make

root@andre-QBEX-H61H2-M17:/opt/root6/test# make
Generating dictionary EventDict.cxx...
rootcling -f EventDict.cxx -c Event.h EventLinkDef.h
make: rootcling: Command not found
Makefile:764: recipe for target 'EventDict.cxx' failed
make: *** [EventDict.cxx] Error 127

Someone have some ideia to fix this?

Thanks for the help!

Hi Andre,

You need to have rootcling in your $PATH. E.g. . /opt/root6/bin/thisroot.sh should set it up, or adding export PATH=/opt/root6/bin:$PATH to your ~/.bashrc - or whichever shell you use.


Hi, Axel

I did your suggestion:


export PATH=/opt/root6/bin:$PATH

source /opt/root6/bin/thisroot.sh

and the same error:

andre@andre-QBEX-H61H2-M17:/opt/root6/test$ sudo make
Generating dictionary EventDict.cxx...
rootcling -f EventDict.cxx -c Event.h EventLinkDef.h
make: rootcling: Command not found
Makefile:764: recipe for target 'EventDict.cxx' failed
make: *** [EventDict.cxx] Error 127

I needed compile again the root?


Where did you get ROOT from? Did you build it yourself or did you download it? Which version - how do you know it’s ROOT 6.11/01?

Do you have /opt/root6/bin/rootcling? Did the build actually succeed?

And why are you replying to a topic that is a year old and has nothing to do with your problem? :slight_smile: Next time please simply open a new topic.

Cheers, Axel.


I think that the problem was associate to rootcling, anyway.

install root:

sudo mkdir /opt/root6
sudo chown andre /opt/root6

cd /opt/root6
git clone http://root.cern.ch/git/root.git root6_src

cmake -DPYTHIA8_DIR=/home/andre/Documents/pythia_root/pythia8 -Dpythia8=ON -Droofit=ON -Dhttp=ON -Dccache=ON -Dcling=ON /opt/root6/root6_src/

make -j4
$ root
root [0]

Cheers, andre

Do you have /opt/root6/bin/rootcling? Was there any build error? What happens is you run make again?

In /opt/root6/bin I don’t have /rootcling

In the build, I don’t see any error.

andre@andre-QBEX-H61H2-M17:/opt/root6/test$ make
Generating dictionary EventDict.cxx...
rootcling -f EventDict.cxx -c Event.h EventLinkDef.h
Error: rootcling: failed to open EventDict.cxx_tmp in main
Makefile:764: recipe for target 'EventDict.cxx' failed
make: *** [EventDict.cxx] Error 1

Well that cannot work because /opt/root6/test isn’t writable for regular users.

Either you’re not building ROOT 6 or there was a build error or you didn’t run make install to copy the built files to /opt/root6.

Note that we recommend not to install ROOT, but instead to build it without prefix and run it from the build directory after running . builddir/bin/thisroot.sh.

Cheers, Axel.