0

I am trying to build Rotor SSCLI 2.0 under Windows 8.1 x64, VS2013 (including MFC). Source code is located at C:\sscli20.

Instead of env.bat I wrote PowerShell script that sets environment variables and by chance may appear to be correct:

# Setting environment variables for SSCLS 2.0 and run buildall.cmd

$current = Get-Location # Current location is where Rotor src and the script are 
$vcdir = $env:VCINSTALLDIR # Location of the root of VS-2013

Push-Location # Remember current location

Set-Location env:\ # Setting environment variables 

set-item Path "C:\Perl\site\bin;C:\Perl\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\System32;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools;C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;"

set-item BROWSER_INFO 1
set-item BUILD_ALT_DIR c
set-item BUILD_DEFAULT "-mwe -a -M -wx"
set-item BUILD_DEFAULT_TARGETS "-dynamic $current\target"
set-item COFFBASE_TXT_FILE "$current\env\coffbase.txt"
set-item COPYCMD "/Y"
set-item CRT_INC_PATH "$current\palrt\inc"
set-item CRT_LIB_PATH "$vcdir\VC\lib files"
set-item C_DEFINES 
set-item _BUILDTYPE checked
set-item DEBUG_CRTS 1
set-item DevEnvDir "$vcdir\Common7\IDE"
set-item FEATURE_PAL 1
set-item MSC_OPTIMIZATION "/O1"
set-item MSVCDir "$vcdir\VC\"
set-item NTDEBUG ntsd
set-item NTDEBUGTYPE vc6
set-item NTMAKEENV "$current\env\bin"
set-item ROTOR_DIR "$current"
set-item ROTOR_TOOLSET MSVC
#set-item ROTOR_TOOLSET_VERSION 80
set-item SDK_INC_PATH "$current\pal\inc"
set-item SDK_LIB_PATH "$vcdir\VC\PlatformSDK\lib"
set-item USE_PDB 1
set-item VCINSTALLDIR "$vcdir"
set-item VC_BIN_PATH "$vcdir\VC\bin"
set-item VSINSTALLDIR "$vcdir"
set-item _NTDRIVE "c:\"
set-item _NTROOT "$rotorDir\clr"
set-item _NTTREE "$current\binaries.x86.rotor"
set-item _NT_DEBUGGER_EXTENSION_PATH "$current\binaries.x86.rotor\int_tools"
set-item _NT_SYMBOL_PATH "$current\binaries.x86.rotor"
#set-item _TGTCPU i386
#set-item _TGTCPUTYPE x86
set-item _TGTOS NT32

Pop-Location # Going back to Rotor’s directory
. "$vcdir\VC\vcvarsall.bat" amd64_x86 # Set Framework* variables
. "$current\buildall.cmd" # run build
"-------------------------------------------------"
Get-Content "$current\pal\win32\buildc.log" # enjoying error messages

After running buildall.cmd the following output came:

     ...
    C:\sscli20\prebuilt\idl\mscoree_i.c
    C:\sscli20\prebuilt\idl\xclrdata_i.c
           15 file(s) copied.
    C:\sscli20\prebuilt\yacc\asmparse.c
            1 file(s) copied.

    --- Building the PAL ---

    *** Error while building C:\sscli20\pal\win32
        Open C:\sscli20\pal\win32\buildc.log to see the error log.
        Open  to see any warnings. 

The Log file is the following:

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

    if not exist C:\sscli20\binaries.x86.rotor\sdk\pal\inc mkdir C:\sscli20\binaries.x86.rotor\sdk\pal\inc
    copy C:\sscli20\pal\inc\rotor_pal.h C:\sscli20\binaries.x86.rotor\sdk\pal\inc
        1 file(s) copied.

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

    if not exist objc\rotor_x86 md objc\rotor_x86
cl -nologo -Ii386\ -I. -I.. -I. -I\inc\version -Ic:\\clr\not_present\OAK_INC_PATH -IC:\sscli20\pal\inc -IC:\sscli20\palrt\inc -Di386 -D_X
86_  -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_UP=1  -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D
_WIN32_IE=0x0400    -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -DFPO=0    -D_DEBUG -D_DLL=1 -D_MT=1  /DPAL_IMPLEMENTATION=1 -DFX_VFT=VFT_DL
L -DFX_VER_INTERNALNAME_STR=rotor_pal.dll -DOFFICIAL_BUILD=0 -DBETA=0 -DFX_VER_PRIVATEBUILD_STR=COMPUTER -DURTBLDENV_FRIENDLY= -DFX_BRANC
H_SYNC_COUNTER_VALUE=0    /c /GS /Zp8 /Gy /W3 /WX /Gz   /Gm- /EHs-c-  /GR- /GF  -Z7 /O1 /Oy- /FRC:\sscli20\pal\win32\objc\rotor_x86\    /
WX /FI\clr\src\inc\WarningControl.h  .\exception.c
exception.c
c:\sscli20\pal\win32\exception.c : fatal error C1083: Cannot open include file: '\clr\src\inc\WarningControl.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.EXE"' : return code '0x2'
Stop.
user2341923
  • 4,537
  • 6
  • 30
  • 44
  • 1
    It appears "ntverp.h" is nowhere on the include search path used by `rc.exe`. I don't see how anybody who's not also working on your particular system is supposed to solve that. However, I will note that this file is part of the Platform SDK, and your directory ("$current\pal\inc") is not the SDK location but the Rotor include path. – Jeroen Mostert Nov 14 '14 at 13:32
  • Thank you for the hint! I manually copied `ntverp.h` from WinSDK to `$current\pal\inc` and it helped! Now I can enjoy next missing file. – user2341923 Nov 14 '14 at 14:09
  • That's almost certainly not the right thing to do. Instead, you want to add the SDK directory to the include path, not copy files from there. That will solve *all* missing file problems rather than just the one. Set `SDK_INC_PATH` to the correct value. – Jeroen Mostert Nov 14 '14 at 14:11
  • `../docs/buildtools/env.html` defines `SDK_INC_PATH` as `%ROTOR_DIR%\pal\inc;` - `Path to required SSCLI platform include data in rotor_pal.h.` – user2341923 Nov 14 '14 at 14:27
  • Then check if `%FrameworkSDKDir%` has the correct value -- this doesn't appear to be set anywhere and is not set by default from the developer command prompt. Although I've never built the Rotor source myself, one thing I do know is that you never copy "missing" files, because that will never end -- if necessary you modify the build to include the proper directory. – Jeroen Mostert Nov 14 '14 at 14:35
  • `%FrameworkSDKDir%` variables are created by `vcvarsall.bat` - I added it to the script explicitly. – user2341923 Nov 14 '14 at 15:10
  • Your question has now changed to move on to the next error. Stack Overflow is intended to provide questions and answers that are of use to many different people, but this just appears to be an extended debugging session. You could try the chat if you need specific help on how to compile Rotor in your configuration. – Jeroen Mostert Nov 14 '14 at 15:24
  • You are right. I just want to leave the updated script - I spent several days trying to understand env.bat and perl code which had some bugs (e.g. it did not work well with localized versions of Windows etc). Hope it may help someone. – user2341923 Nov 14 '14 at 15:35

0 Answers0