Pyroot passing a single argument to ld when it should pass multiple?

I’m having trouble in some environments when I compile a macro using pyROOT. It works fine when I use C++ root.

The error message I get is
/usr/bin/ld: cannot find -lRint -lCore -L/home/ubuntu/root/lib
It appears that pyroot is, for some reason, passing "-lRint -lCore -L/home/ubuntu/root/lib" to ld as a single argument. Since there’s no such thing as 'libRint -lCore -L/home/ubuntu/root/lib.so', it fails.

I tested this explicitly by hacking ld to do for a; do echo $a; done before compiling, and my suspicion was correct, -lRint -lCore -L/home/ubuntu/root/lib is printed on one line.

As a minimal test, I use test.C:

#include <iostream>

void test() {
    std::cout << "hi" << std::endl;
}

and test.py:

import ROOT
ROOT.gROOT.LoadMacro("test.C+")
ROOT.test()

If I run python test.py, it fails. If I first run root -l -b -q test.C+, that works fine, and I can then successfully run python test.py, since test.C is already compiled.

I’m running root 6.06.08 on the ubuntu virtual machines from CircleCI. You can see the output here:
https://circleci.com/gh/hroskes/test-ld-pyroot/6
On any other machine I can run root on, I don’t get this error.

Any suggestions would be greatly appreciated! I’m very confused.

Hi,
I don’t know what the problem might be, but I cannot reproduce it with ROOT v6.10.

If you can’t reproduce it either with other installations of ROOT, the cause of the issue might very well be a malfunctioning ROOT installation on your CircleCI virtual machine.

Hi,

Thanks for the suggestion. Actually I just download the precompiled tarball.

https://root.cern.ch/download/root_v6.06.08.Linux-ubuntu14-x86_64-gcc4.8.tar.gz

I’ve tried compiling from source on their machines, but they don’t allow commands that take more than 2 hours, and it killed it. I may be able to try again by hacking it to run in two steps. Do you think that would help?

Thank you again,
Heshy

Uhm, I see…weird issue then.

Is switching to a newer release an option? If the issue is still present in e.g. v6.10 I will open a ticket about it.

Hey, my minimal test works with 6.10!! Thanks!

I’m going to try it for the setup that we actually use and get back to you.

1 Like

Hi,
can I mark this as solved then? :smiley:

Sorry about that! Yes, go ahead. Thanks!!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.