Message Boards Message Boards

'SystemModelSimulate' as part of Wolfram Desktop Version-12 gives error!

Posted 4 years ago

Dear All,

I tried to run the basic SystemModel command such as *https://wolfram.com/xid/0bh0k3cbt0fbpw-j4mifd* using Mathematica-version 12 on MacBook Pro with OS-X Catalina.

But when I run this, I get error: SystemModelSimulate: Failed to build model ...........

Is it due to to the setting of C-Compiler on MacBook Pro.

I don't have a VS Studio installed but only X-Code. Do I have to install VS Studio for SystemModelSimulate to work on OS-X.

POSTED BY: Vijay Sharma
8 Replies

Vijay,

I thought you already followed Ankit's suggestion of manually configuring the compiler, but now when I read the log output again it seems that hasn't been done successfully. The isysroot argument is wrong here.

 "Log" -> {"\"/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/clang++\" -isysroot \
\"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.\
platform/Developer/SDKs/DriverKit19.0.sdk\" -m64 -stdlib=libc++ -fPIC \

SystemModeler 12.0 cannot detect Xcode11 correctly so you need to configure it manually (or upgrade to SystemModeler 12.1) You should follow the instructions on this support page https://support.wolfram.com/48717.

Otto

POSTED BY: Otto Tronarp

Otto,

I did the insall of xcode through above command and still the verify compiler is failing! Any tips further here?

POSTED BY: Vijay Sharma

Start Xcode as Mike suggests and see if it wants/needs to install any updates or if you ned to accept the license. If that doesn't help you can always try and install the command line tools instead. In a terminal run:

xcode-select --install

Otto

POSTED BY: Otto Tronarp
Posted 4 years ago

In the past when I have had similar issues, I have sometimes been able to fix it by "accepting the xcode license". You can do that either through the UI (by running xcode) or at the command line using:

sudo xcodebuild -license

and following the directions.

I usually have to accept the license with every new release of xcode.

Good luck.

POSTED BY: Mike Besso

Malte,

I tried to infer the error but couldn't make any progress.

I am copying the output of the log as below:

<|"Success" -> False, 
 "Log" -> {"\"/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/clang++\" -isysroot \
\"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.\
platform/Developer/SDKs/DriverKit19.0.sdk\" -m64 -stdlib=libc++ -fPIC \
-std=c++98 -c -I. -I\"/Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include\" -I\"/Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/platform/osx64\" -I\"/Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/sundials\" -I\"/Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/fmil\" -I\"/Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/msl/3.2.2\" \
testcompile1590750355429_main.cpp -o testcompile1590750355429_main.o",
    "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:14:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/string:504:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/string_view:175:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__string:56:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/algorithm:641:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:71:9: \
error: no member named 'strcpy' in the global namespace", 
   "using ::strcpy;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:73:9: \
error: no member named 'strcat' in the global namespace", 
   "using ::strcat;", "      ~~^", 
   "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:14:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/chrono:797:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:57:9: error: \
no member named 'clock_t' in the global namespace; did you mean \
'clockid_t'?", "using ::clock_t;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.\
platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/usr/\
include/time.h:99:3: note: 'clockid_t' declared here", "} clockid_t;",
    "  ^", "In file included from \
testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:14:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/chrono:797:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:59:9: error: \
no member named 'time_t' in the global namespace; did you mean \
'size_t'?", "using ::time_t;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.\
platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/usr/\
include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here", 
   "typedef __darwin_size_t        size_t;", 
   "                               ^", 
   "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:14:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/chrono:797:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:60:9: error: \
no member named 'tm' in the global namespace", "using ::tm;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:64:9: error: \
no member named 'clock' in the global namespace", "using ::clock;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:65:9: error: \
no member named 'difftime' in the global namespace", 
   "using ::difftime;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:66:9: error: \
no member named 'mktime' in the global namespace", "using ::mktime;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:67:9: error: \
no member named 'time' in the global namespace", "using ::time;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:69:9: error: \
no member named 'asctime' in the global namespace", 
   "using ::asctime;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:70:9: error: \
no member named 'ctime' in the global namespace", "using ::ctime;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:71:9: error: \
no member named 'gmtime' in the global namespace", "using ::gmtime;", 
   "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:72:9: error: \
no member named 'localtime' in the global namespace", 
   "using ::localtime;", "      ~~^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:74:9: error: \
no member named 'strftime' in the global namespace", 
   "using ::strftime;", "      ~~^", 
   "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:14:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/chrono:1551:12: \
error: unknown type name 'time_t'; did you mean 'size_t'?", 
   "    static time_t     to_time_t  (const time_point& __t) \
_NOEXCEPT;", "           ^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:58:9: note: \
'size_t' declared here", "using ::size_t;", "        ^", 
   "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:14:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/chrono:1552:35: \
error: unknown type name 'time_t'; did you mean 'size_t'?", 
   "    static time_point from_time_t(time_t __t) _NOEXCEPT;", 
   "                                  ^", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:58:9: note: \
'size_t' declared here", "using ::size_t;", "        ^", 
   "In file included from testcompile1590750355429_main.cpp:1:", 
   "In file included from ./testcompile1590750355429_header.h:12:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm.h:13:", 
   "In file included from /Applications/Wolfram \
Desktop.app/Contents/SystemFiles/Components/WSMCore/WSMCore.app/\
Contents/MacOS/../include/wsmm_log_cpp.h:9:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/sstream:173:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ostream:137:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/ios:215:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__locale:17:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/mutex:190:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__mutex_base:15:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/system_error:145:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/__errc:104:", 
   "In file included from \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.\
xctoolchain/usr/bin/../include/c++/v1/cerrno:26:", 
   "/Applications/Xcode.app/Contents/Developer/Toolchains/\
XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/errno.h:31:15: \
fatal error: 'errno.h' file not found", "#include_next <errno.h>", 
   "              ^~~~~~~~~", "17 errors generated.", 
   "*** Error code 1", "", 
   "Stop in \
/private/var/folders/4s/dyrt2hks0rzddrrx7l_kqz5r0000gn/T/\
WolframSystemModeler-12.0."}|>
---------------------------------------------
POSTED BY: Vijay Sharma

Since you are on macOS, XCode is what you should be using. Visual Studio is only for Windows. You say it fails when running:

SystemModelConfiguration`VerifyCompiler[]

What result are you getting from that command? It should include the logs from the verification, which should tell us more about what isn't working.

POSTED BY: Malte Lenz

Thank you, Ankit! I tried the above command and the reference document procedure. But still, the compiler is not getting configured correctly. I do have Xcode installed.

When I run this: SystemModelConfiguration`VerifyCompiler[] it fails.

Should I switch to VScode?

POSTED BY: Vijay Sharma

Hi Vijay,

It looks like a compiler issue.

Can you try to evaluate the following command and see if it fixes your problem:

SystemModel;
opts=SystemModelConfiguration`ListCompilers[]
newopts=Replace[opts[[1]],Verbatim[Rule]["PlatformSDKPath",_]"PlatformSDKPath"->"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk",{1}]
SystemModelConfiguration`SetConfiguration["Compiler",newopts]

Here are some references: https://reference.wolfram.com/language/tutorial/CompilerForSystemModeling.html https://support.wolfram.com/48717

POSTED BY: Ankit Naik
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract