Troubleshooting Build Problems: Difference between revisions
No edit summary |
No edit summary |
||
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 sandbox and suggested solutions. | ||
== Make Error 1 == | == Make Error 1 == | ||
;Symptom | ;Symptom | ||
On Windows, when attempting to build the Sandbox testapp, 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 24: | Line 24: | ||
;Soultion | ;Soultion | ||
Make sure you have Microsoft Visual Studio 2003 or later installed. | |||
Be sure that you are building from a [http://msdn.microsoft.com/en-us/library/ms235639%28VS.80%29.aspx Visual Studio command prompt]. This ensures that the compiler and linker are on your PATH. | Be sure that you are building from a [http://msdn.microsoft.com/en-us/library/ms235639%28VS.80%29.aspx Visual Studio command prompt]. This ensures that the compiler and linker are on your PATH. | ||
Line 31: | Line 33: | ||
== Make Error 2 == | == Make Error 2 == | ||
;Symptom | ;Symptom | ||
On Windows, when attempting to build the Sandbox testapp, the following error is observed. | |||
<pre> | <pre> | ||
Line 51: | Line 53: | ||
* Remove any directories from your PATH that contain a <tt>bash</tt> shell executable or otherwise prevent <tt>bash</tt> from being found. (e.g. rename its parent directory). | * Remove any directories from your PATH that contain a <tt>bash</tt> shell executable or otherwise prevent <tt>bash</tt> from being found. (e.g. rename its parent directory). | ||
== Make Error 3 == | |||
;Symptom | |||
On Linux, when attempting to build the Sandbox testapp, the following error is observed. | |||
<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> | |||
;Cause | |||
The C++ compiler, <tt>g++</tt> can't be found on your PATH. | |||
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 | |||
Make sure you have a compele GNU Compiler Collection installed. | |||
[[Category:Troubleshooting]] | [[Category:Troubleshooting]] | ||
[[Category:Build Tools]] | [[Category:Build Tools]] |
Revision as of 23:54, 7 May 2010
This page describes several common problems encountered when building a STRIDE TestApp using the sandbox and suggested solutions.
Make Error 1
- Symptom
On Windows, when attempting to build the Sandbox testapp, 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 -wd4996 -wd4702 -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
The compiler, cl.exe can't be found on your PATH.
- Soultion
Make sure you have Microsoft Visual Studio 2003 or later installed.
Be sure that you are building from a Visual Studio command prompt. This ensures that the compiler and linker are on your PATH.
To open a Visual Studio Command prompt:
- Click the Start button, point to All Programs, Microsoft Visual Studio 200X, Visual Studio Tools, and then click Visual Studio 200X Command Prompt.
Make Error 2
- Symptom
On Windows, when attempting to build the Sandbox testapp, the following error is observed.
C:\stride\SDK\Windows\src>..\bin\make.exe TestApp Syntax error: “(” unexpected Syntax error: “(” unexpected Syntax error: end of file unexpected (expecting “then”) make: *** [../out] Error 2
- Cause
This error occurs because gmake on Windows will search for a bash (or csh) anywhere in your PATH when executing shell commands and only default to cmd.exe (DOS shell) when no bash is found. The sandbox Makefile uses DOS shell (cmd) syntax, so when a bash is found on your PATH, this results in gmake submitting a command with DOS syntax to a bash shell which results in the error.
Most commonly, this problem is caused by an installation of Cygwin.
- Solution
- Remove any directories from your PATH that contain a bash shell executable or otherwise prevent bash from being found. (e.g. rename its parent directory).
Make Error 3
- Symptom
On Linux, when attempting to build the Sandbox testapp, the following error is observed.
# 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.