[cfe-dev] Testing clang using Visual Studio on Windows

toryb at runestone.net toryb at runestone.net
Fri May 6 15:04:28 PDT 2011


Hi,

I'm new to clang - just downloaded everything today. I have GnuWin32 
installed and defined in the configuration and Python 3.2 installed 
and in the path. I was able to create the VS2010 solution using CMake 
and then build the ALL_BUILD project with no errors.

In the "Hacking on clang" document there is a section on how to test 
using Visual Studio on windows. 
(http://clang.llvm.org/hacking.html#testingWindows) When I attempt to 
follow those directions I receive the following error:

1>------ Build started: Project: clang-test, Configuration: Debug 
Win32 ------
1>  Running Clang regression tests
1>  Traceback (most recent call last):
1>    File "C:/Projects/Sandbox/LLVM/LLVM/utils/lit/lit.py", line 4, 
in <module>
1>      import lit
1>    File "C:\Projects\Sandbox\LLVM\LLVM\utils\lit\lit\__init__.py", 
line 3, in <module>
1>      from main import main
1>  ImportError: No module named main
1>C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): 
error MSB6006: "cmd.exe" exited with code 1.

I suspect something is not configured correctly regarding my python 
install, but don't know what it is. I did try version 2.7.1 also with 
the same result. I also tried to use the command line instead of the 
Visual Studio with the same result:

C:\Projects\Sandbox\LLVM\LLVM>python utils/lit/lit.py -sv 
--no-progress-bar tools/clang/test --param=build_config=Debug
Traceback (most recent call last):
  File "utils/lit/lit.py", line 4, in <module>
    import lit
  File "C:\Projects\Sandbox\LLVM\LLVM\utils\lit\lit\__init__.py", line 
3, in <module>
    from main import main
ImportError: No module named main

Any ideas would be appreciated.

Thanks,

Tory





More information about the cfe-dev mailing list