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

LoadLibrary failure: The specified module could not be found #171

Open
sjmgarnier opened this issue Dec 24, 2019 · 11 comments
Open

LoadLibrary failure: The specified module could not be found #171

sjmgarnier opened this issue Dec 24, 2019 · 11 comments

Comments

@sjmgarnier
Copy link

This happens during the installation check for Rvision (https://ci.appveyor.com/project/sjmgarnier/rvision):

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'Rvision' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/projects/rvision/Rvision.Rcheck/00LOCK-Rvision/00new/Rvision/libs/x64/Rvision.dll':
  LoadLibrary failure:  The specified module could not be found.

The package relies on OpenCV being compiled through ROpenCVLite (installed from CRAN) first, but I'm pretty certain that the problem is not there as this step goes smoothly and there are no compilation error during the installation of Rvision (the compilation part concludes with installing to C:/projects/rvision/Rvision.Rcheck/00LOCK-Rvision/00new/Rvision/libs/x64). Also, I don't have this issue when compiling on my Windows 10 laptop (it passes all tests), so I'm assuming the problem lies with the Windows version shipping with appveyor (Windows Server 2012 R2) and a missing dll somewhere. Is there a way to find out which dll is missing in the appveyor config? I'm not too well versed in developing for Windows, so any guidance would be very much appreciated.

Thanks for your help!

@sjmgarnier
Copy link
Author

Tagging @muschellij2

@gaborcsardi
Copy link

Use dependency walker on your laptop to see which DLLs are needed.

@muschellij2
Copy link
Contributor

muschellij2 commented Dec 25, 2019

Check out https://stackoverflow.com/questions/13497222/the-specified-module-could-not-be-found-in-r for some help

Likely unrelated, but I saw Python failure in the check (does ROpenCVLite require Python 3.2 now?)

[00:01:35] -- Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.17", minimum required is "2.7") 
[00:01:35] -- Found PythonLibs: C:/Windows/System32/python27.dll (found suitable exact version "2.7.17") 
[00:01:35] Traceback (most recent call last):
[00:01:35]   File "<string>", line 1, in <module>
[00:01:35] ImportError: No module named numpy.distutils
[00:01:35] -- Could NOT find PythonInterp: Found unsuitable version "2.7.17", but required is at least "3.2" (found C:/Python27/python.exe)

@sjmgarnier
Copy link
Author

@gaborcsardi Thanks! Not sure why but Dependency Walker just hangs and becomes not responsive when I try to open the Rvision.dll file.

@sjmgarnier
Copy link
Author

@muschellij2 Yeah, I saw that. See my answer to @gaborcsardi above. Dependency Walker doesn't seem to be of much use as it just hangs and never produces any output.

Re: Python. I believe it doesn't matter in this case. OpenCV compiles just fine. I'm pretty sure it's another library that's missing.

@sjmgarnier
Copy link
Author

@gaborcsardi I figured out how to get Dependency Walker after all. I'm just an idiot apparently :-) I'm closing this now because the missing dll are not related to r-appveyor I believe.

@sjmgarnier
Copy link
Author

Reopening this issue. As stated before, there is an error during this stage of the R CMD check process: * checking whether package 'Rvision' can be installed ... ERROR. The error is due to apparently missing OpenCV DLLs (OpenCV being compiled through ROpenCVLite) as reported by Dependency Walker. However, the DLLs are actually present on the appveyor system at their expected location. Furthermore, when using remotes::install_github, everything goes well and the package can be compiled, installed and loaded without any issue on the appveyor system. Finally, R CMD check does not report any error on my local Windows 10 laptop.

Any idea why the installation process would fail during R CMD check on appveyor but not during remotes::install_github?

@muschellij2
Copy link
Contributor

muschellij2 commented Dec 29, 2019 via email

@sjmgarnier
Copy link
Author

@muschellij2 Yes, it's exactly what I did. No issue to install and load the package. The problem only appears during R CMD check on appveyor.

@muschellij2
Copy link
Contributor

muschellij2 commented Dec 29, 2019 via email

@sjmgarnier
Copy link
Author

@muschellij2 No luck with a non-staged installation. It fails on appveyor with the same error. Still no problem on my local Windows 10 machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants