Xojo crashes out with a PreBuildScript on Linux

I have just updated to 2017r2 and now my project causes Xojo to crash and exit when I try to build and run a project with a PreBuildScript.
When I run Xojo from the console the error reported is
/opt/xojo/xojo2017r2/Xojo: symbol lookup error: /opt/xojo/xojo2017r2/Xojo Libs/libRBScript.so: undefined symbol: _Z9AddPassesRN4llvm6TripleERK19OptimizationOptionsRNS_6legacy15PassManagerBaseEPNS5_19FunctionPassManagerE

The PreBuildScript is quite simple
Dim version As String
version = PropertyValue(“App.MajorVersion”) + “.” + _
PropertyValue(“App.MinorVersion”) + “.” + _
PropertyValue(“App.BugVersion”) + “b” + _
PropertyValue(“App.ShortVersion”) = version

DoCommand “SaveFile”

A PostBuildScript also triggers the crash and exit.

Have you tried it without the script?

Yes, that’s how I know that it is due to running the script. When I disable it, it builds OK. This only affects builds on Linux. I also build on Windows and Mac, both of those platforms do not have problems running build scripts.

The post-build script is more complicated and permanently disabling it would be a pain.