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:
I tried re-running CPack with GDB, I get this:
It seems the problem happens at those lines in the FreeBSD libpkg; CPack is calling pkg from this line.
I'm not sure how to debug further; could anyone help me here?
Edited by Brad King