Dlib: Error building on Ubuntu 16.04

Created on 19 Nov 2019  Â·  7Comments  Â·  Source: davisking/dlib

Expected Behavior

dlib to build with no errors

Current Behavior

Building dlib through python setup.py install fails when trying to build with cuda

Steps to Reproduce

tar -xvf v19.18.tar.gz 
cd dlib-19.18/
python setup.py install  --set CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
                         --set CUDA_HOST_COMPILER=/usr/bin/gcc-8 \
                         --set CMAKE_PREFIX_PATH=/usr/local/cuda/bin \
                         --set CMAKE_CXX_COMPILER=/usr/bin/g++-8 \
                         --set CMAKE_C_COMPILER=/usr/bin/gcc-8 \
                         --clean --verbose
  • Version: 19.18
  • Where did you get dlib: github releases page
  • Platform:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial
  • Compiler: gcc 8.3.0 installed with sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt install gcc-8 g++-8
  • CUDA: 10.1.2 installed in /usr/local/cuda
  • cmake: 3.15.5

Configuring is successful, and then it gets to here:

-- Generating done
-- Build files have been written to: /home/evie/dlib-19.18/build/temp.linux-x86_64-3.7
Invoking CMake build: 'cmake --build . --config Release -- -j12'
[  2%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o
[  2%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cuda_dlib.cu.o
/usr/include/c++/8/type_traits(165): error: "conjunction_v" is not a function or static data member

/usr/include/c++/8/type_traits(165): error: "constexpr" is not valid here

/usr/include/c++/8/type_traits(168): error: "disjunction_v" is not a function or static data member

/usr/include/c++/8/type_traits(168): error: "constexpr" is not valid here

/usr/include/c++/8/type_traits(171): error: "negation_v" is not a function or static data member

/usr/include/c++/8/type_traits(171): error: "constexpr" is not valid here

The last errors repeat dozens of times. The full log is here: https://pastebin.com/ms2w47eP

Most helpful comment

The above didn't actually work. I had to do:

python setup.py install  --clean --set CMAKE_PREFIX_PATH="/usr/local/cuda-10.2/" --set CMAKE_CXX_FLAGS="-I /usr/local/cuda-10.1/targets/x86_64-linux/include/ -L /usr/lib"

Having cuda 10.1 and 10.2 side by side looks wrong but it still works.

All 7 comments

Those are not dlib errors. Just do python setup.py install. Don't give all
those other options.

When I do that, it didn't correctly detect cuda. Reinstalling CUDA from the nvidia ubuntu repository fixed the issue for me.

The above didn't actually work. I had to do:

python setup.py install  --clean --set CMAKE_PREFIX_PATH="/usr/local/cuda-10.2/" --set CMAKE_CXX_FLAGS="-I /usr/local/cuda-10.1/targets/x86_64-linux/include/ -L /usr/lib"

Having cuda 10.1 and 10.2 side by side looks wrong but it still works.

thx last comment helped me with cimilar problem with pip install dlib(see attached file)
logs.txt

@davisking could you please take a look, to be sure that it is not a common problem and should not be fixed somehow? I am not an expert in your lib, or what it is doing. But for some reason that is the problem I encountered trying to install dlib on Azure ML default machine image.

Try the latest dlib on github.

On Tue, Jun 2, 2020 at 8:20 AM Кирпичев Михаил notifications@github.com
wrote:

@davisking https://github.com/davisking could you please take a look,
to be sure that it is not a common problem and should not be fixed somehow?
I am not an expert in your lib, or what it doing but for some reason that
is the problem I encountered trying to install dlib on azure ml default
machine

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/davisking/dlib/issues/1925#issuecomment-637504679,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABPYFR63NS63SB5FANMTI3TRUTVAJANCNFSM4JO7ALUA
.

Try the latest dlib on github.
…
On Tue, Jun 2, 2020 at 8:20 AM Кирпичев Михаил @.*> wrote: @davisking https://github.com/davisking could you please take a look, to be sure that it is not a common problem and should not be fixed somehow? I am not an expert in your lib, or what it doing but for some reason that is the problem I encountered trying to install dlib on azure ml default machine — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1925 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPYFR63NS63SB5FANMTI3TRUTVAJANCNFSM4JO7ALUA .

I solved my problem with latest github, that is just FYI =)
thx for your work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

great-thoughts picture great-thoughts  Â·  5Comments

farazirfan47 picture farazirfan47  Â·  5Comments

reunanen picture reunanen  Â·  3Comments

ardamavi picture ardamavi  Â·  3Comments

srikanthreddybethi picture srikanthreddybethi  Â·  4Comments