Travis Build Failures in Robot WB

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
wandererfan
Posts: 3323
Joined: Tue Nov 06, 2012 5:42 pm

Travis Build Failures in Robot WB

Postby wandererfan » Tue Sep 24, 2019 11:40 am

I see a couple of Travis failures in gcc/py2 builds - PR2552 and
PR2551 - that are related to Robot WB.

Should we be concerned?

Code: Select all

CMakeFiles/Robot.dir/Robot6Axis.cpp.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
src/Mod/Robot/App/CMakeFiles/Robot.dir/build.make:1262: recipe for target 'Mod/Robot/Robot.so' failed
make[2]: *** [Mod/Robot/Robot.so] Error 1
CMakeFiles/Makefile2:2978: recipe for target 'src/Mod/Robot/App/CMakeFiles/Robot.dir/all' failed
make[1]: *** [src/Mod/Robot/App/CMakeFiles/Robot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
vocx
Posts: 2334
Joined: Thu Oct 18, 2018 9:18 pm

Re: Travis Build Failures in Robot WB

Postby vocx » Wed Sep 25, 2019 12:10 am

wandererfan wrote:
Tue Sep 24, 2019 11:40 am

Should we be concerned?
Robot hasn't been touched by people in years. Werner recently edited a few things to force strict ISO C++ compliance.

https://github.com/FreeCAD/FreeCAD/comm ... 63f54f375c

Before that, I remember pull request #2428, just to remove compiler warnings, nothing major.

But other than that, Robot compiles fine. It's only in Travis that it fails. Also, no error message with a specific line of code, just "File truncated". What does this mean?

File not recognized: File truncated GCC error
Kostyantyn Ivanov wrote: Just remove the object file.

This error most likely appeared after the previous build was interrupted and object file was not generated completely.
marcv81 wrote: Your CI system should not run incremental builds. Developers cannot afford to wait for a clean build after every edit; conversely a CI system cannot afford the lack of reliability inherent to incremental builds.
I don't think FreeCAD uses incremental builds, but maybe somebody should check? Who's responsible?
Rainer wrote: Another problem (with the same error) could be, that you are using the ccache for faster compilation. In this case, the corrupt *.o file is there as well. So for that reason you have to clean the cache with

ccache -C (note the upper case C!)
I think FreeCAD does use ccache in Travis, no?
wmayer
Site Admin
Posts: 15122
Joined: Thu Feb 19, 2009 10:32 am

Re: Travis Build Failures in Robot WB

Postby wmayer » Wed Sep 25, 2019 11:30 am

I also think it's a problem with ccache and that the object file is broken for some reason. Years ago I had a similar problem with ccache and I ended up in disabling ccache and removing its directory.

What we could try is to slightly modify the file Robot6Axis.cpp in the hope that the object file will be re-created.
User avatar
sgrogan
Posts: 5530
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis Build Failures in Robot WB

Postby sgrogan » Wed Sep 25, 2019 1:05 pm

wmayer wrote:
Wed Sep 25, 2019 11:30 am
What we could try is to slightly modify the file Robot6Axis.cpp in the hope that the object file will be re-created.
I have permissions to delete the cache if desired. Let me know.
wmayer
Site Admin
Posts: 15122
Joined: Thu Feb 19, 2009 10:32 am

Re: Travis Build Failures in Robot WB

Postby wmayer » Wed Sep 25, 2019 1:49 pm

git commit d40b4f66a improves some white spaces of Robot6Axis.cpp.
If the build then still fails please go ahead and clean-up the cache.
triplus
Posts: 8835
Joined: Mon Dec 12, 2011 4:45 pm

Re: Travis Build Failures in Robot WB

Postby triplus » Wed Sep 25, 2019 3:49 pm

Yes, this is a problem with ccache. Whenever "File truncated" issue is detected in the log file on Travis:
sgrogan wrote:
Wed Sep 25, 2019 1:05 pm
I have permissions to delete the cache if desired. Let me know.
This should resolve it. A bit of background, on why such issue can occur from time to time:

https://forum.freecadweb.org/viewtopic.php?f=4&t=38657

Bionic (GCC) toolchain is slightly slower, compared to the Trusty one. 2 h 30 min time limit, currently set, therefore isn't enough anymore, to compile FreeCAD. A workaround is currently being used, that forcefully stops the build procedure at around 2 h 15 min. That gives Travis enough time to still upload created ccache. Restarting the build, or one of the next scheduled builds, will be able to use the existing ccache, and to complete faster. Now one of the possible issues, forcibly terminnating the build, can be the mentioned issue. On a local build such file can simply get deleted, on Travis, the easiest solution is to clear ccache.

P.S. Ideally somebody will ask Travis people if they can extend the time limit to 3 h. If granted, the workaround can get removed and we get to compile FreeCAD again without such potential issues. That is until FreeCAD grows again, and exceeds 3 h limit. ;)