Troubleshooting Build Problems: Difference between revisions
(Created page with 'This page describes several common problems encountered when building a STRIDE Testapp using the Windows sandbox and suggested solutions. == Make Error 1 == ;Symptom When attemp…') |
No edit summary |
||
(29 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This page describes several common problems encountered when building a STRIDE | This page describes several common problems encountered when building a STRIDE TestApp using the [[Stride_Sandbox | Off-Target Environment]] and suggested solutions. | ||
== Make Error 1 == | == Make Error 1 == | ||
;Symptom | ;Symptom | ||
On Windows, when attempting to build the testapp from the command line, you encounter an error indicating that: | |||
<pre> | <pre> | ||
‘cl’ is not recognized as an internal or external command, | ‘cl’ is not recognized as an internal or external command, | ||
Line 12: | Line 12: | ||
<pre> | <pre> | ||
C:\STRIDE\SDK\Windows\src>..\bin\make.exe testapp | C:\STRIDE\SDK\Windows\src>..\bin\make.exe testapp | ||
cl -c -nologo -W4 | cl -c -nologo -W4 -D_UNICODE -DUNICODE -DWIN32 -D_CONSOLE -DUNDER_NT -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../o | ||
ut/src” -I”../sample_src” -GS -Zi -DNDEBUG -MD -O2 -D_LIB -DSTRIDE_STATIC -Fd”../out/desktop-Windows_NT-obj//cl.pdb” -Fo”../out/desktop-Windows_NT-o | ut/src” -I”../sample_src” -GS -Zi -DNDEBUG -MD -O2 -D_LIB -DSTRIDE_STATIC -Fd”../out/desktop-Windows_NT-obj//cl.pdb” -Fo”../out/desktop-Windows_NT-o | ||
bj/srapi.o” ”../../Runtime/srapi.c” | bj/srapi.o” ”../../Runtime/srapi.c” | ||
Line 21: | Line 21: | ||
;Cause | ;Cause | ||
Microsoft Visual Studio 2008 or later is not installed or you are not building from a [http://msdn.microsoft.com/en-us/library/ms235639(v=VS.90).aspx Visual Studio Command Prompt]. | |||
;Soultion | ;Soultion | ||
Make sure you have Microsoft Visual Studio 2008 or later installed. | |||
To open a Visual Studio Command prompt: | To ensures that the compiler and linker are on your PATH open a Visual Studio Command prompt: | ||
* Click the Start button, point to All Programs, Microsoft Visual Studio | * Click the Start button, point to All Programs, Microsoft Visual Studio 20XX, Visual Studio Tools, and then click Visual Studio 20XX Command Prompt. | ||
== Make Error 2 == | == Make Error 2 == | ||
;Symptom | ;Symptom | ||
On Windows, when attempting to build the testapp from the command line the following errors are observed: | |||
<pre> | <pre> | ||
syntax error near unexpected token `(' | |||
syntax error near unexpected token `(' | |||
syntax error: unexpected end of file | |||
</pre> | |||
For example: | |||
<pre> | |||
C:\stride\SDK\Windows\src>..\bin\make testapp | |||
/bin/sh: -c: line 0: syntax error near unexpected token `(' | |||
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir "../out/src") ELSE mkdir "../out" && mkdir "../out/src".' | |||
/bin/sh: -c: line 0: syntax error near unexpected token `(' | |||
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir "../out/src") ELSE mkdir "../out" && mkdir "../out/src".' | |||
/bin/sh: -c: line 1: syntax error: unexpected end of file | |||
make: *** [cleanapp] Error 258 | |||
</pre> | |||
;Cause | |||
This error occurs because gnu make on Windows will search for an Unix shell (<tt>sh</tt>, <tt>bash</tt> or <tt>csh</tt>) anywhere in your PATH when executing shell commands and only default to DOS shell (<tt>cmd.exe</tt>) when no Unix shell is found. The sandbox Makefile uses DOS shell syntax, so when a Unix shell is found on your PATH, this results to errors like above. | |||
Most commonly, this problem is caused by an installation of [http://en.wikipedia.org/wiki/Cygwin Cygwin], though it can also be caused by an installation of the QNX Software Development Platform. | |||
;Solution | |||
Explicitly specify the DOS shell by invoking make like: | |||
<pre> | |||
..\bin\make SHELL=%ComSpec% testapp | |||
</pre> | |||
'''''Note:''' the value of %ComSpec% should be <tt>C:\Windows\system32\cmd.exe</tt>'' | |||
An alternative is to remove any directories from your PATH that contain an Unix shell executable or otherwise prevent such from being found. (e.g. rename its parent directory). | |||
== Make Error 3 == | |||
;Symptom | |||
On Linux, when attempting to build the testapp from the command line, the following error is observed: | |||
<pre> | |||
g++: command not found | |||
</pre> | |||
For example: | |||
<pre> | |||
# make testapp | |||
g++ -c -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../out/src” -I”../sample_src” -fPIC -D_DEBUG -O0 -g3 -Wall -o ”../out/i386-Linux-obj/srtestpp.obj” ”../../Runtime/srtestpp.cpp” | |||
/bin/sh: g++: command not found | |||
make: *** [../out/i386-Linux-obj/srtestpp.obj] Error 127 | |||
</pre> | </pre> | ||
;Cause | ;Cause | ||
The C++ compiler, <tt>g++</tt> can't be found on your PATH. | |||
Most commonly, this problem is caused by | Most commonly, this problem is caused by not having a complete installation of [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection]. | ||
;Solution | ;Solution | ||
Make sure you have a compele GNU Compiler Collection installed. | |||
== Make Error 4 == | |||
;Symptom | |||
When building the testapp from the command line, you see the following compiler errors: | |||
<pre> | |||
../out/src/strideIM.cpp(50) : error C3861: '_srTestResultCountReset': identifier not found | |||
../out/src/strideIM.cpp(54) : error C3861: '_srTestSendFinalStatus': identifier not found | |||
../out/src/strideIM.cpp(56) : error C3861: '_srTestAddToTotal': identifier not found | |||
../out/src/strideIM.cpp(56) : error C3861: '_srTestResultGetTotals': identifier not found | |||
... | |||
... | |||
... | |||
</pre> | |||
;Cause | |||
You are using an outdated version of the STRIDE build tools. | |||
You can see which version of the tools were used to generate your STRIDE sources by looking at the top of the strideIM.cpp source file. The comment block at the top of the file shows this version. | |||
;Solution | |||
Remove the old tools and/or change your path so that the current tools are used. | |||
[[Category: | [[Category:Installation]] |
Latest revision as of 17:36, 2 April 2018
This page describes several common problems encountered when building a STRIDE TestApp using the Off-Target Environment and suggested solutions.
Make Error 1
- Symptom
On Windows, when attempting to build the testapp from the command line, you encounter an error indicating that:
‘cl’ is not recognized as an internal or external command, operable program or batch file.
For example:
C:\STRIDE\SDK\Windows\src>..\bin\make.exe testapp cl -c -nologo -W4 -D_UNICODE -DUNICODE -DWIN32 -D_CONSOLE -DUNDER_NT -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../o ut/src” -I”../sample_src” -GS -Zi -DNDEBUG -MD -O2 -D_LIB -DSTRIDE_STATIC -Fd”../out/desktop-Windows_NT-obj//cl.pdb” -Fo”../out/desktop-Windows_NT-o bj/srapi.o” ”../../Runtime/srapi.c” ‘cl’ is not recognized as an internal or external command, operable program or batch file. make: *** [../out/desktop-Windows_NT-obj/srapi.o] Error 1
- Cause
Microsoft Visual Studio 2008 or later is not installed or you are not building from a Visual Studio Command Prompt.
- Soultion
Make sure you have Microsoft Visual Studio 2008 or later installed.
To ensures that the compiler and linker are on your PATH open a Visual Studio Command prompt:
- Click the Start button, point to All Programs, Microsoft Visual Studio 20XX, Visual Studio Tools, and then click Visual Studio 20XX Command Prompt.
Make Error 2
- Symptom
On Windows, when attempting to build the testapp from the command line the following errors are observed:
syntax error near unexpected token `(' syntax error near unexpected token `(' syntax error: unexpected end of file
For example:
C:\stride\SDK\Windows\src>..\bin\make testapp /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir "../out/src") ELSE mkdir "../out" && mkdir "../out/src".' /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir "../out/src") ELSE mkdir "../out" && mkdir "../out/src".' /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** [cleanapp] Error 258
- Cause
This error occurs because gnu make on Windows will search for an Unix shell (sh, bash or csh) anywhere in your PATH when executing shell commands and only default to DOS shell (cmd.exe) when no Unix shell is found. The sandbox Makefile uses DOS shell syntax, so when a Unix shell is found on your PATH, this results to errors like above.
Most commonly, this problem is caused by an installation of Cygwin, though it can also be caused by an installation of the QNX Software Development Platform.
- Solution
Explicitly specify the DOS shell by invoking make like:
..\bin\make SHELL=%ComSpec% testapp
Note: the value of %ComSpec% should be C:\Windows\system32\cmd.exe
An alternative is to remove any directories from your PATH that contain an Unix shell executable or otherwise prevent such from being found. (e.g. rename its parent directory).
Make Error 3
- Symptom
On Linux, when attempting to build the testapp from the command line, the following error is observed:
g++: command not found
For example:
# make testapp g++ -c -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../out/src” -I”../sample_src” -fPIC -D_DEBUG -O0 -g3 -Wall -o ”../out/i386-Linux-obj/srtestpp.obj” ”../../Runtime/srtestpp.cpp” /bin/sh: g++: command not found make: *** [../out/i386-Linux-obj/srtestpp.obj] Error 127
- Cause
The C++ compiler, g++ can't be found on your PATH.
Most commonly, this problem is caused by not having a complete installation of GNU Compiler Collection.
- Solution
Make sure you have a compele GNU Compiler Collection installed.
Make Error 4
- Symptom
When building the testapp from the command line, you see the following compiler errors:
../out/src/strideIM.cpp(50) : error C3861: '_srTestResultCountReset': identifier not found ../out/src/strideIM.cpp(54) : error C3861: '_srTestSendFinalStatus': identifier not found ../out/src/strideIM.cpp(56) : error C3861: '_srTestAddToTotal': identifier not found ../out/src/strideIM.cpp(56) : error C3861: '_srTestResultGetTotals': identifier not found ... ... ...
- Cause
You are using an outdated version of the STRIDE build tools.
You can see which version of the tools were used to generate your STRIDE sources by looking at the top of the strideIM.cpp source file. The comment block at the top of the file shows this version.
- Solution
Remove the old tools and/or change your path so that the current tools are used.