Closed saravanabalagi closed 6 years ago
You don't need to run cmake at all. Running that doesn't do anything related to using dlib via python.
I note that the output says 4>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [F:\Proj ects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
Maybe remove this line: https://github.com/davisking/dlib/blob/master/tools/python/CMakeLists.txt#L23 and see what happens. Although really it shouldn't matter.
The real issue is probably that the version of libjpeg cmake found (that jpeg.lib file) is probably compiled in some bad way, since it's missing symbols. You can see https://github.com/davisking/dlib/blob/master/dlib/CMakeLists.txt#L487 that there are already checks to avoid linking against the, generally broken, copy of libjpeg included in anaconda. Maybe they should be expanded to avoid linking to whatever funky libjpeg is on your system.
Maybe remove this line: https://github.com/davisking/dlib/blob/master/tools/python/CMakeLists.txt#L23 and see what happens
Solves the problem. Thanks a bunch.
It ended with 166 Warnings. Is it something that I need to worry about?
Build succeeded.
"F:\Projects\python\dlib\build\temp.win-amd64-3.6\Release\ALL_BUILD.vcxproj" (default target) (1) ->
"F:\Projects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj" (default target) (4) ->
(ClCompile target) ->
F:\Projects\python\dlib\tools\python\src\basic.cpp(22): warning C4101: 'e': unreferenced local variable [F:\Pr
ojects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
F:\Projects\python\dlib\tools\python\src\vector.cpp(62): warning C4101: 'e': unreferenced local variable [F:\P
rojects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
F:\Projects\python\dlib\tools\python\src\svm_struct.cpp(59): warning C4101: 'e': unreferenced local variable [
F:\Projects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
F:\Projects\python\dlib\dlib\..\dlib/image_transforms/assign_image.h(86): warning C4018: '>=': signed/unsigned
mismatch (compiling source file F:\Projects\python\dlib\tools\python\src\image3.cpp) [F:\Projects\python\dlib\b
uild\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
F:\Projects\python\dlib\dlib\..\dlib/image_transforms/assign_image.h(87): warning C4018: '<=': signed/unsigned
mismatch (compiling source file F:\Projects\python\dlib\tools\python\src\image3.cpp) [F:\Projects\python\dlib\b
uild\temp.win-amd64-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(659): warning C4503: 'std::_Is_function
<_Ty>::_Weird': decorated name length exceeded, name was truncated [F:\Projects\python\dlib\build\temp.win-amd64
-3.6\Release\dlib_python.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\memory(1396): warning C4503: 'dlib::add_layer<d
...
Full log here
No problem. Don't worry about those warnings, they don't have any bad effect.
Can you try the latest dlib in github? I just updated the cmake scripts and things should not just work.
Can you try the latest dlib in github? I just updated the cmake scripts and things should not just work.
It is getting built and installed successfully with the latest commit (as of now) and it gets built exactly like before, same warnings and no error. I was not able to hunt down things also because I updated conda after I first built dlib with Cuda, sorry about that.
What should happen though? Probably on my side libjpeg
got updated? Or some caching?
Cool, that's what should happen. :)
I changed it so that it just always builds and uses the copy of libjpeg inside dlib/external (for Visual Studio) rather than trying to find one on your system. Non-visual-studio users still use the system libjpeg. But windows users hardly ever have a working copy of libjpeg installed. Any you find is probably busted.
I was suffering the same problem, but building from Git solved it. Thanks @davisking .
Expected Behavior
Successful Compilation on executing command
python setup.py install
Current Behavior
cmake build succeeds, but
python setup.py install
fails with187 Warnings 2 Errors
Detailed Log:
and scrolling to the error section:
and at the end
Steps to Reproduce
Cmake Log