Building Singularity RDK 2.0

Dec 5, 2008 at 10:33 PM

Hi! I've downloaded RDK 2.0, unzipped it and set the environment. However I can't build it because I get the following: "'msb' is not recognized as an internal or enternal cimmand, operable program or a batch file." when  running "msb Distro\World.proj" though MSBuild is installed with Visual Studio.

Thank you.

Dec 6, 2008 at 4:36 AM
You can run the "msb" command only after you run setenv.cmd in directory "base".
Or you must specify full path of msb.
Dec 6, 2008 at 11:02 AM
I know. And running setenv.cmd in directory "base" doesn't change the situation. 
Coordinator
Dec 6, 2008 at 5:35 PM
Hi ermin. If you've run the setenv.cmd script, you should be able to run msb. If not, please delete the "@echo off" from the top of setenv.cmd, then run it again and paste the output here. It's possible that it's failing on your system for some reason. Also try temporarily moving the directory to a different path - something like c:\temp - and see if it works there. Thanks.
--
Derrick Coetzee
Microsoft Research Operating Systems Group developer
Dec 6, 2008 at 7:24 PM

Changing directory didn.t help. And here's the output  after removing "@echo off":

echo.'Platform' value "" is not currently available.

exit /b 1
) else if . == .Smdk2410 (
rem
rem ARM support temporarily removed.
echo.'Platform' value "" is not currently available.
exit /b 1
) else (
if . == .Yes (
echo.Missing or invalid 'Platform' value: ""
exit /b 1
)
set PLATFORM=ApicMP
set PROCESSOR=x86
set DEFAULT_CODE_GENERATOR=BARTOK
)

C:\Singularity\base>set TITLE=base Debug ApicMP

C:\Singularity\base>if . == .MarkSweep (set KERNEL_GC=Kms ) else if . == .Concu
rrent (set KERNEL_GC=Kcc ) else if . == .Semispace (
set KERNEL_GC=Kss
rem
) else if . == .Null (
set TITLE=base Debug ApicMP Knl
rem
) else if . == .Null (
set TITLE=base Debug ApicMP Knl
rem
) else (
if . == .Yes (
echo.Missing or invalid COLLECTOR_KERNEL value: "COLLECTOR_KERNEL"
exit /b 1
)
set COLLECTOR_KERNEL=Concurrent
set KERNEL_GC=Kcc
)

C:\Singularity\base>set TITLE=base Debug ApicMP Kcc

C:\Singularity\base>if . == .MarkSweep (rem) else if . == .Concurrent (
rem Currently broken - see internal bug 60
rem
rem set TITLE=base Debug ApicMP Kcc Pcc
echo.COLLECTOR_APP value "" is not currently available.
exit /b 1
) else if . == .Semispace (
rem Currently broken - see internal bug 63
rem
rem set TITLE=base Debug ApicMP Kcc Pss
echo.COLLECTOR_APP value "" is not currently available.
exit /b 1
) else if . == .Null (
rem
set TITLE=base Debug ApicMP Kcc Pnl
) else (
if . == .Yes (
echo.Missing or invalid COLLECTOR_APP value: ""
exit /b 1
)
set COLLECTOR_APP=MarkSweep
)

C:\Singularity\base>if . == .Min (rem) else if . == .Affinity (rem) else (
if . == .Yes (
echo.Missing or invalid SCHEDULER value: ""
exit /b 1
)
set SCHEDULER=Min
)

C:\Singularity\base>set TITLE=base Debug ApicMP Kcc Min

C:\Singularity\base>if . == .On (
rem Currently broken - see internal bug 75
rem set PAGING_FLAG=.Paging
rem set TITLE=base Debug ApicMP Kcc Min Paging
echo.PAGING value "" is not currently available.
exit /b 1
) else if . == .Off (set PAGING_FLAG= ) else (
rem Currently only one option - see internal bug 75
rem if .==.Yes (
rem echo.Missing or invalid PAGING value: ""
rem exit /b 1
rem )
set PAGING=Off
set PAGING_FLAG=
)

C:\Singularity\base>if not defined CODE_GENERATOR_BUILD set CODE_GENERATOR_BUILD
=

C:\Singularity\base>if not defined CODE_GENERATOR_RUNTIME set CODE_GENERATOR_RUN
TIME=

C:\Singularity\base>if . == .BARTOK (rem) else if . == .PHXBRIDGE (
rem Currently broken - see internal bug 65
rem
echo.CODE_GENERATOR value "" is not currently available.
exit /b 1
) else (
rem if .==.Yes (
rem echo.Missing or invalid 'CODE_GENERATOR' value: "CODE_GENERATOR"
rem exit /b 1
rem )
set CODE_GENERATOR=BARTOK
)

