Package Details: root 6.06.04-2

Git Clone URL: https://aur.archlinux.org/root.git (read-only)
Package Base: root
Description: C++ data analysis framework and interpreter from CERN.
Upstream URL: http://root.cern.ch
Licenses: LGPL2.1
Submitter: td123
Maintainer: fsiegert
Last Packager: fsiegert
Votes: 45
Popularity: 3.103500
First Submitted: 2012-04-08 19:07
Last Updated: 2016-06-13 12:07

Latest Comments

kgizdov commented on 2016-06-24 16:51

For people still struggling with the build here, I have a working build here (https://github.com/kgizdov/root) - maybe it will be helpful to someone. There are two branches depending on whether you use mesa-libgl or nvidia-libgl. The build also work with the mt and intel-tbb multi-threaded libraries. Also, RooFit is included and I was able to compile RapidFit for people that are interested.

JP-Ellis commented on 2016-06-15 13:44

@kgizdov Firstly, thanks for contributing! Every bit helps :) I'm sorry you think that what you're saying falls on deaf ears... I was trying to answer you.

kgizdov commented on 2016-06-15 12:11

@JP-Ellis, sorry, I mistook you for the ROOT package maintainer. Yesterday, I had to run `updpkgsums` to use your Pythia PKGBUILD. I think it was the *.patch you have, but I don't remember exactly.

While, I do not agree with many of the things you said (env variables are indicators of the global env and CMAKE uses them to "decide" how to compile based on its local config, not the other way around), I think all of this falls on deaf ears. None of are in control of this.

For the past year, I've had my own package build in order to fix issues. But I try to contribute once in a while. ;)

JP-Ellis commented on 2016-06-15 11:40

