Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-19 Thread Russell Almond
Not sure if I reported the success here or not. Copying the 3rd party DLL, but not the .lib file, to the src directory does work around the bug in the linker. The complete working solution can be seen at https://github.com/ralmond/RNetica. Thanks for the help. --Russell On 7/17/23

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-17 Thread Russell Almond
Okay, I've changed my Makevars.win so that it has: PKG_LIBS = -L. -L${NETICA_LIB} -lNetica and all: NeticaDLL where ${NETICA_LIB} is set to the appropriate lib subdirectory of the unpacked sources. I'm no longer getting the nm.exe error, so it may be a bug in ld.exe. | gcc -shared -s -s

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-17 Thread Russell Almond
Thanks for the suggestion. In previous versions of the build tools, I know I needed the .lib files. I'm also not sure I'm copying the DLL files into the right directory, so that maybe the linker isn't seeing it. This always confuses me as the location used to build and compile is (potentiall

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-17 Thread Ivan Krylov
В Fri, 14 Jul 2023 22:25:51 +0300 Ivan Krylov пишет: > Maybe it's a red herring. Maybe the message from nm about missing file > has always been harmless, and what we're seeing here is a bug in the > toolchain; perhaps ld.exe doesn't like something about Netica.lib so > much that it crashes. I thi

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-14 Thread Ivan Krylov
On Fri, 14 Jul 2023 13:29:32 -0400 Russell Almond wrote: > So I'm confused.  Why is the Makevars -> Makefile conversion assuming > that all targets of $(SHLIB) (or all) are executable files, ignoring > the PHONY declaration? The $(SHLIB) target is defined in ${R_HOME}/share/make/winshlib.mk. In

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-14 Thread Russell Almond
Thanks.  I know know the problem is in the Makevars.win; however, I'm still confused. My `Makevars.win` had | .PHONY:   all NeticaDLL clean | all: $(SHLIB) | $(SHLIB): NeticaDLL | | NeticaDLL: |    mkdir -p "$(INSTALL_LIB)" |    cp "${NETICA_LIB}/Netica.dll" "${INSTALL_LIB}" |    cp "${NETICA_L

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-14 Thread Ivan Krylov
В Wed, 12 Jul 2023 09:41:11 -0400 Russell Almond пишет: >   C:\rtools43\x86_64-w64-mingw32.static.posix\bin\nm.exe: > 'NeticaDLL': No such file This is where the problem starts. You can retrace the steps that R takes when building and installing the package by running sh configure.win manually

Re: [R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-12 Thread Jeff Newmiller
Use of precompiled code is not allowed in CRAN. This looks like your package needs to be distributed elsewhere... e.g. via GitHub. On July 12, 2023 6:41:11 AM PDT, Russell Almond wrote: >I have an R package (RNetica available at >https://ralmond.r-universe.dev/RNetica and >https://github.com/

[R-pkg-devel] Package Load fails to find 3rd Party DLL

2023-07-12 Thread Russell Almond
I have an R package (RNetica available at https://ralmond.r-universe.dev/RNetica and https://github.com/ralmond/RNetica) which links to a 3rd party library Netica.dll, so RNetica.dll (built from my C code) calls the 3rd party code. The config.win script downloads Netica.dll and moves it into th