#5709 fcollada build fix for gcc 10 (WritePhysicsRigidBodyInstance) by @pcpa.
Details
- Reviewers
Itms - Commits
- rP23794: Fix building on GCC 10, fixes #5709, #5756.
- Trac Tickets
- #5709
#5756
Feel free to commandeer.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- temp
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 11747 Build 21776: Vulcan Build Jenkins Build 21775: Vulcan Build (macOS) Jenkins Build 21774: Vulcan Build (Windows) Jenkins Build 21773: arc lint + arc unit
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2152/display/redirect
I believe another instance of the FArchiveXML.h file should be updated. Requesting changes so it's not forgotten.
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/simulation2/helpers/HierarchicalPathfinder.h | 1| /*·Copyright·(C)·2019·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2019" source/simulation2/helpers/HierarchicalPathfinder.h | 34| ·*·is·defined·as·a·region. | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'template<...' is invalid C code. Use --std or --language to configure the language. source/simulation2/helpers/HierarchicalPathfinder.cpp | 1| /*·Copyright·(C)·2019·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2019" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2176/display/redirect
Thank you, @wraitii! I (gcc-10.1.1-1.fc32.x86_64) have just tried out your updated patch:
svn revert -R * svn up arc patch D2745 cd build/workspaces/ ./update-workspaces.sh -j7 cd gcc make -j7
and can confirm everything builds; the errors mentioned in https://wildfiregames.com/forum/index.php?/topic/28175-unable-to-build-0ad/ have all gone.
Afterwards I did the tests, no problems there:
[0ad]$ binaries/system/test Running cxxtest tests (336 tests)................................................................................................................................................................................................................................................................................................................................................OK! [0ad]$ binaries/system/pyrogenesis
I assume it would also solve your problems, @elexis?
I have a friend who can't build on Manjaro, an arch derivative, using gcc 10. He's going to apply the patch tomorrow, and I can post results here if still needed. Still needed?
Yes, please! The more people report the same problem and confirm this patch fixes it, the better. See also the forum threads:
https://wildfiregames.com/forum/index.php?/topic/28175-unable-to-build-0ad/
https://wildfiregames.com/forum/index.php?/topic/28378-fixed-arch-artix-linux-build-broken/
My friend who is using Manjaro 20, gcc 10.1.0 gets this error, before and after applying the patch.
Linking Collada
/usr/bin/ld: ../../../libraries/source/fcollada/lib/libFColladaSR.a(FAXInstanceExport.o): in function `FArchiveXML::WritePhysicsRigidBodyInstance(FCDObject*, _xmlNode*)':
FAXInstanceExport.cpp:(.text+0xbfc): undefined reference to `_xmlNode* FArchiveXML::AddPhysicsParameter<FMVector3, 0>(_xmlNode*, char const*, FCDParameterAnimatableT<FMVector3, 0>&)'
/usr/bin/ld: FAXInstanceExport.cpp:(.text+0xc12): undefined reference to `_xmlNode* FArchiveXML::AddPhysicsParameter<FMVector3, 0>(_xmlNode*, char const*, FCDParameterAnimatableT<FMVector3, 0>&)'
collect2: error: ld returned 1 exit status
make[1]: * [Collada.make:94: ../../../binaries/system/libCollada.so] Error 1
make: * [Makefile:177: Collada] Error 2
He's compiling the latest code from the 0ad GitHub repo, btw.
My bad.. he ran make clean before re-compiling but didn't run clean-workspaces.sh. Doing so now.. I'll update here shortly.
My bad.. he ran make clean before re-compiling but didn't run clean-workspaces.sh. Doing so now.. I'll update here shortly.
Ok, he got a complete build.