Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[darknet] build failure #17124

Closed
Goru1890 opened this issue Apr 7, 2021 · 25 comments
Closed

[darknet] build failure #17124

Goru1890 opened this issue Apr 7, 2021 · 25 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@Goru1890
Copy link

Goru1890 commented Apr 7, 2021

Host Environment

  • OS: Windows
  • Compiler: VisualStudio2019BuildTools

To Reproduce
Steps to reproduce the behavior:
./vcpkg install darknet[opencv3-cuda,cudnn]:x64-windows

Fails because of this same error AlexeyAB/darknet#7533

Maybe the version of darknet in vcpkg should be updated.

@NancyLi1013
Copy link
Contributor

Hi @Goru1890

Thanks for posting this issue.

I cannot reproduce this on my machine with Visual Studio 2017 and CUDA 11.2.

Starting package 22/22: darknet:x64-windows
Building package darknet[core,cuda,cudnn,opencv3-cuda]:x64-windows...
-- Using cached F:/tool/vcpkg/downloads/AlexeyAB-darknet-00d578e327c22638ea12e73c4efb74c798c08de5.tar.gz
-- Extracting source F:/tool/vcpkg/downloads/AlexeyAB-darknet-00d578e327c22638ea12e73c4efb74c798c08de5.tar.gz
-- Using source at F:/tool/vcpkg/buildtrees/darknet/src/c798c08de5-d29893808b
CMake Deprecation Warning at scripts/cmake/vcpkg_check_features.cmake:182 (message):
  calling `vcpkg_check_features` without the `FEATURES` keyword has been
  deprecated.

      Please add the `FEATURES` keyword to the call.
Call Stack (most recent call first):
  ports/darknet/portfile.cmake:9 (vcpkg_check_features)
  scripts/ports.cmake:142 (include)


-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: F:/tool/vcpkg/packages/darknet_x64-windows/share/darknet/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package darknet[core,cuda,cudnn,opencv3-cuda]:x64-windows... done
Installing package darknet[core,cuda,cudnn,opencv3-cuda]:x64-windows...
Installing package darknet[core,cuda,cudnn,opencv3-cuda]:x64-windows... done
Elapsed time for package darknet:x64-windows: 3.49 min

Total elapsed time: 4.578 h

The package darknet:x64-windows provides CMake targets:

    find_package(Darknet CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Darknet::dark)

@Goru1890
Copy link
Author

Goru1890 commented Apr 13, 2021

Thanks for the reply, I tried it at well with VS2017 and that worked for me, but not with VS2019.
But if I wanna try to install Qt with VS2017 it doesn't worked, it only works with VS2019.

It's a little bit annoying to uninstall and install different VS version anytime you want to install something different.

@NancyLi1013
Copy link
Contributor

Yes, I will also try to confirm the result with VS2019. Thanks for your update.

@AlexeyAB
Copy link

@Goru1890 @NancyLi1013 @Goru1890 @cenit
Is this bug fixed in VCPKG?

@cenit
Copy link
Contributor

cenit commented Apr 15, 2021

nope, it depends on #15942 which in turn depends on AlexeyAB/darknet#7279 (which is finally ready now).
We can try to speed up things now a little bit more

@NancyLi1013
Copy link
Contributor

@cenit

There is still some other work that needs to be done to fix this issue after PR #15942 merged. Is this right?

@cenit
Copy link
Contributor

cenit commented Apr 30, 2021

nope, it should be ok now

@NancyLi1013
Copy link
Contributor

Thanks for your confirmation @cenit.

@AlexeyAB and @Goru1890

Could you please update vcpkg to the latest version to rebuild this?

@Goru1890
Copy link
Author

Goru1890 commented May 23, 2021

@NancyLi1013 sorry for the late respond.

After a successful installation of darknet[opencv3-cuda,cudnn]:x64-windows, darknet is not able to use the GPU.

I think there were some architecture incompatibilities with darknet and the new rtx 3000 series, I have a 3060.

image

@cenit
Copy link
Contributor

cenit commented May 23, 2021

you need the CUDA feature to enable cuda!

darknet[cuda,cudnn,opencv3-cuda]

@cenit
Copy link
Contributor

cenit commented May 23, 2021

but cudnn should enable it automatically, if not that's a bug in the portfile. Let me check it later :)

@Goru1890
Copy link
Author

Goru1890 commented May 24, 2021

you need the CUDA feature to enable cuda!

darknet[cuda,cudnn,opencv3-cuda]

config-x64-windows-dbg-err.log
I got this error

config-x64-windows-dbg-out.log

It seems like it is not found cudnn, but I followed these steps https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html.

EDIT:

But the darknet[cuda,opencv3-cuda] worked for me, darknet can now train with GPU, but I guess not with cudnn.

@NancyLi1013
Copy link
Contributor

@Goru1890

CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package):
  By not providing "FindCUDNN.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "CUDNN", but
  CMake did not find one.

  Could not find a package configuration file provided by "CUDNN" with any of
  the following names:

    CUDNNConfig.cmake
    cudnn-config.cmake

  Add the installation prefix of "CUDNN" to CMAKE_PREFIX_PATH or set
  "CUDNN_DIR" to a directory containing one of the above files.  If "CUDNN"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:253 (find_package)

The above error has been fixed in PR #18005. You can update vcpkg to try this again. Please let me know if this is still a problem for you.

@cenit
Copy link
Contributor

cenit commented May 25, 2021

he didn't have that error but another one, which should have already been fixed days ago by #17644

is it possible that he's still using an old vcpkg version?

please @Goru1890 do a git pull

@Goru1890
Copy link
Author

please @Goru1890 do a git pull

I always do a git pull before trying to install something with vcpkg.

@cenit
Copy link
Contributor

cenit commented May 25, 2021

I always do a git pull before trying to install something with vcpkg.

and also a vcpkg update && vcpkg upgrade ?

@Goru1890
Copy link
Author

and also a vcpkg update && vcpkg upgrade ?

I didn't try that, I will try it.

@Goru1890
Copy link
Author

image

@cenit
Copy link
Contributor

cenit commented May 25, 2021

and if you try a darknet[cudnn, ...] installation you still have the same failure?

@Goru1890
Copy link
Author

Yes

@cenit
Copy link
Contributor

cenit commented May 25, 2021

can you please remove and reinstall cudnn

.\vcpkg remove cudnn
.\vcpkg install cudnn

and post full console logs about this process, and then verify if darknet still produces same error?

@cenit
Copy link
Contributor

cenit commented May 25, 2021

also please show output of this command

dir C:\vcpkg\installed\x64-windows\share\cudnn

@Goru1890
Copy link
Author

.\vcpkg remove cudnn
.\vcpkg install cudnn

I removed darknet, cudnn, and opencv3

And then I runned vcpkg install darknet[cudnn,cuda,opencv3-cuda]:x64-windows again

Now it works perfectly, thanks for your help.

@cenit
Copy link
Contributor

cenit commented May 25, 2021

please close issue :)

@NancyLi1013
Copy link
Contributor

Thanks for your help @cenit.

I'm closing this issue for now since this issue has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

4 participants