On Fri, 29 Aug 2025 14:11:18 +0200
quirin stier <quirin_st...@gmx.de> wrote:

> Error: package or namespace load failed for ‘GeneralizedUmatrixGPU’
> in library.dynam(lib, package, package.lib): shared object
> ‘GeneralizedUmatrixGPU.so’ not found

There's an extra line copied from OpenCL's src/Makevars file:

>> clang++-19 -std=gnu++17 -shared -L/home/hornik/tmp/R/lib -Wl,-O1 -o
>> GeneralizedUmatrixGPU.so RcppExports.o trainSESOM.o -lOpenCL
>> -L/home/hornik/tmp/R/lib -lR
>> mv GeneralizedUmatrixGPU.so R_OpenCL.so # <-- here

The OpenCL package only needs this on Windows so that the system OpenCL.dll
doesn't conflict with with the package OpenCL.dll; the change in
src/Makevars was done to simplify loading the shared library from the
package NAMESPACE [*]. Your package doesn't need to rename the shared
library.

> D:\rtools45\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find
> -lOpenCL: No such file or directory

That could be due to the OpenCL SDK shipping the import library in
lib/x86_64 instead of lib/x64 where your package's 'configure.win'
expects it, or for some other reason. When you discussed the installation of 
OpenCL SDK on Win-Builder with Dr. Uwe Ligges, was a specific version of it 
mentioned?

-- 
Best regards,
Ivan

[*] https://github.com/s-u/OpenCL/pull/20

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to