CMake build problem for version 3.4.0 to 4.2.1 on Debian and Ubuntu
Posted: 16 Nov 2021, 11:26
I'm one of the Debian Developers who maintains the warzone2100 package (included in Debian and copied from Debian to Ubuntu and other Debian derived distributions). Currently Debian has 3.3.0. I want to update Debian to 4.2.1 (or any version later than 3.3.0) but I have compile errors.
/usr/bin/ld: src/CMakeFiles/warzone2100.dir/data.cpp.o: in function
`dataAudioCfgLoad(char const*, void**)':
./debian/build/../../src/data.cpp:605: undefined reference to
`ParseResourceFile(PHYSFS_File*)'
Above is what seems to be the root cause of the problem, which appears to be due to lib/gamelib/audp_parser.ypp not being compiled due to CMake stuff I don't understand.
I've attached the debian.tar.xz file for 4.2.1 for anyone who would like to have a go at it. I could also provide a debian.tar.xz file for 3.4.0 if someone wants to try that (same problem but less disk space and compile time needed).
If anyone has a suggestion on how to approach this then please let me know. The problem occurs when compiling on Debian/Bullseye (amd64), Debian/Unstable (amd64), and Ubuntu/Focal (arm64). The problem is related to CMake, 3.4.0 was the first version using CMake and the first version to have this compile problem.
/usr/bin/ld: src/CMakeFiles/warzone2100.dir/data.cpp.o: in function
`dataAudioCfgLoad(char const*, void**)':
./debian/build/../../src/data.cpp:605: undefined reference to
`ParseResourceFile(PHYSFS_File*)'
Above is what seems to be the root cause of the problem, which appears to be due to lib/gamelib/audp_parser.ypp not being compiled due to CMake stuff I don't understand.
I've attached the debian.tar.xz file for 4.2.1 for anyone who would like to have a go at it. I could also provide a debian.tar.xz file for 3.4.0 if someone wants to try that (same problem but less disk space and compile time needed).
If anyone has a suggestion on how to approach this then please let me know. The problem occurs when compiling on Debian/Bullseye (amd64), Debian/Unstable (amd64), and Ubuntu/Focal (arm64). The problem is related to CMake, 3.4.0 was the first version using CMake and the first version to have this compile problem.