@kgizdov If there are issues with the Pythia PKGBUILD I have linked, this discussion is best kept to the [Pythia package](https://aur.archlinux.org/packages/pythia/) as it is not directly relevant to Root, and it will help avoid confusion and clutter here. I only mentioned it here because building Root will fail if the old Pythia PKGBUILD is used.

To address your points:

1. "I mentioned the checksums because people trying to use your PKGBUILD, would not be able to." As I mentioned, I am unable to reproduce the error which means I cannot find why that might be. Which sum is failing? Also, is that an error with the Pythia's PKGBUILD, or Root's?

2. "I fail to see the relevance on what the cling.git package has to do with this package." Since I had not encountered this issue, I (incorrectly) assumed that you must have Cling installed through something else than Root, so I concluded that you must have this other package. Sorry for the confusion.

3. "I think the way you have passed some arguments to cmake is wrong." I don't use cmake in the pythia PKBUILD I provide, so you must be referring to the Root PKGBUILD (which I did not write). In any case, both methods are correct, though (I think) it is preferred to use command line arguments.

To elaborate, some cmake option (such as compilation flag) are read from both the appropriate environment variable, and the appropriate command line flag. So in this case, cmake will first read the environment variable `$CXXFLAGS` and then update the flags based on what is provided in `-DCMAKE_CXX_FLAGS`. This means that the following two commands should be equivalent:

$ CXXFLAGS="-DFoo" cmake [...]

$ cmake -DCMAKE_CXX_FLAGS="-DFoo" [...]

This is of course all under the assumption that Root's CMake script does not explicitly ignore environment variables (but it would be strange if they did that).

Now some users will have set specific flags in /etc/makepkg.conf which get exported when `makepkg` builds the packages. The first option will cause these settings to be overridden, hence why the latter case is preferred.

4. "it is better to just do "make ${MAKEFLAGS}"". Just like the CXXFLAGS, options to `make` can be specified in either an environment variable or explicitly, with the explicit options having a higher priority. Since `makepkg` exports the settings set in `/etc/makepkg.conf`, it is not necessary to specify them explicitly.

kgizdov commented on 2016-06-15 10:59

@JP-Ellis, thanks for that. However, I don't have issues with building packages. I mentioned the checksums because people trying to use your PKGBUILD, would not be able to. Also, I fail to see the relevance on what the cling.git package has to do with this package. I do not have cling as part of the dependencies, nor do I have ever had cling installed. As far as I know, ROOT comes with cling set to "on" by default and builds it itself. If you think having cling pre-installed would solve the issue, I will try later, when I have time. On the other hand, I have Pythia compiled with the new ABI as well. But that doesn't help. Also, I think the way you have passed some arguments to cmake is wrong. From this page (https://root.cern.ch/installing-root-source), you can see that the proper arguments should be -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1..." instead of the current CXXFLAGS, etc. Also, after cmake has run, it is better to just do "make ${MAKEFLAGS}".

JP-Ellis commented on 2016-06-15 01:47

@kgizdov Indeed, the sums not working is a worry; but I'm unable to reproduce the error. You need to download the `PKGBUILD`, `pythia.sh` (from the original AUR package), and `shared_lib.patch` from the Gist as well. It should then download the Pythia source on its own.

With regard to `-O3`, it is generally a bad idea to enable it blindly since it can actually make the code slower. It also makes much stronger assumptions about the code and in particular, can break code that relies on undefined behaviours.

About `-march=native` and `-mtune=native`, I generally don't enable them because it makes the compiled binary less portable (that is, other computers are less likely to be able to run it); but as portability is not really necessary, I've updated the Gist to include these flags again: https://gist.github.com/JP-Ellis/3ce0625586ed19dc4896d3bcfc2a20e5

Finally, the error does appear to be due to an ABI mismatch with cling. This would be because Cling has:

-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \

from the cling PKGBUILD. If you remove that line, it should work (though I have not tested it because the cling PKGBUILD does not work for me).

kgizdov commented on 2016-06-14 18:38

@JP-Ellis, that's cool and all, but it seems your sha256sums for this Pythia PKGBUILD don't match. And Pythia spits out a lot of 'depricated declaration' warnings, so I'm not sure all of this is safe. Also, you seem to not like the '-O3' and '-march=native' flags, as you have removed them. Any reason for that?

Also, I just got this error:

IncrementalExecutor::executeFunction: symbol '_ZN5cling10printValueEP7TObject' unresolved while linking [cling interface function]!
You are probably missing the definition of cling::printValue(TObject*)
Maybe you need to load the corresponding shared library?

As far as I remember this is caused by the new ABI not matching cling...

JP-Ellis commented on 2016-06-14 09:08

@Bins As mentioned in my comment, you'll need to recompile Pythia8 with an updated PKGBUILD that you can find at: https://gist.github.com/JP-Ellis/3ce0625586ed19dc4896d3bcfc2a20e5. If you just rebuild Pythia from AUR, it will still have the old ABI flag and thus won't be compatible with ROOT.

bins commented on 2016-06-14 08:40

am I the only one getting these compilation failures ?

===
[ 81%] Linking CXX shared library ../../lib/libEGPythia8.so
CMakeFiles/EGPythia8.dir/src/TPythia8Decayer.cxx.o: In function `TPythia8Decayer::TPythia8Decayer()':
TPythia8Decayer.cxx:(.text+0x182): undefined reference to `Pythia8::Pythia::readString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::TPythia8()':
TPythia8.cxx:(.text+0x854): undefined reference to `Pythia8::Pythia::Pythia(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::TPythia8(char const*)':
TPythia8.cxx:(.text+0x9cc): undefined reference to `Pythia8::Pythia::Pythia(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::ReadString(char const*) const':
TPythia8.cxx:(.text+0xb9a): undefined reference to `Pythia8::Pythia::readString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::ReadConfigFile(char const*) const':
TPythia8.cxx:(.text+0xcc8): undefined reference to `Pythia8::Pythia::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, int)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::ListAll() const':
TPythia8.cxx:(.text+0xdbb): undefined reference to `Pythia8::Settings::list(bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::ListChanged() const':
TPythia8.cxx:(.text+0xe38): undefined reference to `Pythia8::Settings::list(bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::Initialize(int, int, double)':
TPythia8.cxx:(.text+0x11ef): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x1242): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x12a7): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x12fd): undefined reference to `Pythia8::Settings::parm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double)'
CMakeFiles/EGPythia8.dir/src/TPythia8.cxx.o: In function `TPythia8::Initialize(int, int, double, double)':
TPythia8.cxx:(.text+0x13b4): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x1407): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x146c): undefined reference to `Pythia8::Settings::mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
TPythia8.cxx:(.text+0x14bd): undefined reference to `Pythia8::Settings::parm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double)'
TPythia8.cxx:(.text+0x150f): undefined reference to `Pythia8::Settings::parm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double)'
collect2: error: ld returned 1 exit status
montecarlo/pythia8/CMakeFiles/EGPythia8.dir/build.make:174: recipe for target 'lib/libEGPythia8.so' failed
make[2]: *** [lib/libEGPythia8.so] Error 1
CMakeFiles/Makefile2:19393: recipe for target 'montecarlo/pythia8/CMakeFiles/EGPythia8.dir/all' failed
make[1]: *** [montecarlo/pythia8/CMakeFiles/EGPythia8.dir/all] Error 2
===

I did rebuild+reinstall pythia8 just to make sure this wasn't a new/old ABI issue...

JP-Ellis commented on 2016-06-14 02:17

As far as I know, `GLIBCXX_USE_CXX11_ABI=1` is actually the default (according to https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html), so setting it to 1 is redundant.

Regarding the `MAKEFLAGS`, `makepkg` automatically exports settings from `/etc/makepkg.conf`, so the PKGBUILD should *not* specify any flags to `make` unless necessary. If your system has 8 cores, then you should add `-j8` to the MAKEFLAGS options in your system's `/etc/makepkg.conf`, but `-j8` should not be added to the PKGBUILD as this would be quite inefficient for a computer with 2 cores.

Note that if you have Pythia installed, ROOT will fail to compile due to a mismatch in the use of that flag. You'll need to rebuild Pythia with an updated PKGBUILD (such as https://gist.github.com/JP-Ellis/3ce0625586ed19dc4896d3bcfc2a20e5) first.

All comments