VirtualBox

Ticket #6606 (new defect)

Opened 4 years ago

Last modified 4 years ago

Wrong Path to cl.exe in "configure.vbs" if trying to compile VB OSE x64 on Windows

Reported by: yogg Owned by:
Priority: critical Component: other
Version: VirtualBox 3.1.6 Keywords:
Cc: Guest type: other
Host type: other

Description

If VB OSE is compiled with the Microsoft Visual Studio 2005 x64 command prompt (Visual Studio 2005 x64 Win64-Command Prompt) the path to cl.exe is not correct.

configure.vbs Line 836 to 845

   if (strPathVC = "") And (Shell("cl.exe", True) = 0) then
      str = Which("cl.exe")
      if FileExists(PathStripFilename(strClExe) & "/build.exe") then
         ' don't know how to deal with this cl.
         Warning "Ignoring DDK cl.exe (" & str & ")."
      else
         strPathVC = PathParent(PathStripFilename(str))
         strPathVCCommon = PathParent(strPathVC) & "/Common7"
      end if
   end if
str = Which("cl.exe")
str -> x86 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\cl.exe"
str -> x64 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\amd64\cl.exe"

strPathVC = PathParent(PathStripFilename(str))
strPathVC -> x86 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC"
strPathVC -> x64 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin"

Also "strPathVCCommon" would be set to:

x86 -> "C:\Program Files (x86)\Microsoft Visual Studio 8/Common7" -> correct
x64 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC/Common7" -> not correct

configure.vbs Line 963 to 966

   if Shell(DosSlashes(strPathVC & "/bin/cl.exe"), True) <> 0 then
      MsgError "Executing '" & strClExe & "' (which we believe to be the Visual C++ compiler driver) failed."
      exit sub
   end if
strPathVC & "/bin/cl.exe" -> x86 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\cl.exe" -> is ok
strPathVC & "/bin/cl.exe" -> x64 -> "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\bin\cl.exe" -> will not work! Second "bin" should be "amd64"

"strPathVC" and "strPathVCCommon" will also be written into "AutoConfig.kmk". I don't know if the path would be multible times set to ".../bin/bin/cl.exe" at compilation time, or if this path is irrelevant (but i think not).

With this it is currently not possible to compile VB OSE x64 version.

yogg

Change History

comment:1 Changed 4 years ago by yogg

There is also another path problem with the Microsoft Platform SDK (Windows Vista Update & .NET 3.0 SDK).

On an Win XP 32 bit machine the path to the *.lib files is the folowing: C:\Programme\Microsoft SDKs\Windows\v6.0\Lib

On Win Vista 64 bit: C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x64 The "Lib" folder only includes two other folders (x64 and x86).

configure.vbs line 1151 to 1160

function CheckForPlatformSDKSub(strPathPSDK)
   CheckForPlatformSDKSub = False
   LogPrint "trying: strPathPSDK=" & strPathPSDK
   if    LogFileExists(strPathPSDK, "include/Windows.h") _
    And  LogFileExists(strPathPSDK, "lib/Kernel32.Lib") _
    And  LogFileExists(strPathPSDK, "lib/User32.Lib") _
      then
      CheckForPlatformSDKSub = True
   end if
end function

This would only work for an 32 bit Windows.

yogg

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use