A "build" generally refers to the complete process of turning your code and other associated resources into a distributable package whereas "compiling" is just converting the source code to an executable format. In this case, your compilation failed. Since that is one step of the build process, then you can also say the build failed.
Are you also asking how to fix that error? The answer is simply don't declare the same variable multiple times in the same context.