open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
91 stars 66 forks source link

Ubuntu 20.04 package issue #64

Closed griffinmilton3 closed 3 years ago

griffinmilton3 commented 3 years ago

Hello. I am able to run make without any issues, both .so files and examples build. However, when I try to run make package, cmake errors trying to build the RPM file. Is there a package that needs to be installed in order to continue?

Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.11.0-37-generic
Architecture: x86-64`
$ make package
[ 43%] Built target OpenDIS6
[ 44%] Built target ExampleReceiver
[ 46%] Built target ExampleSender
[100%] Built target OpenDIS7
Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: OpenDIS
CPack: - Install project: OpenDIS []
CPack: Create package
-- CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.
CPack: - package: /home/test/Desktop/open-dis-cpp/build/OpenDis-1.0.0.x86_64.deb generated.
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: OpenDIS
CPack: - Install project: OpenDIS []
CPack: Create package
CMake Error at /usr/share/cmake-3.16/Modules/Internal/CPack/CPackRPM.cmake:774 (message):
  RPM package requires rpmbuild executable
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/Internal/CPack/CPackRPM.cmake:1879 (cpack_rpm_generate_package)

CPack Error: Error while execution CPackRPM.cmake
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: OpenDis
make: *** [Makefile:141: package] Error 1
rodneyp290 commented 3 years ago

Ideally the CMAKE to have a variable set up, but for now you can edit Line 171 in the CMakeList.txt file, so that it just says: set(CPACK_GENERATOR "DEB")

I think that should work. It should just create a deb file then

rodneyp290 commented 3 years ago

Or to actually answer your question, sorry, you should be able to install rpm, in case you want to generate rpm files :)

griffinmilton3 commented 3 years ago

Ideally the CMAKE to have a variable set up, but for now you can edit Line 171 in the CMakeList.txt file, so that it just says: set(CPACK_GENERATOR "DEB")

I think that should work. It should just create a deb file then

All our targets are Debian based so this is the solution I needed. Thank you.