HSF Packaging Meeting #37, 09 October, 2019
Participants: Ben Morgan, Graeme Stewart, Chris Green, Patrick Gartung, Javier Cervantes, Ben Couturier, Marco Clemencic, Chris Burr, André Sailer
- Discussion on visit from CMake developers
- Mostly on building C++ modules
- Compiler needs to give enough information to build C++ modules, which needs better interfaces for passing information
- New CVMFS repo
- Stratum 0 at CERN
- For any software of interest for wider use before production
- Initial use for TAU performance tools from Tools WG
-Contact Graeme if you have any packages you would like to add
- Monday 14th Oct meeting of Tools WG on TAU utility
- Looks particularly useful for mixed Python/C++
- Next HSG/WLCG meeting 11-15th May 2020 in Lund, Sweden.
- Next Packaging meeting: with CHEP and other commitments, suggest meeting in early December. As always, let Graeme and Ben know of any presentations
- Chris G: Will distribute CHEP slides in the next week or so for comments
Best practices for package relocation (Ben)
- Still useful to do this well, even when taking into account helper scripts from package managers like Spack
- Relative paths good for “internal” items, but not for external dependencies
- External dependencies fixed with full paths
argv needs some help to fix corner cases, but it works
binreloc will return a reliable absolute path
- But it only works for dynamic libraries (not static)
- Python, Rust, Go provide “native” means to find paths
- Some C/C++ toolkits do it (Qt, Poco)
- But no absolutely general solution for C/C++,
binreloc is the best current soluion
- Good practice to follow CMake guidelines
- Write a FooConfig.cmake, not a FindFoo.cmake
- CMake will help you!
- Use target properties, not fiddling with CMake path variables directly
- Then the targets carry their requirements around with them
- Helper module is very useful
- Namespace for extra security…
- Use find_dependency for each external dependency
- Chris G: Are all of the examples written?
- Ben: Everything bar the Config file template is actually generated by CMake for us. Can write by hand
in non-CMake based projects, though need to use correct sequence of commands.
- CMake Summary:
- Use target properties
- Be relative to CMAKE_INSTALL_PREFIX
- Export use-time targets, instead of set_LIBRARIES
- Refind external targets in the config file, so that things are correctly transitive
- Chris G - this very helpful! How would you encode this into a system like CET buildtools/modules?
- Replace include directories with target include directories
- Does require some changes in use by users.
- Maybe use an alias to a namespace target
- People have tended to use variables directly, which complicates the issues
- Ben C - can we publish this on the HSF website so we don’t lose it?
- Should update the HSF tool for bootstrapping projects and include this best practice use of CMake
- Will have a SpackDev talk at CHEP - talk will be given by Liz.
- Setting up a build cache for sci-soft, should be up and running in the next few weeks.
- Have a PR for spackdev extension, discussions with reviewer ongoing.
- Upcoming Spack 0.13 release, but concretiser overhaul not ready (which is a big one for us).
- Have an application in for a person to help.
- Have been installing some things on CVMFS at FNAL. Some requests to install OS X binaries on to linux based CVMFS. This is now implemented in Spack!
- Borrowed the conda routine for patching paths, with same restriction (new path must be shorter than old)
- See Spack HEP channel for details.