[cfe-dev] Testing clang using Visual Studio on Windows
Francois Pichet
pichet2000 at gmail.com
Sat May 7 10:10:39 PDT 2011
On Fri, May 6, 2011 at 6:04 PM, <toryb at runestone.net> wrote:
> 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.
This really should work.
Something wrong, but I don't know what. Look like a python problem,
you really need 2.7 and not 3.2.
Make sure it is Python 2.7 that is in your PATH environment. If python
2.7 and python 3.2 are both installed on your computer it is possible
that 3.2 is picked up. How about you check your PATH to be sure 2.7 is
used or you can uninstall Python 3.2 to be sure.
More information about the cfe-dev
mailing list