gdb can't see source code for packages due to moving the build
At Caltech, gdb traces into packages' source code, but at Fermilab, if the package isn't in your test release you just get something like
/build/nova/novasoft/releases/development/Calibrator/art/Calibrator_service.cc: No such file or directory.
This is because the build is done in one place on the build machine, where the paths are baked in, and then copied to its final destination. At Caltech the builds are in-place.
I'm not sure what to suggest as a solution. Options include: in-place builds, mimicking the /grid/fermiapp/ directory structure on the build machine, finding some magic switch to gcc that allows you to specify a different path, or WONTFIX-ing this.
Similar comments apply to all our externals.
#3 Updated by Christopher Backhouse over 5 years ago
This might be relevant
#4 Updated by Christopher Backhouse over 5 years ago
I improved things by putting this in my ~/.gdbinit
set substitute-path /build/nova/externals/ /nusoft/app/externals/
set substitute-path /data/build/slf5/art-1.09.00/ /nusoft/app/externals/
set substitute-path /data/build/slf5/art-1.10.00/ /nusoft/app/externals/
set substitute-path /build/nova/novasoft/ /grid/fermiapp/nova/novaart/novasvn/
The different versions is because of art externals that didn't get rebuilt from one release to the next. This is actually pretty cool, it lets you see inside the C library implementation (STL etc) and ROOT and geant and so on, as well as novasoft.
This doesn't work for the ART externals, because apparently they're built in a src/ directory while we have a source/ directory in $EXTERNALS. And something else, I forgot what (nutools), was built in a cet/ directory we don't have. You could add lines specifically for those, but they'd have to be version specific, because the divergence is at too deep a directory.
It's a shame that to get this you need to edit a dot file (I don't think gdb checks any environment variable). Do we have somewhere where we tell people how to get a sensible .bashrc, .rootrc, .emacs, etc?