cdogs-sdl
cdogs-sdl copied to clipboard
1.2.0 breaks build on openSUSE - No rule to make
When trying to build 1.2.0 on openSUSE it fails with error messages like this:
make[2]: *** No rule to make target 'nanopb/pb_decode.c', needed by ...
It looks like the reason is setting relative source files without specificity the DIRECTORY
, so if you build out-of-tree it fails.
It can be fixed with this patch:
diff -Nur old/src/proto/CMakeLists.txt cdogs-sdl-1.2.0/src/proto/CMakeLists.txt
--- old/src/proto/CMakeLists.txt 2021-12-02 11:16:04.000000000 +0100
+++ cdogs-sdl-1.2.0/src/proto/CMakeLists.txt 2021-12-03 16:41:53.692774618 +0100
@@ -10,5 +10,6 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS}
+ DIRECTORY .
PROPERTIES GENERATED TRUE)
add_library(cdogs_proto STATIC ${PROTO_SRCS} ${PROTO_HDRS} msg.options msg.proto)
It can be fixed with this patch:
Ok not always, even with this patch at least on some systems I got this error (full log):
[ 73s] cd /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0 /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/src/proto /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto /home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto/CMakeFiles/cdogs_proto.dir/DependInfo.cmake [ 73s] Dependee "/home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto/CMakeFiles/cdogs_proto.dir/DependInfo.cmake" is newer than depender "/home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto/CMakeFiles/cdogs_proto.dir/depend.internal". [ 73s] Dependee "/home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build/src/proto/CMakeFiles/cdogs_proto.dir/depend.internal". [ 73s] Scanning dependencies of target cdogs_proto [ 73s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/cdogs-sdl-1.2.0/build' [ 73s] /usr/bin/make -f src/proto/CMakeFiles/cdogs_proto.dir/build.make src/proto/CMakeFiles/cdogs_proto.dir/build [ 73s] make[2]: *** No rule to make target 'src/proto/nanopb/pb_decode.c', needed by 'src/proto/CMakeFiles/cdogs_proto.dir/nanopb/pb_decode.c.o'. Stop. [ 73s] make[2]: *** Waiting for unfinished jobs....
Is it possible to set up github actions with opensuse? It would help verify this