C:\Singularity\base>if .DEBUG == .DEBUG (rem) else if .DEBUG == .TEST (rem) el
se if .DEBUG == .RELEASE (rem) else (
rem if .==.Yes (
rem echo.Missing or invalid CODE_GENERATOR_BUILD value: "CODE_GENERATOR_BUIL
D"
rem exit /b 1
rem )
if .BARTOK == .BARTOK (set CODE_GENERATOR_BUILD=DEBUG ) else if .BARTOK == .PH
XBRIDGE (set CODE_GENERATOR_BUILD=RELEASE )
)

C:\Singularity\base>if . == .CLR (rem) else if . == .SELFHOST1 (rem) else (
rem if .==.Yes (
rem echo.Missing or invalid CODE_GENERATOR_RUNTIME value: ""
rem exit /b 1
rem )
if .BARTOK == .BARTOK (set CODE_GENERATOR_RUNTIME=CLR ) else if .BARTOK == .PH
XBRIDGE (if .DEBUG == .RELEASE (set CODE_GENERATOR_RUNTIME=SELFHOST1 ) else if
.DEBUG == .TEST (set CODE_GENERATOR_RUNTIME=CLR ) else if .DEBUG == .DEBUG (set
CODE_GENERATOR_RUNTIME=CLR ) )
)

C:\Singularity\base>if not exist "C:\Singularity\base\build\x86_x86\BARTOK\DEBUG
\CLR\bartok.exe" (
echo.Requested compiler does not exist:
echo "C:\Singularity\base\build\x86_x86\BARTOK\DEBUG\CLR\bartok.exe"
exit /b 1
)

C:\Singularity\base>rem Tread with fear -- the CMD "rules" for escaping characte
rs would

C:\Singularity\base>rem make Cthulhu cry. Notably, how escape characters are in
terpreted

C:\Singularity\base>rem varies, depending on whether or not you are within a ( )
context.

C:\Singularity\base>rem Note: We set several variables in Ide.targets, but notab
ly we omit

C:\Singularity\base>rem Configuration and Platform. This is because the VS IDE
allows

C:\Singularity\base>rem you to select these values. For the others (GC), there
is no way

C:\Singularity\base>rem to do this in the IDE.

