Help Required! - How to package git head of gzdoom?

I maintain the boa snap. This bundles the gzdoom game engine. There’s a new release of the upstream boa game on the 30th of April, and the devs are keen to ship this with a very recent build of gzdoom, rather than the last stable build.

Unfortunately, the gzdoom devs have been refactoring their code. For example, they’ve split the music handling routines off into a separate ZMusic library and have made changes to the cmake configuration files to autodetect this.

I can build the last stable release by adding a zmusic part and simply after:ing this in the gzdoom part. However, this does not work for the git HEAD due to the changes in the cmake code.

Although I think I can get round these difficulties by passing environment variable to the ZMusic install locations and header files, my gzdoom build still fails at around the 28% mark. Bizarrely, this seems to be due to make “forgetting” where some of the gzdoom internal header files are located part way through the build process, making the compiler think that some of the string-printing functions are undefined. I have no idea why this is happening. Indeed, following the same build steps in a fresh 20.04 lxd container results in a successful build, which I cannot reproduce with snapcraft.

Can anyone get a working build of the git head of gzdoom working in snapcraft? I’m going out of my mind.



https://raw.githubusercontent.com/mcphail/boa/core20/snap/snapcraft.yaml - my work-in-progress yaml

try setting ZMUSIC_INCLUDE_DIR and ZMUSIC_LIBRARIES in your build environment … pointing to the stage dir … i.e.:

    build-environment:
      - ZMUSIC_LIBRARIES: "${SNAPCRAFT_STAGE}/usr/lib"
      - ZMUSIC_INCLUDE_DIR: "${SNAPCRAFT_STAGE}/usr/include"

(or check if there is a -DCMAKE_* option you can set to point to it)

Yes, setting those gets the build started. But it keeps stalling at the 28% mark, seemingly as it loses track of the header files for the pretty printing functions. It is strange as it doesn’t do this on a straight build in an lxd container.

Sorry, didn’t realise I’d linked to a snapcraft.yaml which didn’t have those changes, @ogra. I have them, already, in my local repo. I can’t work out what is going wrong. cmake can be opaque.