<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 20, 2015 at 10:05 AM Aidan Dodds <<a href="mailto:aidan@codeplay.com">aidan@codeplay.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
First off thanks for opening that up to the mailing list, it will be
good if discussion of this is useful to others.<br>
<br>
From the python 3.5 case:<br>
I'm not using ninja.build, but instead just compiling from the
visual studio ide. However, the custom build step I think you were
referring to for finish_swig seems to be:<br>
<br>
setlocal<br>
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy
C:\Python35\python35.dll
D:\rs_project\rs_llvm_build\$(Configuration)\bin<br>
if %errorlevel% neq 0 goto :cmEnd<br>
:cmEnd<br>
endlocal & call :cmErrorLevel %errorlevel% & goto
:cmDone<br>
:cmErrorLevel<br>
exit /b %1<br>
:cmDone<br>
if %errorlevel% neq 0 goto :VCEnd<br>
<br>
<br>
The exact error message for building finish_swig was the following:<br>
<br>
------ Build started: Project: finish_swig, Configuration: Debug x64
------<br>
Build started 20/11/2015 17:27:07.<br>
InitializeBuildStatus:<br>
Touching
"x64\Debug\finish_swig\finish_swig.tlog\unsuccessfulbuild".<br>
CustomBuild:<br>
Python script sym-linking LLDB Python API<br>
Traceback (most recent call last):<br>
File
"D:/rs_project/rs_llvm/tools/lldb/scripts/finishSwigWrapperClasses.py",
line 383, in <module><br>
main(sys.argv[1:])<br>
File
"D:/rs_project/rs_llvm/tools/lldb/scripts/finishSwigWrapperClasses.py",
line 326, in main<br>
nResult, strMsg =
run_post_process_for_each_script_supported(dictArgs)<br>
File
"D:/rs_project/rs_llvm/tools/lldb/scripts/finishSwigWrapperClasses.py",
line 281, in run_post_process_for_each_script_supported<br>
vDictArgs)<br>
File
"D:/rs_project/rs_llvm/tools/lldb/scripts/finishSwigWrapperClasses.py",
line 223, in run_post_process<br>
module = __import__(strModuleName)<br>
File
"d:\rs_project\rs_llvm\tools\lldb\scripts\python\finishSwigPythonLLDB.py",
line 42, in <module><br>
import ctypes # Invoke Windows API for creating symlinks<br>
File "C:\Python35\lib\ctypes\__init__.py", line 7, in
<module><br>
from _ctypes import Union, Structure, Array</div><div bgcolor="#FFFFFF" text="#000000"><br>
ImportError: No module named '_ctypes'<br></div></blockquote><div>Looks like this is an x64 build of LLDB, so it would need to be an x64 installation of Python 3.5 To be honest I haven't tested Python 3.5 with x64, so I'm not sure what kind of issues might arise. What happens if you run C:\Python35\python_d.exe and then write "import ctypes". Does it work?</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
<br></div><div bgcolor="#FFFFFF" text="#000000">
For the python 2.7 case:<br>
<br>
The error I see in CMake is the following:<br>
<br>
<span style="color:#ff0000">-- Found Python version 2.7.10+</span>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Unable to
find C:/Python27/libs/python27+_d.lib</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Unable to
find C:/Python27/libs/python27+.lib</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Unable to
find C:/Python27/python27+_d.dll</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Unable to
find C:/Python27/python27+.dll</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Python
installation is corrupt. Python support will be disabled for this
build.</p></div></blockquote><div>Yea, I'm honestly not sure either. I think you will need to do some CMake debugging to figure this out. Usually what I do is crack open the CMake scripts and add some calls to the message() function at various points, to see if you can figure out where this + is coming from.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
I'm not sure where the + comes from however...<br>
<br>
Aidan@AIDAN-PC /c/Python27<br>
$ python --version<br>
Python 2.7.10<br>
<br>
Aidan@AIDAN-PC /c/Python27<br>
$ python_d --version<br>
Python 2.7.10<br></div></blockquote><div>This makes me think your'e using cygwin. This isn't explicitly unsupported, but also I don't know of anyone else Windows using cygwin, so I can't guarantee there are no problems on the CMake side for cygwin users. If you do find some though, feel free to fix.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
As for the CMake options its again complicated because I'm using
cmake-gui.<br>
Hopefully the relevant params are:<br>
<br>
PYTHON_EXCUTABLE = c:/python27/python_d.exe<br>
PYTHON_HOME = c:/python27<br>
LLDB_DISABLE_PYTHON = False<br>
LLDB_RELOCATABLE_PYTHON = False<br>
SWIG_DIR = d:/swig/lib<br>
SWIG_EXECUTABLE = d:/swig/swig.exe<br>
SWIG_VERSION = 3.0.5<br>
<br>
<br>
I am using Visual Studio 2013 and doing an x86_64 build.<br>
I compiled the python interpreter with the same version also.<br>
<br>
Its not a requirement for me to custom python for any reason, I just
remember there being issues with using the release package.</div></blockquote><div>Yea, what makes 2.7 so bad. If you want to run the test suite, you have to have a custom interpreter. And then all the difficulty that goes along with that.</div><div> </div></div></div>