"No rule to make target" in makecint examples

Hello,

I was playing with makecint. I am trying to use some C libraries that control a PCI board with root. Basically I needed a quick and dirty gui control of the board and since I had a gui that manipulated text files with data from the board, it seemed easy.

In order to get some experience, I started with the demo examples in

Let’s try Complex:
I presume that running ./setup should just work, but I get the following:

make: *** No rule to make target `/home/atlas/root/bin//libcint.so', needed by `Complex'. Stop.

I guess the double slash // is not that important, I changed it in the makefile with no change. And ofcourse, all the other examples produce similar errors.

The system is running root 5.16/00 (linuxx8664gcc) on RHEL WS release 4. I did locate and found the cint7 directory.

I spent some time looking around in case I did something stupid or I missed something (quite probable). Does anybody have a quick answer? Is it just that my ROOT system is old/broken?

Also, a bonus question: Do you think it would be wiser to do it the other way around, that is convert my root macros to compiled code and link it with my readily available C library files?

Hi,

makecint does not work properly in the ROOT environment; it should only be used with a CINT standalone build. Instead of makecint, you ought to use ACLiC with is even simplier. For example for a library libMyPCI.so and a header mypci.h you simply need to do:root [] .L libMuPCI.so root [] .L mypci.h+

Cheers,
Philippe.

Hello, thanks for the reply.

In the end, I decided instead to compile the gui and then connect it to the libraries.
I used ACLiC to test that the script would work in a standalone environment and then used rootcint to make it standalone:

rootcint -f Dict.cxx -c MainControlMenu.h OffLineDataAnalyzer.h LinkDefs.h
g++ `root-config --cflags --glibs` -o adctester MainControlMenu.cxx OffLineDataA
nalyzer.cxx AdcControl.cxx Dict.cxx

This works just fine, As long as the “bridging” class (AdcControl) is just a fake one, with only trivial implementations of the functions. I tried to implement the functions properly, introducing the C libraries (the AdcControl class also tries to bridge C and C++) for the control of the PCI board. I don’t want rootcint to go into AdcControl because then it propagates to the header files for the libraries and the thing becomes crazy.

How do we compile without taking into account the AdcControl Class? That is, since it does not depend on any ROOT libraries (yet an instance of that Class is created by the clicking of a button in the gui) how do we instruct rootcint not to peek into that header file?

I would appreciate any suggestions. As I see it, I need to further decouple the gui from the libraries, maybe create a central class that starts both the gui and access the library. Then I could try to compile together the part that needs rootcint and then link.

Would that work?

Thanks.

Hi,

would surrounding the #include “HeaderNotToBeSeenByCINT.h” with “#ifndef CINT”…"#endif" do it?

Cheers, Axel.

Hello, thanks for the reply.

It seems I got completely confused.

Correct me if I am wrong, but if I want to use the ROOT libraries in a standalone way, out of ROOT, I don’t have to use rootcint, do I? Isn’t rootcint supposed to be a way to use external libraries (let’s say that I am developing) inside root?

I wrote something last year that just used the libraries to create root files and canvases and at that time I just did:

g++ `root-config --cflags --libs` src/*.cxx -o bin/exec

Now I am using the GUI libraries and following the manual I am using rootcint:

rootcint -f Dict.cxx -c MainControlMenu.h OffLineDataAnalyzer.h LinkDefs.h g++ `root-config --cflags --glibs` -o adctester MainControlMenu.cxx OffLineDataA nalyzer.cxx AdcControl.cxx Dict.cxx

Then out of curiosity I try without the intermediate dictionary:

g++ `root-config --cflags --glibs` -o adctester MainControlMenu.cxx OffLineDataA nalyzer.cxx AdcControl.cxx

The code compiles, and runs showing the buttons but nothing is clickable (I guess the signal/slot mechanism doesn’t work, as the manual says, without a dictionary):

I suppose, maybe my question should be: Why is the signal/slot mechanism different that it requires the dictionary whereas every other thing doesn’t (or maybe I am wrong)?

Then trying it out in the full code, introducing relevant rules in the makefile, hell brakes loose, all root libraries seem to be conflicting. Is it due to the lack of dictionaries? I wanted to try if it at least compiles, even if the slot/signal mechanisms wouldn’t work.

Thanks and sorry of all the questions. Maybe I could use some more detailed documentation on compiling and linking the ROOT libraries.

[quote]Then trying it out in the full code, introducing relevant rules in the makefile, hell brakes loose, all root libraries seem to be conflicting. Is it due to the lack of dictionaries? [/quote]Dunno, what error are you seeing?

The signal/slot use the interpreter to call (with loose coupling) the slot.

Many other part of the system leverage the availability of the dictionary, including the I/O, the TTree::Draw mechanism, the TBrowser, etc …

Cheers,
Philippe.