Unable to compile cppyy with clang 4.0 or GCC 5.0
Hi guys, The latest cppyy package doesn't seem to ship with cling 0.3 which supports both of those compilers. I can't find the repository for the package to attempt to contribute myself. Can you direct me to the repository or upgrade to the latest cling? Best Regards, Omer Katz.
I downloaded the tarball from PyPi and tried upgrading. I'm stuck with some cmake dependencies that seem to be missing. See build log https://gist.github.com/thedrow/5eb31d5880b8ededc45466f8bedf6a76 Any instruction on how to proceed will be greatly appreciated. Best Regards, Omer Katz. בתאריך יום א׳, 4 ביוני 2017 ב-9:29 מאת Omer Katz <omer.drow@gmail.com >:
Omar,
See build log https://gist.github.com/thedrow/5eb31d5880b8ededc45466f8bedf6a76
I don't understand this one, as these dependencies are part of the package. Are there any further details in any logs? Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
These logs are printed once I try to upgrade cling and llvm from their respective repositories. There are multiple problems with compiling the current version of cppyy. First of all, the distributed cling version is too old and doesn't support the GCC 5 ABI which means that you can't compile it with the GCC version I have. This can be fixed by upgrading cling to 0.3 or higher. Second of all, there's a bug in clang that doesn't allow to compile llvm with the clib headers that are distributed with GCC 6. I can download and install an older compiler but I don't see a reason since upgrading cling will fix the issue. I tried to find the source code repository for the package in order to try to share my contributions to upgrade cling to 0.3 but I could not find it. If it doesn't exist can you please create one, preferably under the pypy project in Bitbucket? On Mon, Jun 5, 2017, 22:58 <wlavrijsen@lbl.gov> wrote:
Omer,
the current version still has some dependencies left on ROOT: I thus used a stripped-down version of it, mostly by removing sub-directories, but also by trimming the modules (such as IO) that are still needed. I then added the cppyy cxx sources from the PyPy repo. The Cling standalone release is not yet used. The numbering of 6.6.9 in PyPi refers to ROOT 6.06/09, so it's a release behind current. I don't know whether current solves the compilation issues, though, and I don't know whether standalone cling easily drops in there. Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
The latest release of ROOT v6-09-04 released 18 days ago. It contains cling 0.4-dev. See https://github.com/root-project/root/blob/v6-09-04/interpreter/cling/VERSION The release notes for cling 0.3 specify that the GCC 5 ABI is now supported. See https://github.com/root-project/cling/releases/tag/v0.3 So upgrading will surely help. Even if you just stripped down the original ROOT version it's still useful to have a code repository that will record the changes so that others can help upgrade and maintain cppyy if necessary. Source Control allows you to view the changes and extract patches to automate some of the repeated work of stripping down ROOT during upgrades. On Tue, Jun 6, 2017, 00:10 <wlavrijsen@lbl.gov> wrote:
I was able to follow your lead for the most part. I'm stuck right now with cmake. See https://gist.github.com/thedrow/7c9f253d21e16c90547ecfb3538723b0 The diff for ROOTNewMacros.cmake can be found here https://www.diffchecker.com/Ff7UD7lG בתאריך יום ג׳, 6 ביוני 2017 ב-0:22 מאת Omer Katz <omer.drow@gmail.com >:
Omer, in response to your last mail, I started a script to strip ROOT and build the package. Will get to that and that should refresh my memory enough to see what is going on (I don't remember having to make the changes that you posted in the diff, but that may be just my (lack of) memory). In your case, I'd recommend to simply build ROOT using '-Dminimal=ON' as an argument to cmake, which will already greatly reduce things. Then build the cling wrapper from the PyPy repository (is a single .cxx) following its make fragment. That should be enough: with the .so's in place, PyPy's cppyy should work out-of-the-box. Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
Ok, thanks. Maybe the documentation should contain something about building from source. The diff I posted is just what changed in that file between the versions. I thought that maybe you could recognize what went wrong and why rootcling is not a valid target. בתאריך יום ד׳, 7 ביוני 2017 ב-18:44 מאת <wlavrijsen@lbl.gov>:
On 07/06/17 18:44, wlavrijsen@lbl.gov wrote:
diff PyPy-cppyy-backend-6.6.9.0/src/backend/cppyy/src/clingcwrapper.cxx pypy/pypy/module/cppyy/src/clingcwrapper.cxx 525c525 < cppresult->std::string::~string(); ---
cppresult->std::string::~basic_string();
715c715 < std::cerr << "Warning: " << msg << '\n'; ---
std::cerr << "Warning: " << msg.str() << '\n';
939c939 < // TClassRef& cr = type_from_handle( scope ); --- Disclaimer: I have not tried to use any of this, I'm just wondering which one is correct Matti
Matti,
FWIW, when I download the latest cppyy backend from PyPI, there seems to be a different version of clingwrapper.cxx:
yes. The one in the PyPy repository is the newer and has Ryan's fixes in it. I haven't had time to update the PyPI package. Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
participants (3)
-
Matti Picus
-
Omer Katz
-
wlavrijsen@lbl.gov