Skip to content

CPack: Segmentation fault when using FreeBSD generator

I'm attempting to use the CPack FreeBSD generator, but attempting to create a package results in a segmentation fault.

(The exact project I'm attempting to compile is SuperTux)

Full steps:

  • Fresh FreeBSD install
  • Install dependencies: pkg install -y pkgconf git sdl2 sdl2_image openal-soft glew boost-all curl libogg libvorbis freetype libraqm
  • Install CMake from source:
    • portsnap fetch extract
    • cd /usr/ports/devel/cmake/
    • make configure
      • Make sure to check the "CPack" option in the first screen
    • make && make install
  • cd ~
  • Clone the project: git clone --recurse-submodules https://github.com/supertux/supertux
  • Make the build folder: mkdir -p ./supertux/build/ && cd ./supertux/build/
  • Run CMake: cmake ..
  • Run make: make
  • Make the package: cpack -G FREEBSD
    • This step will give a segmentation fault:

Screenshot_from_2021-02-20_19-05-13

I tried re-running CPack with GDB, I get this:

Screenshot_from_2021-02-20_19-13-28

Screenshot_from_2021-02-20_19-14-44

It seems the problem happens at those lines in the FreeBSD libpkg; CPack is calling pkg from this line.

Screenshot_from_2021-02-20_20-16-51

I'm not sure how to debug further; could anyone help me here?

Edited by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information