# Bugg in CPack Generator for FreeBSD?

**URL:** https://discourse.cmake.org/t/bugg-in-cpack-generator-for-freebsd/4672
**Category:** Development
**Created:** [December 15, 2021, 2:09pm UTC](https://discourse.cmake.org/t/bugg-in-cpack-generator-for-freebsd/4672 "2021-12-15T14:09:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![P.O\_Jonsson](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/c4cdca/32.png) [@P.O\_Jonsson](https://discourse.cmake.org/u/P.O_Jonsson)
#### Post date: [December 15, 2021, 2:09pm UTC](https://discourse.cmake.org/t/bugg-in-cpack-generator-for-freebsd/4672/1 "2021-12-15T14:09:01Z")

</div>

To whom it may concern

I am having problem with CPack creating pkg packages for FreeBSD 13. In CPack that can be installed from repository there is no FREEBSD CPack generator. I followed this suggestion:

[https://stackoverflow.com/questions/65814753/how-to-tell-cpack-to-use-the-freebsd-generator](https://stackoverflow.com/questions/65814753/how-to-tell-cpack-to-use-the-freebsd-generator)

After having uninstalled the CMake that I was using (3.21.3) I could build CMake from source, but only at level (3.20.1), I suppose this is the level shipped with FreeBSD 13.

CPack -help now confirms that there is a FREEBSD generator (in uppercase) and when I build my project setting all the mandatory variables set here

[https://cmake.org/cmake/help/latest/cpack\_gen/freebsd.html](https://cmake.org/cmake/help/latest/cpack_gen/freebsd.html)

everything looks fine. Trying to build the package I get this:

$ sudo cpack ./  
CPack: Create package using FREEBSD  
CPack: Install projects  
CPack: - Run preinstall target for: ooRexx  
CPack: - Install project: ooRexx []  
CPack: Create package  
CPack Error: Problem copying the package: /usr/home/osboxes/workspace/ooRexx-FreeBSD-build/oorexxBuild/\_CPack\_Packages/FreeBSD/FREEBSD/ooRexx-5.0.0.txz to /usr/home/osboxes/workspace/ooRexx-FreeBSD-build/oorexxBuild/ooRexx-5.0.0.txz  
CPack Error: Error when generating package: ooRexx

Now, the error is for ooRexx-5.0.0. **txz** but I was building a **pkg** package and there is a ooRexx-5.0.0. **pkg** inside that very directory that can be installed, inspected etc.

My suspicion is that this reference to .txz is wrong, but I cannot change this myself.

Any help on how to get on with this is most welcome. Let me know if you need more information. I am neither a specialist on FreeBSD nor on CMake so please be specific if you want me to do something for a test.

Hälsningar/Regards/Grüsse,  
P.O. Jonsson  
[oorexx@jonases.se](mailto:oorexx@jonases.se)
