Closed Hurmean closed 6 years ago
The error occurs for python 3.5 as well.
That's not what happens when I try it on ubuntu 16.04. What version of cmake do you have installed?
I have 3.5.1 on my Jetson TX2
Well, I don't know what to tell you. That error seems to indicate that you have a version of cmake with a bug in it, but cmake 3.5.1 is also the version I just tested on ubuntu, and it works fine.
I have more than one TX2. The one I am trying to install dlib on is new. Both TX2s have the same cmake version installed on them, and I am following the installation procedure, that I followed on older one, on the newer one.
And you are saying it worked on the older one?
Get the latest dlib from github. I just changed it so it will print the cmake version information in the output. Run it and post the output here.
The other thing you should post is the output of this:
cd dlib/cmake_utils/test_for_avx/
mkdir build
cmake ..
Since that's the cmake stuff it's complaining about. Maybe putting "" around ${run_result}
on line 17 of the CMakeLists.txt file in that folder will playcate it.
Yes, I will post the output. But I would like to mention a few things as well:
Command: sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
Output: running install Checking .pth file support in /usr/local/lib/python3.5/dist-packages/ /usr/bin/python3 -E -c pass TEST PASSED: /usr/local/lib/python3.5/dist-packages/ appears to support .pth files running bdist_egg running egg_info writing top-level names to dlib.egg-info/top_level.txt writing dlib.egg-info/PKG-INFO writing dependency_links to dlib.egg-info/dependency_links.txt package init file 'dlib/init.py' not found (or not a regular file) reading manifest file 'dlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'dlib.egg-info/SOURCES.txt' installing library code to build/bdist.linux-aarch64/egg running install_lib running build_py running build_ext Building extension for Python 3.5.2 (default, Nov 23 2017, 16:37:01) Invoking CMake setup: 'cmake /home/ubuntu/work/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/work/dlib/build/lib.linux-aarch64-3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DUSE_AVX_INSTRUCTIONS=yes -DDLIB_USE_CUDA=yes -DCMAKE_BUILD_TYPE=Release' -- pybind11 v2.2.2 -- Using CMake version: 3.5.1 -- Compiling dlib version: 19.13.99 CMake Error at CMakeLists.txt:17 (if): if given arguments:
"EQUAL" "0" "AND" "compile_result"
Unknown arguments specified
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/work/dlib/build/temp.linux-aarch64-3.5/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 256, in
Command: cd /dlib/cmake_utils/test_for_avx/ mkdir build cmake ..
Output: CMake Error: The source directory "/home/ubuntu/work/dlib/dlib/cmake_utils" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
Oops, also cd build
After including cd build
Output: -- Using CMake version: 3.5.1 -- Compiling dlib version: 19.13.99 -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Checking for module 'cblas' -- No package 'cblas' found -- Found OpenBLAS library -- Looking for sgetrf_single -- Looking for sgetrf_single - not found -- Found LAPACK library -- Looking for cuDNN install... -- Found cuDNN: /usr/lib/aarch64-linux-gnu/libcudnn.so -- Enabling CUDA support for dlib. DLIB WILL USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/work/dlib/dlib/cmake_utils/test_for_avx
That doesn't make sense. Try it again with a fresh folder.
cd /dlib/cmake_utils/test_for_avx/
mkdir build
cd build
cmake ..
Output: -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- run_result = -- compile_result = FALSE CMake Error at CMakeLists.txt:17 (if): if given arguments:
"EQUAL" "0" "AND" "compile_result"
Unknown arguments specified
-- Configuring incomplete, errors occurred! See also "/home/ubuntu/work/dlib/dlib/cmake_utils/test_for_avx/build/CMakeFiles/CMakeOutput.log".
Ok, so what happens if you put "" around it like I mentioned?
Actually, just pull from github again and try it. I think it should work now.
Yes it has solved the problem. Thank you!
No problem. Thanks for reporting the issue.
Collecting dlib Using cached https://files.pythonhosted.org/packages/79/26/8ef2835606b4b37f704862b2db55edb89675daca0b82718244fca718cddd/dlib-19.13.0.tar.gz Building wheels for collected packages: dlib Running setup.py bdist_wheel for dlib: started Running setup.py bdist_wheel for dlib: finished with status 'error' Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-lIh_fo/dlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-qnWYfi --python-tag cp27: running bdist_wheel running build running build_py package init file 'dlib/init.py' not found (or not a regular file) running build_ext Building extension for Python 2.7.12 (default, Dec 4 2017, 14:50:18) Invoking CMake setup: 'cmake /tmp/pip-install-lIh_fo/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7 -DPYTHON_EXECUTABLE=/usr/bin/python -DCMAKE_BUILD_TYPE=Release' -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /usr/bin/python (found version "2.7.12") -- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so -- Performing Test HAS_CPP14_FLAG -- Performing Test HAS_CPP14_FLAG - Success -- pybind11 v2.2.2 CMake Error at CMakeLists.txt:17 (if): if given arguments:
CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Configuring incomplete, errors occurred! See also "/tmp/pip-install-lIh_fo/dlib/build/temp.linux-aarch64-2.7/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 256, in
'Topic :: Software Development',
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 133, in run
self.build_extension(ext)
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 169, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-lIh_fo/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7', '-DPYTHON_EXECUTABLE=/usr/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1
Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib: started Running setup.py install for dlib: finished with status 'error' Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-lIh_fo/dlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-sHrt4s/install-record.txt --single-version-externally-managed --compile: running install running build running build_py package init file 'dlib/init.py' not found (or not a regular file) running build_ext Building extension for Python 2.7.12 (default, Dec 4 2017, 14:50:18) Invoking CMake setup: 'cmake /tmp/pip-install-lIh_fo/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7 -DPYTHON_EXECUTABLE=/usr/bin/python -DCMAKE_BUILD_TYPE=Release' -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /usr/bin/python (found version "2.7.12") -- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so -- Performing Test HAS_CPP14_FLAG -- Performing Test HAS_CPP14_FLAG - Success -- pybind11 v2.2.2 CMake Error at CMakeLists.txt:17 (if): if given arguments: