-
Notifications
You must be signed in to change notification settings - Fork 55
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
Code fails to compile master on gitinfo error #19
Comments
Run make inside build at least the first time, I think. After that make -C build should work. It's more related to cmake not finding the pullgitinfo python script. |
Pullgitinfo will create gitinfo.hh in build/include. |
Series of commands to replicate: running make produces the error above. running it again gives the same result. What am I missing? |
if I I guess a modification to CMakeList to make sure gitinfo gets made first will fix this? |
What about this patch to CMakeLists.txt? https://gist.github.com/wdconinc/8c288ac15c4b4a460872c23fce496414 I can't reliably reproduce the problem (CMake version, dependency resolution, probably some difference with your setup). |
You should be able to reproduce this on ifarm1401 (cmake 3.5.1). I also see it on my Mac (older cmake) and on a RHEL 7.2 desktop configured by JLab. The problem seems to be that on the first make it tries to make either remoll or remollout (interestingly the compiler on RHEL GNU 4.8.5 and the one on the ifarm node GNU 5.2.0 try to make remoll and remollout first respectively). What I found was to make gitinfo a dependency to the other executables/libs: Your option also seems to do the job. I leave it up to you how you want to handle this. Thanks for looking into it. |
Still can't reproduce on ifarm1401:
Which cmake 3.5.1 are you using? But if add_dependencies works, let's go with that. I can't verify so I don't want to commit it. Technically gitinfo is not a dependency of of remoll or remollroot, but a dependency of src/remollRunData.cc. That means that even with add_dependency it could order the compiles such that gitinfo is only created after it attempts to compile src/remollRunData.cc. Another solution could be to use set_source_files_properties(src/remollRunData.cc OBJECT_DEPENDS gitinfo) but I couldn't get that to work. By using add_custom_command with an explicit OUTPUT the dependency resolution in cmake should properly resolve the dependency chain by the include of gitinfo.hh in src/remollRunData.cc. |
Did this get resolved? "add_custom_command with an explicit OUTPUT the dependency resolution in cmake should properly resolve the dependency chain by the include of gitinfo.hh in src/remollRunData.cc" sounded promising but does it need to be implemented and tested by someone? |
I'll fix it first thing tomorrow. I tested that either method works (will probably implement Wouter's suggestion). |
Yeah, I just ran into this again on the pion branch today. So, that's one system where I CAN reproduce it. |
Implemented @wdconinc's suggestion: 8d9d226 To reproduce it on the ifarm the env was:
ifarm1401.jlab.org> cmake --version Note that indeed I have been using a different installation of cmake than the one mentioned above by @wdconinc |
…Collimator1 Adjust the end of the DS flange of bellows 2
Checking out a fresh copy of master and trying to compile for the first time hangs up on:
[ 69%] Building CXX object CMakeFiles/remoll.dir/src/remollRunData.cc.o
/home/ciprian/playtime/remoll/src/remollRunData.cc:2:22: fatal error: gitinfo.hh: No such file or directory
#include "gitinfo.hh"
^
compilation terminated.
make[2]: *** [CMakeFiles/remoll.dir/src/remollRunData.cc.o] Error 1
make[1]: *** [CMakeFiles/remoll.dir/all] Error 2
make: *** [all] Error 2
[ciprian@negoiu build]$ grep gitinfo ../src/*
../src/remollRunData.cc:#include "gitinfo.hh"
My guess this is related to this commit:
8619363#diff-52845aab4628b4fe1c66538ffd1ddb39
The text was updated successfully, but these errors were encountered: