Closed AngryPenguinPL closed 3 years ago
When compile cdogs-sdl 0.12.0 with Clang 12 on OpenMandriva Cooker I see this build error:
make[2]: Leaving directory '/builddir/build/BUILD/cdogs-sdl-0.12.0/build' DEBUG util.py:634: ld: error: duplicate symbol: gConfig DEBUG util.py:634: >>> defined in CMakeFiles/player_test.dir/player_test.c.o DEBUG util.py:634: >>> defined in ../cdogs/libcdogs.a(config.c.o) DEBUG util.py:634: ld: error: duplicate symbol: gCampaign DEBUG util.py:634: >>> defined in CMakeFiles/player_test.dir/player_test.c.o DEBUG util.py:634: >>> defined in ../cdogs/libcdogs.a(gamedata.c.o) DEBUG util.py:634: ld: error: duplicate symbol: gNetClient DEBUG util.py:634: >>> defined in CMakeFiles/player_test.dir/player_test.c.o DEBUG util.py:634: >>> defined in ../cdogs/libcdogs.a(net_client.c.o) DEBUG util.py:634: ld: error: duplicate symbol: gPlayerTemplates DEBUG util.py:634: >>> defined in CMakeFiles/player_test.dir/player_test.c.o DEBUG util.py:634: >>> defined in ../cdogs/libcdogs.a(player_template.c.o) DEBUG util.py:634: clang-12: error: linker command failed with exit code 1 (use -v to see invocation) DEBUG util.py:634: make[2]: *** [src/tests/CMakeFiles/player_test.dir/build.make:114: src/tests/player_test] Error 1 DEBUG util.py:634: make[1]: *** [CMakeFiles/Makefile2:993: src/tests/CMakeFiles/player_test.dir/all] Error 2 DEBUG util.py:634: make[1]: *** Waiting for unfinished jobs....
Full build log here: https://file-store.openmandriva.org/api/v1/file_stores/759fc4fe43577c6ba397b469b0d1c27650d321bc.log?show=true
I'm using clang 12.0.5 on macOS and can't reproduce. But it seems to compile anyway if I get rid of those stubs in plyaer_test.c. Please try again
plyaer_test.c
Yes I can confirm, this fix my issue.
When compile cdogs-sdl 0.12.0 with Clang 12 on OpenMandriva Cooker I see this build error:
Full build log here: https://file-store.openmandriva.org/api/v1/file_stores/759fc4fe43577c6ba397b469b0d1c27650d321bc.log?show=true