Message Boards Message Boards

Systems-Modeler returns comple error code 2 when building?

GROUPS:

I've been trying to get SystemsModular to build for a few weeks now for mi First Robotics team, and I can't seem to get passed this issue. What steps can I take to solve this?

Building "IntroductoryExamples.HelloWorld" as experiment "HelloWorld 1" started at 15:41:00 [:0:0-0:0] Error: Compilation of generated code failed (exit code 2). Build log:
"Calling Visual C++ setup script "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/Tools/VsDevCmd.bat" -arch=x86" 

** Visual Studio 2017 Developer Command Prompt v15.0.26730.16 ** Copyright (c) 2017 Microsoft Corporation 

Microsoft (R) Program Maintenance Utility Version 14.11.25508.2 Copyright (C) Microsoft Corporation. All rights reserved. 
NMAKE : fatal error U1052: file 'sme.5.0.0_1516221660_24464.makefile' not found Stop. Build finished at 15:41:03 (took 00:02). Error: No executable generated C:/Users/alexj/AppData/Local/Temp/WolframSystemModeler-5.0.0/sme.5.0.0_1516221660_24464.exe

Any help would be appreciated. Thanks.

POSTED BY: Alex Odom
Answer
4 months ago

I think the relevant part of the error is:

NMAKE : fatal error U1052: file 'sme.5.0.0151622166024464.makefile'

Do you get the same error if you goto Tools>Options Global>Compiler and press the Verify button?

If Verify fails, does the mentioned .makefile exist in your build directory (C:/Users/alexj/AppData/Local/Temp/WolframSystemModeler-5.0.0)?

Some antivirus software have special treatment of the temp directory, you could try to switch to custom build directory outside of temp by going to Tools > Options Global > General and select an existing directory that you have write access to as custom build directory.

POSTED BY: Otto Tronarp
Answer
4 months ago

Thanks for your response,

I get the same error when I run the test compile:

NMAKE : fatal error U1052: file 'testcompile1517234633507.makefile' not found
Stop.

The makefile dose exists in the directory give

After switching the build directory out of the Temp directory I still get the same error.

POSTED BY: Alex Odom
Answer
4 months ago

That's odd, the only thing that I can come up with is that your C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/Tools/VsDevCmd.bat (the script that setup the environment for Visual Studio) for some reason changes the working directory.

We can test that, if you look in the directory where you have installed SystemModeler there is a file SystemFiles\Scripts\CompileVC.bat. Could you replace that with this CompileVC.bat that has some debug prints in it and post the output from a build attempt here.

POSTED BY: Otto Tronarp
Answer
4 months ago

Group Abstract Group Abstract