CUDA-Toolkit-11 on linux does not come with libnppicom.so. Cannot build OpenCV 4.3.0

Title says most of it. When attempting to build latest OpenCV release 4.3.0 on CUDA 11.0 (All latest dev builds for Windows, WSL, Nvidia, etc) the build fails with the error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppicom_LIBRARY (ADVANCED)

CMake Variable for NPPICOM show NOTFOUND:

CUDA_nppial_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppial.so
CUDA_nppicc_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppicc.so
CUDA_nppicom_LIBRARY:FILEPATH=CUDA_nppicom_LIBRARY-NOTFOUND
CUDA_nppidei_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppidei.so
CUDA_nppif_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppif.so

File does not exist in /usr/local/cuda/lib64:

libnppial.so.11.1.0.218
libnppial_static.a
libnppicc.so
libnppicc.so.11
libnppicc.so.11.1.0.218
libnppicc_static.a
libnppidei.so
libnppidei.so.11

Followed everything here for my setup: CUDA on WSL :: CUDA Toolkit Documentation

EDIT: Not sure if related but I also have this error showing up in calls to apt install now. I believe its because that path is where the direct link is to that file, not a symbolic link. Not sure what to do about this or if its causing issues

sudo ldconfig
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
1 Like

This is a known issue and the fix is being worked on. You can ignore this message as it is just a warning of ldconfig.

We will look into the missing npp functionality.

Thanks for the reply. The latest master code from OpenCV removed its dependence on that library I believe so I was able to finish compiling it despite the missing library. So not sure maybe that removal is intentional or really is missing from the build.

Probably unrelated to this issue but figured I’d add instead of making a new thread, but got a flash just a minute ago of all my screens going blank when I think I was clicking around on a youtube video playing. Here is the event viewer data:

Log Name:      System
Source:        nvlddmkm
Date:          7/17/2020 7:32:32 PM
Event ID:      14
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      TheGibson
Description:
The description for Event ID 14 from source nvlddmkm cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

\Device\Video4
CMDre 00000003 00000200 00000000 00000005 00000018

The message resource is present but the message was not found in the message table

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="nvlddmkm" />
    <EventID Qualifiers="49322">14</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-07-18T00:32:32.4876333Z" />
    <EventRecordID>422</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="22236" />
    <Channel>System</Channel>
    <Computer>TheGibson</Computer>
    <Security />
  </System>
  <EventData>
    <Data>\Device\Video4</Data>
    <Data>CMDre 00000003 00000200 00000000 00000005 00000018</Data>
    <Binary>0000000002003000000000000E00AAC0000000000000000000000000000000000000000000000000</Binary>
  </EventData>
</Event>

Actually I still have the same problem. I fixed it by copying the missing libraries vom cuda 10.2 but still I thinnk we need a solution…

Was this issue ever resolved? I have not tries copying the library from cuda 10.2, but I can.

…That just seems so hacky though…