C:\Singularity\base>if "" == "On" (
rem Temporarily disable delayed expansion so that the exclamation
rem points (!'s) are not interpretted as variables
setlocal DISABLEDELAYEDEXPANSION
echo Creating C:\Singularity\base\Targets\Ide.targets
(
echo <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
echo <!-- Do not directly edit this file. Use "setenv /vs" to create this file
. -->
echo <!-- DO NOT CHECK IN THIS FILE! -->
echo <PropertyGroup>
echo <SINGULARITY_ROOT>C:\Singularity\base</SINGULARITY_ROOT>
echo <SINGULARITY_OBJROOT>C:\Singularity\base.obj</SINGULARITY_OBJROOT>
echo <COLLECTOR_APP>MarkSweep</COLLECTOR_APP>
echo <COLLECTOR_KERNEL>Concurrent</COLLECTOR_KERNEL>
echo </PropertyGroup>
echo </Project>
) 1>"C:\Singularity\base\Targets\Ide.targets"
endlocal
)

C:\Singularity\base>if not defined BuildInParallel set BuildInParallel=false

C:\Singularity\base>goto :finale

C:\Singularity\base>set SINGULARITY_PATH=C:\Singularity\base;C:\Singularity\base
\build;C:\Singularity\base\build\x86_x86

C:\Singularity\base>if exist "C:\Singularity\base\internal\build" (set SINGULARI
TY_PATH=C:\Singularity\base;C:\Singularity\base\build;C:\Singularity\base\build\
x86_x86;C:\Singularity\base\internal\build )

C:\Singularity\base>set PATH=C:\Singularity\base;C:\Singularity\base\build;C:\Si
ngularity\base\build\x86_x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Micr
osoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\B
inn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\ID
E\PrivateAssemblies\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files
\Microsoft SQL Server\90\Tools\binn\;c:\debuggers

C:\Singularity\base>set SINGULARITY_DISTRO_SUFFIX=Debug.BARTOK.ApicMP.MarkSweep.
Min.Concurrent.

C:\Singularity\base>set SINGULARITY_BUILD_SETTINGS=C:\Singularity\base.obj\Setti
ngs\Debug.BARTOK.ApicMP.MarkSweep.Min.Concurrent..cmd

C:\Singularity\base>set INCLUDE=

C:\Singularity\base>set LIB=

C:\Singularity\base>if not defined NO_SINGULARITY_WINDOW_TITLE (title base Debug
ApicMP Kcc Min )

C:\Singularity\base>set NO_SINGULARITY_WINDOW_TITLE=

C:\Singularity\base>set NO_SINGULARITY_DEFAULTS=

C:\Singularity\base>set _create_vs_targets=

C:\Singularity\base>rem BUILDTYPE becomes Configuration in the MSBuild projects.


C:\Singularity\base>rem For now, we continue to set BUILDTYPE so that the makefi
les still work.

C:\Singularity\base>set BUILDTYPE=Debug

C:\Singularity\base>echo ** Singularity Build Environment:
** Singularity Build Environment:

C:\Singularity\base>echo ** Distribution: BVT
** Distribution: BVT

C:\Singularity\base>echo ** Source Directory: C:\Singularity\base
** Source Directory: C:\Singularity\base

C:\Singularity\base>echo ** Object Directory: C:\Singularity\base.obj
** Object Directory: C:\Singularity\base.obj

C:\Singularity\base>echo ** Build Type: Debug
** Build Type: Debug

C:\Singularity\base>echo ** Target Platform: ApicMP
** Target Platform: ApicMP

C:\Singularity\base>echo ** Target Processor: x86
** Target Processor: x86

C:\Singularity\base>echo ** Code Generator: BARTOK
** Code Generator: BARTOK

C:\Singularity\base>echo ** CodeGen Build: DEBUG
** CodeGen Build: DEBUG

C:\Singularity\base>echo ** CodeGen Runtime: CLR
** CodeGen Runtime: CLR

C:\Singularity\base>echo ** Kernel Collector: Concurrent
** Kernel Collector: Concurrent

C:\Singularity\base>echo ** Process Collector: MarkSweep
** Process Collector: MarkSweep

C:\Singularity\base>echo ** Scheduler: Min
** Scheduler: Min

C:\Singularity\base>rem Currently broken - see internal bug 75

C:\Singularity\base>rem echo ** Page Translation: Off

C:\Singularity\base>echo ** Generate ABI Shim:
** Generate ABI Shim:

C:\Singularity\base>rem Currently broken - see internal bug 7

C:\Singularity\base>rem echo ** Linked Stacks: false

C:\Singularity\base>echo ** Stack Checks: true
** Stack Checks: true

C:\Singularity\base>if "true" == "true" (echo ** Generate CD-ROM: On ) els
e (echo ** Generate CD-ROM: Off )
** Generate CD-ROM: On

C:\Singularity\base>if "" == "true" echo ** Build option: Stop at the fi
rst project failure. (/failearly)

C:\Singularity\base>if "" == "true" echo ** Build option: Show full sour
ce file path. (/fullpaths)

C:\Singularity\base>if "" == "true" echo ** Build option: Kernel will NO
T be built. (/skipkernel)

C:\Singularity\base>if "" == "true" echo ** Build option: Apps will NOT
be built. (/skipapps)

C:\Singularity\base>if /I "false" == "true" echo ** Build option: Parall
el builds are enabled. (/parallel)

C:\Singularity\base>cd /d C:\Singularity\base

C:\Singularity\base>if not "" == "" call
C:\Singularity\base>

Coordinator
Dec 6, 2008 at 7:30 PM
Hmm, okay, that wasn't quite the complete output - you probably exceeded your scrollback buffer. Try redirecting output to a file. Also, it'd be great if I could get your environment (type "set" to view this). It's possible something in your path environment variable is causing setenv to incorrectly update the path. Thanks!
--
Derrick Coetzee
Microsoft Research Operating Systems Group developer
Dec 6, 2008 at 7:49 PM

My environment:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Erik\Application Data
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=MATFAK
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Erik
LOGONSERVER=\\MATFAK
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Mi
crosoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS
\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\
WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\90
\Tools\binn\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 8, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f08
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Erik\LOCALS~1\Temp
TMP=C:\DOCUME~1\Erik\LOCALS~1\Temp
USERDOMAIN=MATFAK
USERNAME=Erik
USERPROFILE=C:\Documents and Settings\Erik
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\WINDOWS

P.S.: setenv.cmd output was complete. 

Dec 17, 2008 at 9:24 PM
'msb' works fine for Singularity RDK 1.1
Dec 18, 2008 at 12:58 AM
Hi, Erik!

Can you give us the location folder of  "msb" executable on your system?
Dec 29, 2008 at 12:20 PM

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

C:\WINDOWS\Microsoft.NET\Framework\v3.5

Coordinator
Jan 2, 2009 at 11:50 PM
Hi Erik, sorry for the slow response. I'm afraid I still don't understand what's going on in your situation - you are correct that setenv ran to completion, and based on your setenv output, your path was set, but according to your set output, it wasn't. Are you sure you typed "set" *after* running setenv?
--
Derrick Coetzee
Microsoft Research Operating Systems Group developer

Jan 3, 2009 at 9:28 AM

My environment after running %ComSpec% /k setenv.cmd

ALLUSERSPROFILE=C:\Documents and Settings\All Users

APPDATA=C:\Documents and Settings\Erik\Application Data
BuildInParallel=false
BUILDTYPE=Debug
CLIENTNAME=Console
CODE_GENERATOR=BARTOK
CODE_GENERATOR_BUILD=DEBUG
CODE_GENERATOR_RUNTIME=CLR
COLLECTOR_APP=MarkSweep
COLLECTOR_KERNEL=Concurrent
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=MATFAK
ComSpec=C:\WINDOWS\system32\cmd.exe
Configuration=Debug
DEFAULT_CODE_GENERATOR=BARTOK
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Erik
KERNEL_GC=Kcc
LOGONSERVER=\\MATFAK
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PAGING=Off
Path=C:\Singularity RDK 2.0\base;C:\Singularity RDK 2.0\base\build;C:\Singularit
y RDK 2.0\base\build\x86_x86;C:\OracleNE\Erik\product\11.1.0\db_1\bin;C:\WINDOWS
\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerSh
ell\v1.0;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\
Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Too
ls\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common
7\IDE\PrivateAssemblies\;c:\debuggers
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PLATFORM=ApicMP
PROCESSOR=x86
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0b
ProgramFiles=C:\Program Files
PROMPT=$P$G
SCHEDULER=Min
SESSIONNAME=Console
SINGULARITY_BUILD_ISO=true
SINGULARITY_BUILD_SETTINGS=C:\Singularity RDK 2.0\base.obj\Settings\Debug.BARTOK
.ApicMP.MarkSweep.Min.Concurrent..cmd
SINGULARITY_DISTRO_NAME=BVT
SINGULARITY_DISTRO_PATH=C:\Singularity RDK 2.0\base\Distro\BVT.proj
SINGULARITY_DISTRO_SUFFIX=Debug.BARTOK.ApicMP.MarkSweep.Min.Concurrent.
SINGULARITY_LINKED_STACKS=false
SINGULARITY_OBJROOT=C:\Singularity RDK 2.0\base.obj
SINGULARITY_PATH=C:\Singularity RDK 2.0\base;C:\Singularity RDK 2.0\base\build;C
:\Singularity RDK 2.0\base\build\x86_x86
SINGULARITY_ROOT=C:\Singularity RDK 2.0\base
SINGULARITY_SAVED_PATH=C:\OracleNE\Erik\product\11.1.0\db_1\bin;C:\WINDOWS\syste
m32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1
.0;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Micros
oft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Bin
n\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
PrivateAssemblies\
SINGULARITY_STACK_CHECKS=true
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Erik\LOCALS~1\Temp
TITLE=base Debug ApicMP Kcc Min
TMP=C:\DOCUME~1\Erik\LOCALS~1\Temp
USERDOMAIN=MATFAK
USERNAME=Erik
USERPROFILE=C:\Documents and Settings\Erik
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\WINDOWS
_EXIT_CMD=exit /b
Coordinator
Mar 20, 2009 at 12:31 AM
Hi ermin - sorry for the slow response. I'm afraid I'm still at a loss. Clearly your path contains C:\Singularity RDK 2.0\base\build, the directory where msb.cmd is located. Make sure you're using the regular cmd.exe shell and not PowerShell, as it has not been tested and may behave differently. You might try it on another machine. Without access to your machine it's difficult for me to diagnose the issue further.
--
Derrick Coetzee
Microsoft Research Operating Systems Group developer

Mar 25, 2009 at 6:31 PM
Hi dcoetzee. Reinstalling the host OS and downloading latest Singularity distrib sovled the problem. However the cause of this issue is unknown. 
Coordinator
Mar 31, 2009 at 3:59 AM
Okay, that's pretty strange - maybe your machine's state was somehow corrupt. I apologize that I couldn't be more helpful. Let me know if the issue recurs.
--
Derrick Coetzee
Microsoft Research Operating Systems Group developer
Apr 2, 2009 at 8:36 PM
Edited Apr 2, 2009 at 8:50 PM
Hi Ermin.If you tried to open a file of the project in visual studio, the conversion tool asks you create a backup of original files.
When you run msb.cmd be returned Build Failed.

Allan Toblex - São Paulo - Brasil

Excuse me for the mistakes of language, I use the google translator to post
Apr 2, 2009 at 9:17 PM
Edited Apr 2, 2009 at 9:18 PM
Hi Allan. I didn't convert anything by VS. 'msb' failed trying to build the original project. I'm allmost sure that the cause of my problem was somewhere in my OS as too much software was installed, reinstalled and uninstalled.