H5PCC(1)

πŸ’– NAME πŸ’–

h5pcc β€” the helper script that compiles your HDF5 C applications for you, bestie. It's the manual page H5PCC(1), in the User Commands section, and it's about to be your new fave little build gremlin. 🧚✨


πŸŽ€ DESCRIPTION πŸŽ€

okay so. Here's the vibe. The script gets called like this:

usage: h5pcc [OPTIONS] <compile line>

and then it hands you a list of OPTIONS:

✨ OPTIONS (round one) ✨

  • -help β€” shows you this help message. That's it, that's the whole job. 🫢
  • -echo β€” shows every single shell command as it gets executed, so you can see exactly what chaos is going down.
  • -prefix=DIR β€” the prefix directory where it goes looking for the HDF5 lib/ and include/ subdirectories. [default: /usr]

πŸ’€ not me having to tell you this: the page then repeats the entire usage block and those same three options again, verbatim, before it keeps going. I am not making the rules, I'm just not allowed to drop anything. So here it is, the sequel, and this time it keeps going.

🌈 OPTIONS (round two, the extended cut) 🌈

usage: h5pcc [OPTIONS] <compile line>
  • -help β€” This help message. (yes, again. iconic of it. πŸ‘‘)
  • -echo β€” Show all the shell commands executed. (again! she's consistent!)
  • -prefix=DIR β€” Prefix directory to find HDF5 lib/ and include/ subdirectories. [default: /usr]
  • -show β€” shows you the commands without executing them. A little sneak peek, a little window shopping. no cap, super useful for debugging.
  • -showconfig β€” shows the HDF5 library configuration summary. Receipts. πŸ“œ
  • -shlib β€” compile with shared HDF5 libraries. [default for hdf5 built without static libraries]
  • -noshlib β€” compile with static HDF5 libraries. [default for hdf5 built with static libraries]
  • <compile line> β€” the normal compile line options for your compiler. just. the stuff you'd normally pass. πŸ’…

πŸ¦‹ the compiler tea πŸ¦‹

h5pcc uses the same compiler you used to compile HDF5. So if you're like "which options do I need tho", go check your compiler's man pages, bestie β€” that's where the info lives. πŸ”₯

You can override the compiler, the linker, and whether or not to use static or shared libraries to compile your program, by setting the following environment variables accordingly:

  • HDF5_CC β€” use a different C compiler.
  • HDF5_CLINKER β€” use a different linker.
  • HDF5_USE_SHLIB=[yes|no] β€” use the shared or static version of the HDF5 library.
    • [default: no except when built with only shared libraries]

🌸 and you can remix the compile line too 🌸

You can also add or change paths and flags to the compile line using the following environment variables β€” or by assigning them to their counterparts in the 'Things You Can Modify to Override...' section of h5pcc. iykyk. ✨

  • Variable β€” Current value to be replaced:
  • HDF5_CPPFLAGS β€” ""
  • HDF5_CFLAGS β€” ""
  • HDF5_LDFLAGS β€” ""
  • HDF5_LIBS β€” ""
⚠️ bestie listen to me on this one: note that adding library paths to HDF5_LDFLAGS where another hdf5 version is located may link your program with that other hdf5 library version. not the one you think you're linking. the other one. be careful. 😭

that's the whole page, fr fr. This version of h5pcc ships with hdf5 1.8.12, and this manual page was dated May 2014 β€” so yes she's an elder but she still slays. πŸ’– Go compile something cute. πŸŽ€πŸ¦‹βœ¨