microsoft / ELL

Embedded Learning Library
https://microsoft.github.io/ELL
Other
2.29k stars 295 forks source link

Cmake failed to build ELL's Python language bindings #175

Closed bhakthil closed 6 years ago

bhakthil commented 6 years ago

Hi, I am following the instructions to the letter and was able to successfully build ELL. I do see all the project executable in ELL/build/bin. But, when I try to build python binding using; cmake --build . --target _ELL_python --config Release --> fails

CustomBuild: Swig source CUSTOMBUILD(1): error : Unable to find 'swig.swg' [C:\Development\ELL\build\interfaces\python_ELL_pyth on.vcxproj] CUSTOMBUILD(3): error : Unable to find 'python.swg' [C:\Development\ELL\build\interfaces\python_ELL_py thon.vcxproj] C:\Development\ELL\interfaces\common\vector.i(22): error : Unable to find 'std_string.i' [C:\Developmen t\ELL\build\interfaces\python_ELL_python.vcxproj] C:\Development\ELL\interfaces\common\vector.i(23): error : Unable to find 'std_vector.i' [C:\Developmen t\ELL\build\interfaces\python_ELL_python.vcxproj] C:\Development\ELL\interfaces\common\ell.i(40): error : Unable to find 'exception.i' [C:\Development\EL L\build\interfaces\python_ELL_python.vcxproj] Done Building Project "C:\Development\ELL\build\interfaces\python_ELL_python.vcxproj" (default targets ) -- FAILED.

Build FAILED.

"C:\Development\ELL\build\interfaces\python_ELL_python.vcxproj" (default target) (1) -> (CustomBuild target) -> CUSTOMBUILD(1): error : Unable to find 'swig.swg' [C:\Development\ELL\build\interfaces\python_ELLpy thon.vcxproj] CUSTOMBUILD(3): error : Unable to find 'python.swg' [C:\Development\ELL\build\interfaces\python_ELL python.vcxproj] C:\Development\ELL\interfaces\common\vector.i(22): error : Unable to find 'std_string.i' [C:\Developm ent\ELL\build\interfaces\python_ELL_python.vcxproj] C:\Development\ELL\interfaces\common\vector.i(23): error : Unable to find 'std_vector.i' [C:\Developm ent\ELL\build\interfaces\python_ELL_python.vcxproj] C:\Development\ELL\interfaces\common\ell.i(40): error : Unable to find 'exception.i' [C:\Development\ ELL\build\interfaces\python_ELL_python.vcxproj]

0 Warning(s)
5 Error(s)

Can you please help to troubleshoot the issue?

Thank You

lovettchris commented 6 years ago

Can you make sure you ran "build.cmd" ? This will populate your externals folder which contains nuget packages, including one for SWIG, so you should see this:

(ell) d:\git\ELL\ELL\external>dir /s /b swig.swg
d:\git\ELL\ELL\external\swigwintools.3.0.12\tools\swigwin-3.0.12\Lib\swig.swg
bhakthil commented 6 years ago

The issue was that SWIG_LIB in all build files are pointing to swig root directory instead of \Lib directory. I change the path to \Lib and solved the problem.