Error when trying to setup Ultimate ALPR on windows server

28 views
Skip to first unread message

Patrik Gillebo Olsen

unread,
Apr 23, 2024, 6:08:37 AMApr 23
to doubango-ai
Hello. When trying to build Ultimate on our two Windows Server OS, we encounter an the same error message. Are you familiar with how to fix this issue?

The error message: 

C:\Ultimate_ALPR\ultimateALPR-SDK-master\binaries\windows\x86_64>python ../../../python/setup.py build_ext --inplace -v
Your platform: win32
running build_ext
building '_ultimateAlprSdk' extension
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I../../../c++ -ID:\miniconda\envs\multimotor\include -ID:\miniconda\envs\multimotor\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /EHsc /TpC:\Ultimate_ALPR\ultimateALPR-SDK-master\python\ultimateALPR-SDK-API-PUBLIC-SWIG_python.cxx /Fobuild\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj
ultimateALPR-SDK-API-PUBLIC-SWIG_python.cxx
D:\miniconda\envs\multimotor\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

Mamadou DIOP

unread,
Apr 23, 2024, 1:07:49 PMApr 23
to Patrik Gillebo Olsen, doubango-ai
Hello,


You probably didn’t install all C++ dev components as explained at https://learn.microsoft.com/en-us/answers/questions/1386273/io-h-not-found.

- If io.h is under C:\Program Files (x86)\Windows Kits\10\Include\<version>\ucrt ,then make sure to ref the folders as per https://stackoverflow.com/a/56520573
- if io.h isn’t under …, then you haven’t installed all C++ comps

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/e0a358cd-8024-42a3-9bc4-2eb92acda1c6n%40googlegroups.com.

Mamadou DIOP

unread,
Apr 24, 2024, 3:25:14 PMApr 24
to Patrik Gillebo Olsen, doubango-ai

Very important: Do not reply to me but to douba...@googlegroups.com. Otherwise it'll go to spam and be deleted after 48hr. Also, no need to put my email in CC, otherwise I'll get it twice.

To clarify: this is *not* an issue in our product. You'll have same errors if you try to build any other python extension. It's important to clarify because it means you can google the error as well to try to get help from elsewhere.

This said, your dev env looks incomplete. 

Did you reboot your PC after installing MSVC?

The stackoverflow link I shared has multiple possible solutions, did you try them?

Did you install Microsoft SDK?

On my PC when I go to "C:\Program Files (x86)\Windows Kits\10\Lib" I have 2 folders: "10.0.10240.0" and "10.0.17763.0"

Same for "C:\Program Files (x86)\Windows Kits\10\Include"

"10.0.10240.0" is a slim version a has almost nothing in it while "10.0.17763.0" has all libs and headers.

From your logs the toolchain is using MSSDK from "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0", make sure "10.0.19041.0" isn't a slim version and is the one you have installed.

You should not need to update the paths to have it working.

1/ Undo your changes.

2/ Look you're using MSVC2019. On the same console you're trying to build the extension; run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" to set all var envs

3/ Try to build the extension again. If it fails, then you'll have to re-install MSVC and  MSSDK and make sure you've selected all required comps. Then, reboot

On 4/24/2024 3:46 PM, Patrik Gillebo Olsen wrote:
Thank you, I did as requested, and added the paths to INCLUDE and LIB, and it got further. However, I met another error message. Maybe I'm missing other paths?. The error is as follows;

building '_ultimateAlprSdk' extension
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I../../../c++ -ID:\Python\include -ID:\Python\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" "-IE:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared" "-IE:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\onecore\x64" "-IC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64" "-IC:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64" "-IC:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64" "-IC:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x86" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x86" /EHsc /TpC:\Ultimate_ALPR\ultimateALPR-SDK-master\python\ultimateALPR-SDK-API-PUBLIC-SWIG_python.cxx /Fobuild\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj
ultimateALPR-SDK-API-PUBLIC-SWIG_python.cxx
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:. /LIBPATH:D:\Python\libs /LIBPATH:D:\Python /LIBPATH:D:\Python\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\onecore\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x86" ultimateALPR-SDK.lib /EXPORT:PyInit__ultimateAlprSdk build\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj /OUT:C:\Ultimate_ALPR\ultimateALPR-SDK-master\binaries\windows\x86_64\_ultimateAlprSdk.pyd /IMPLIB:build\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\_ultimateAlprSdk.lib
   Creating library build\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\_ultimateAlprSdk.lib and object build\temp.win-amd64-cpython-310\Release\Ultimate_ALPR\ultimateALPR-SDK-master\python\_ultimateAlprSdk.exp
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp___acrt_iob_func
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp___stdio_common_vfprintf
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp_strncpy
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp_strncmp
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp_fputs
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp_free
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo_noreturn
ultimateALPR-SDK-API-PUBLIC-SWIG_python.obj : error LNK2001: unresolved external symbol __imp_malloc
MSVCRT.lib(new_scalar.obj) : error LNK2001: unresolved external symbol _callnewh
MSVCRT.lib(new_scalar.obj) : error LNK2001: unresolved external symbol malloc
MSVCRT.lib(dll_dllmain.obj) : error LNK2001: unresolved external symbol _initterm
MSVCRT.lib(dll_dllmain.obj) : error LNK2001: unresolved external symbol _initterm_e
MSVCRT.lib(delete_scalar.obj) : error LNK2001: unresolved external symbol free
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _seh_filter_dll
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _configure_narrow_argv
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _initialize_narrow_environment
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _initialize_onexit_table
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _register_onexit_function
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _execute_onexit_table
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _crt_atexit
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _crt_at_quick_exit
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol _cexit
MSVCRT.lib(utility_desktop.obj) : error LNK2001: unresolved external symbol terminate
C:\Ultimate_ALPR\ultimateALPR-SDK-master\binaries\windows\x86_64\_ultimateAlprSdk.pyd : fatal error LNK1120: 23 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
Reply all
Reply to author
Forward
0 new messages