-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use new cmake macros from podio to build the datamodel libraries and dictionary #84
Conversation
@andresailer can you maybe have a look at the cmake part in the |
cb9aaa6
to
85c3bb9
Compare
Closing and re-opening to see if newest podio is already picked up in CI. |
3a2fee8
to
22d40d8
Compare
When building podio on the fly, it seems that edm4hep picks up the wrong podio in the CI for some reason. |
https://travis-ci.com/github/key4hep/EDM4hep/jobs/433171522#L641
the part
- cmake -DCMAKE_CXX_STANDARD=17 -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=../install -G Ninja .. \
+ cmake -DCMAKE_CXX_STANDARD=17 -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=$PWD/../install -G Ninja .. \ Edit with |
9bb47a4
to
594b9b8
Compare
&& ninja -k0 \ | ||
&& ninja install \ | ||
|| exit 1 | ||
|
||
cd .. | ||
export CMAKE_PREFIX_PATH=$PWD/install:$CMAKE_PREFIX_PATH | ||
export PODIO=$PWD/install:$CMAKE_PREFIX_PATH | ||
export PODIO=$PWD/install # $CMAKE_PREFIX_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export PODIO=$PWD/install # $CMAKE_PREFIX_PATH |
Actually this env var is not (should not?) be used for CMake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So could it be removed in this setup? Or is it needed by something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this can be removed.
594b9b8
to
e47ffce
Compare
It seems that the problem is not that cmake picks up the wrong podio, because if it did, than we would already fail at the cmake stage. Rather it seems that when compiling the compiler gives precedence to the already installed podio headers and not to the ones that were just built, even though the latter are specified for the compiler invocation. How the compiler is invoked: vs what seems to actually be happening for some reason: |
Ah, the old issue when using views to develop software. But now we do have spack - I think this could be a good example to exercise using spack to build a local package. |
But we are not really using a view here, right? The setup is done from the key4hep-stack nightlies which is built via spack, if I interpret the |
It's using |
Right, the other old problem with views... The setup scripts export CPATH, which comes before -isystem in the location lookup see https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html Edit: fixed variable name |
16b2146
to
08a46bd
Compare
@andresailer spack creates the setup script, and probably uses CPATH on purpose (if you load it with spack, you don't want a system path to take preference). I tried to go the spack dev-build route here: #96 let's see if that works and rebase this PR on top? |
Completely unsetting |
They are not system paths that take precedent, those come even later in the search. Just the command line defined includes take preference if CPLUS_INCLUDE_PATH is used instead of CPATH. |
closer, but still not there:
|
Ah yes, probably because one picks up the one from the view and the other one picks up the one which has just been installed. Maybe adding the new one to |
Need to update some environment variables. CPATH has to be unset, as otherwise it would interfere with the build process, as it points to the centrally installed podio. Pushing it to ROOT_INCLUDE_PATH is necessary for the DD4Hep test to run.
#96 works now, I'd propose to merge and rebase on that. |
a200779
to
06c47a3
Compare
As you prefer, I can rebase #96 too. |
BEGINRELEASENOTES
ENDRELEASENOTES
AIDASoft/podio#130 introduced new cmake macros to facilitate the generation of additional (possibly) optional targets that depend on IO backends that are supported by podio. This PR makes use of them and generates code and libraries for all the IO backends that are supported by podio.
To check if also the SIO backend is working for edm4hep, I have added tests that write and read a file using it. These tests simply write the same file as the previous tests using the ROOT backend, I have basically just moved code into a common header.