Windows 10 Source Installation Failing Due to Python 3 Bindings


_ROOT Version: 6.14.00
_Platform: Windows 10 64-bit
_Compiler: Visual Studio 2017


I am attempting to install root from source with bindings to an installation of Python 3.4 on my machine. I am using the x86 Visual Studio 2017 console to run the following CMake commands:

cmake "Visual Studio 15 2017" -DPYTHON_VERSION=3.4 -DPYTHON_EXECUTABLE=C:\Python34\python.exe -DPYTHON_INCLUDE_DIR=C:\Python34\include -DPYTHON_LIBRARY=C:\Python34\libs\python34.lib C:\Users\<name>\Desktop\root-6.14.00

and once that is completed:

cmake --build .

This results in a failed installation with the following errors.

"C:\root\ALL_BUILD.vcxproj" (default target) (1) -> "C:\root\bindings\pyroot\PyROOT.vcxproj" (default target) (304) -> (PostBuildEvent target) -> LINK : error LNK2001: unresolved external symbol initlibPyROOT [C:\root\bindings\pyroot\PyROOT.vcxproj] C:/root/bin/libPyROOT.lib : fatal error LNK1120: 1 unresolved externals [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(13 3,5): error MSB3073: The command "setlocal [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: link -dll -nologo -IGNORE:4001 -machine:ix86 -export:initlibPyROOT C:/root/lib/libPyROOT.lib msvcrt. lib -out:C:/root/bin/libPyROOT.pyd [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: :cmEnd [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: :cmErrorLevel [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: exit /b %1 [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: :cmDone [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\root\bindings\pyroot\PyROOT.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133, 5): error MSB3073: :VCEnd" exited with code 1120. [C:\root\bindings\pyroot\PyROOT.vcxproj]

My Python 3.4 installation is 32-bit. I have a couple other versions of Python installed on my machine but looking through the generated CMakeCache.txt file in my root directory I don’t see any other versions being considered. Could this be a mismatch between root version and Python version?

Hi,

I never tried with Python 3. I’ll check and let you know. (BTW, FYI, PyROOT doesn’t work yet on Windows)

Cheers, Bertrand.

OK, the problem has been identified and is now fixed in the master and in v6-14-00-patches. Thanks for reporting the issue and sorry for the trouble. (for now you can build with Python 2, since PyROOT doesn’t work anyway…)

Thank you for the help. When you say that PyROOT doesn’t work on Windows, do you mean that ROOT6 doesn’t yet support it? I ask because under the PyROOT section of the ROOT User Guide it gives specific installation instructions for Windows systems.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.