Page MenuHomeWildfire Games

#5709 fcollada build fix for gcc 10 (WritePhysicsRigidBodyInstance) by @pcpa.
ClosedPublic

Authored by wraitii on May 17 2020, 7:12 PM.

Details

Summary

#5709 fcollada build fix for gcc 10 (WritePhysicsRigidBodyInstance) by @pcpa.

Test Plan

Feel free to commandeer.

Event Timeline

Nescio created this revision.May 17 2020, 7:12 PM
Owners added a subscriber: Restricted Owners Package.May 17 2020, 7:12 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2152/display/redirect

Nescio updated the Trac tickets for this revision.May 17 2020, 7:33 PM
Stan requested changes to this revision.May 20 2020, 2:54 PM
Stan added a reviewer: wraitii.
Stan added a subscriber: Stan.

I believe another instance of the FArchiveXML.h file should be updated. Requesting changes so it's not forgotten.

This revision now requires changes to proceed.May 20 2020, 2:54 PM
wraitii commandeered this revision.May 20 2020, 8:23 PM
wraitii updated this revision to Diff 11945.
wraitii edited reviewers, added: Nescio; removed: wraitii.

Incorporate D2749

I don't have GCC 10 or clang 10 though, so not committing for now.

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

Nescio removed a reviewer: Nescio.May 21 2020, 9:42 AM

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?

Nescio updated the Trac tickets for this revision.May 21 2020, 10:29 AM

@elexis, could you test this to see if it solves your clang 10 errors?

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/

Itms added a comment.Jun 23 2020, 10:13 AM

This looks fine, I can test it.

Itms accepted this revision.Jun 23 2020, 4:33 PM

This works well on GCC 10 and clang 10.

Stan resigned from this revision.Jun 23 2020, 5:00 PM
This revision is now accepted and ready to land.Jun 23 2020, 5:00 PM
Stan removed a reviewer: Stan.Jun 23 2020, 5:01 PM

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 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.

This revision was automatically updated to reflect the committed changes.