Closed Silence2107 closed 1 year ago
Thanks for asking us. Generally speaking it should be possible to build older versions of SMASH, provided that the environment is matching their requirements.
In order to be able to understand possible reasons of the issue, it is necessary to have some more information. Could you post or attach the output of your cmake
command, including the command itself?
As totally blind guess, which might well be completely off, if you did not do a clean build (i.e. a build from an empty build folder) for version 1.8
, this might be the reason of the failure. Due to how CMake works, it might be that you are building the older SMASH version trying to use some dependency that you used to build SMASH-2.2
.
A log file of over 100Mb sounds a bit suspicious to me. To which file are your referring exactly?
Hi, Regarding not clean build : should not be the case, I retried a few times, each time removing build/install directories. And sorry, my bad: logfile is fine, I'm attaching it
Commands I used for build: (in builddir) cmake -DCMAKE_INSTALL_PREFIX=../smash1.8_installdir -DPythia_CONFIG_EXECUTABLE=../../pythia8235/bin/pythia8-config -DCMAKE_CXX_STANDARD=14 ../smash1.8_src make -j$(nproc)
My logfile is exactly full output of those commands. While configuring goes fine, make fails.
My setup: GCC/9.3.0 CMake/3.16.4-GCCcore-9.3.0 X11/20200222-GCCcore-9.3.0 root6.27.01 installed locally pythia8307 & pythia8235 installed locally GSL/2.6-GCC-9.3.0 Eigen/3.3.7-GCCcore-9.3.0 Boost/1.72.0-gompi-2020a smash2.2-crash.txt
This same setup works ok for SMASH-2.2, so I assume that its not my ROOT who fails with wrong c++ version.
Please let me know what you think, as well as ping me if you need more info. Thanks.
Thanks for the information. For the moment it should be enough to do some tests and come back to you with a more definite answer.
Just from reading and without testing - so take my statement with a pinch of salt - my guess is that there might be a problem requesting C++14 implementation with the recent version of the used compiler. If possible, while waiting for our reply, you might try out one of the following alternatives:
-DCMAKE_CXX_STANDARD=14
and then do not use ROOT or use a version prior to 6.24;A bit of history and background. SMASH releases so far are strictly speaking guaranteed to be compatible with C++11 standard only, although they have been prepared to be C++14-ready quite a long ago. Back in time we tried successfully to build SMASH with C++14 standard, but using much older compilers. I am not sure (yet) why make_unique
is failing to be correctly resolved and an ambiguous call error is raised, but reading the error it is clear that the two candidates are the STL one and that provided by us, which however is the first and only one that should be found, since in the smash
namespace. 🤔
Ok, I will get back to you when I try that. Unfortunately, I can only use GCC 9.3.0 due to different MC generators requirements I have.
Dear Pavlo,
unfortunately SMASH 1.8 does not support C++14 standard.
I dropped -DCMAKE_CXX_STANDARD=14
and I successfully compiled and executed SMASH 1.8 with Root output with gcc 9.3.0 and ROOT 6.22.06 (compiled from sources with C++11 standard).
To be clear, this was my cmake
configuration command that worked:
cmake ../smash/ -DPythia_CONFIG_EXECUTABLE=../pythia8235/bin/pythia8-config
In principle, according to: https://root.cern/install/build_from_source/
C++11 is supported until ROOT v6.24: subsequent versions require at least C++14
ROOT 6.24.06 should work, as well, but probably one should compile it from sources using the std C++11.
Hi Gabriele, Meaning I need a separate ROOT <= 6.24.06 for that to run? Or rebuilding existing one for the least?
Yes.
In both cases you should compile ROOT using std C++ 11. If you prefer to avoid to recompile ROOT, you can try with some "old" binary build, compiled with std 11. If you have Singularity installed in your system, I can provide an image with ROOT 6.22.06 (but you will have to install Pythia 8.235, because we started using Singularity (and Docker) containers only from version 2.0, which used Pythia 8.303).
I see. No point, I can build it myself. I will let you know.
Thanks.
@Silence2107 I want to add some information for you. After some investigation, I found a reasonable explanation about what is going on here. Sorry not to have found this earlier, but I have become part of SMASH team last year and I never had to deal with a so old version. 😅
I was reading the src/include/smash/cxx14compat.h
on the master branch and it looked fine to me and I was not understand the error about the ambiguous call, which did not make any sense to me. Sometimes the explanation is the simplest possible. In fact, I then found commit c959eb779d27089c5e6b34f678d9783220dda806, which is not there in SMASH-1.8. Before that commit, specifying -std=c++14
at compilation will break the build, triggering exactly the error you got. I now managed to compile SMASH-1.8 adding that #if
, #else
, #endif
to that file (basically redoing by hand the changes in the mentioned commit). I build it without ROOT, but this is independent from ROOT and it might then be that you could manage to use the ROOT version you were using with this "fix".
So, if you want to give it a try, you should
$ # From SMASH repository in a clean state
$ git checkout SMASH-1.8
Updating files: 100% (1234/1234), done.
[...]
$ git cherry-pick -n c959eb7
Auto-merging src/include/smash/cxx14compat.h
$ # optionally "git status" or "git diff --staged" to see the changes
where -n
is to avoid to commit the changes (you can always do it on a new branch if you need it).
Then try to make a clean build as you did before opening this issue.
@AxelKrypton worked like a charm. Test run went well, we may close the ticket. Thanks, it saved me some software management for sure! :)
Dear sir/madam, My name is Pavlo Panasiuk, I am an user busy with comparing different MC generators, including SMASH-2.2 and SMASH-1.8 . While I managed to build SMASH-2.2 on SAGA (NRIS HPC), SMASH-1.8 fails to build with same toolkit (except for different pythia version).
Is it possible to ask for technical support? Or is this version considered too old already? Logfile is a bit over 100 Mb, so I'm not attaching it right away.
Thanks, Pavlo