Cannot compile script on ROOT: cc1plus error

As a physics master’s student, I’ve recently been introduced to Linux and ROOT and as such have very little experience in both areas.

I have dual-booted Ubuntu 12.04 LTS with Windows 8.1 on my Dell XPS12 (Both of these seem to be running smoothly) and installed ROOT from binaries as per https://particle.phys.uvic.ca/~keeler/teaching/phys521a/Tools/rootInstall.html (but with a more up to date version). When I try to run a script that is compiled in C++, I get the following error:

cc1plus: error: unrecognised command line option '-std=c++11' g++: error: <address of macro>_C_ACLiC_dict.o: No such directory Error in <ACLiC>: Compilation failed!

After a bit of searching, it seems to be a compilation error rather than coding (the macro works fine on other machines), but as a new user, I don’t know how to go about looking for a solution to this.

Any help would be appreciated!

Those instructions for installing ROOT are pretty old. They refer to version 4.04 while the current one is 5.34, with ROOT 6 about to come out in a few months. It really is a huge difference, and I’m pretty sure your message is because C++11 didn’t exist when that old version of ROOT came out.

Since you are using Ubuntu, it really should be easier than your Prof is claiming. I’m pretty Ubuntu has ROOT in the package manager! IIRC it is called root-system or something. Search in the package manager/software centre for “CERN” or just “ROOT” and you should find it.

You should tell your prof to update their instructions! I’m from UBC just across the straight, and I use some of the physics cluster machines at UVic for my work. They definitely have more recent ROOT versions available (python is a different issue, unfortunately, they only had 2.5 or something last I checked).

Jean-François

Those aren’t actually my professor’s instructions; just some that I happened to stumble upon on the internet! I tried it previously using the “Installing ROOT from Source” section on the main webpage, but encountered some difficulties when trying build the program (specifically after using the “make” command).

I will try this method again (a little more carefully this time…) and report back.

Thanks very much for replying so quickly,
Will

I’m always very suspicious of hand-coded HTML instructions that look like they are from the 90s…

Anyways, I looked into Ubuntu packages for ROOT, and unfortunately it looks like it’s not available for 12.04 LTS, but it is available for 12.10. That’s kind of weird. If you feel like re-installing Ubuntu, 12.01 has the package for sure: http://packages.ubuntu.com/quantal/root-system

I did find this one person who packages the latest ROOT in a .deb file: http://sourceforge.net/projects/cernrootdebs/ So that could work with your 12.04. The easiest way to install .deb files is with the program “gdebi”.

Good luck!
Jean-François

Got it all working in the end. I may upgrade in soon, so it’s useful to know that they’re in the package repositories for later versions at least.

I think I was swayed (despite gammy-looking web-page) by the simplicity of it all, and the fact that it was aimed at students with no real idea of what they were doing.

Thanks again, this may have saved my project!
Will