Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root inconsistency between master and rel_6.2.0 #1544

Open
danieldeidda opened this issue Nov 22, 2024 · 4 comments
Open

root inconsistency between master and rel_6.2.0 #1544

danieldeidda opened this issue Nov 22, 2024 · 4 comments

Comments

@danieldeidda
Copy link
Collaborator

Not sure if an issue is the right thing to do. But I have noticed a recurrent error when I use master when installing STIR with our mediso extension. In particular I get the following error:
/home/nmdicom-recon/devel/gitlab_copies/stir-mediso-extension/src/include/Mediso/spect/MedisoListModeToROOT.h:15:10: fatal error: TFile.h: No such file or directory
15 | #include "TFile.h"

And I don't get this error when installing rel6.2.0 (which is the only thing I changed)
was there any change that could be causing this or should I look for the error somewhere else?

@KrisThielemans
Copy link
Collaborator

KrisThielemans commented Nov 22, 2024

I did recently make some effort to avoid "spoiling" the include path, #1536. There's another one coming up #1518. This means that it might be that the ROOT include path was added to all files, but not anymore.

So, I think you'll need explicit lines like

target_include_directories(IO PRIVATE ${CERN_ROOT_INCLUDE_DIRS})
if (TARGET ROOT::Tree)
target_link_libraries(IO PRIVATE ROOT::Tree)
else()
target_link_libraries(IO PRIVATE ${CERN_ROOT_LIBRARIES})
endif()

@danieldeidda
Copy link
Collaborator Author

so I would need something like that for every folder that uses root?

@KrisThielemans
Copy link
Collaborator

If you use a dependency of STIR, as opposed to STIR itself, you will have to make that explicit in the CMakeLists.txt, yes.

If you have an underlying library that uses ROOT, then you will need to add it there only.

@KrisThielemans
Copy link
Collaborator

@danieldeidda can this be closed? Maybe we should add a line to the release notes about it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants