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

lib_lightgbm.dll is not getting loaded while running benchmarks on .NetFramework #1945

Closed
Anipik opened this issue Dec 20, 2018 · 6 comments
Closed
Assignees

Comments

@Anipik
Copy link
Contributor

Anipik commented Dec 20, 2018

when we try to run this https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs#L50
and
https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs#L47

on .netFramework, the benchmark is not able to load the lib_lightgbm.dll

Unexpected exception: Unable to load DLL 'lib_lightgbm': The specified module could not be found. (Exception from HRESULT: 0x8007007E), 'System.DllNotFoundException'

The benchmarks run properly on .NetCore

cc @danmosemsft @eerhardt @adamsitnik

@danmoseley
Copy link
Member

@TomFinley who is the owner of the lightgbm package who can look at this?

@codemzs
Copy link
Member

codemzs commented Dec 27, 2018

Are you getting this error on other non windows platform? Based on very quick search seems like windows upgrade error. This dll comes from a nuget that is published by @guolinke

@Anipik
Copy link
Contributor Author

Anipik commented Dec 27, 2018

I am getting this error in windows platform. I have not checked it for non-windows platform

@eerhardt
Copy link
Member

eerhardt commented Jan 2, 2019

@Anipik - can you try adding <RuntimeIdentifier>win-x64</RuntimeIdentifier> to your .csproj? By default, no RID is being specified - meaning you are building for "RID-agnostic" or "RID-less". Thus, no native assemblies are being copied from the NuGet packages. Setting win-x64 tells the build system to copy the x64 assemblies to the output folder.

@Anipik
Copy link
Contributor Author

Anipik commented Jan 2, 2019

@eerhardt I tried running it by specifying 64 bit its still not able to find the lighgbm dll

@artemiusgreat
Copy link

artemiusgreat commented Dec 30, 2019

TL.TR - another way to fix this issue is to install Microsoft Visual C++ Redistributable x64
https://support.microsoft.com/en-ae/help/2977003/the-latest-supported-visual-c-downloads

This is how it happened.

  1. Local computer works fine - Windows Pro x64
  2. OVH VPS server works fine - Windows Server 2016 x64
  3. VULTR VPS doesn't load LightGbm DLL - Windows Pro x64

Tried various combinations of publishing, including Self-Contained deployment with configuration targeting Any CPU, x86, x64, but it didn't run on server #3. Only comparing list of installed programs I noticed that the only missing part on server #3 is MS Visual C++ Redistributable x64. I think I have this update on local computer because I have VS 2019 installed, server #2 is a Server Edition, so probably has this update by default, but server #3 was a custom installation of Windows Pro and it was missing it.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants