kaskr / adcomp

AD computation with Template Model Builder (TMB)
Other
178 stars 81 forks source link

TMB upgrade from 1.9.11 to 1.9.12 fails under R 4.4.1 #394

Closed lghunsicker closed 5 months ago

lghunsicker commented 5 months ago

Description:

TMB upgrade from 1.9.11 to 1.9.12 fails under R 4.4.1. The upgrade works correctly under R 4.3.3. The problem is probably due to the update of Matrix under R 4.4.0+.

... gcc -I"C:/PROGRA~1/R/R-44~1.1RC/include" -DNDEBUG -I'C:/Larry/R/win-library/4.4/Matrix/include' -I'C:/Larry/R/win-library/4.4/RcppEigen/include' -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c local_stubs.c -o local_stubs.o local_stubs.c:4:10: fatal error: Matrix_stubs.c: No such file or directory 4 | #include "Matrix_stubs.c" | ^~~~ compilation terminated. make: *** [C:/PROGRA~1/R/R-44~1.1RC/etc/x64/Makeconf:289: local_stubs.o] Error 1 ERROR: compilation failed for package 'TMB'

  • removing 'C:/Larry/R/win-library/4.4/TMB'
  • restoring previous 'C:/Larry/R/win-library/4.4/TMB' Warning in install.packages : installation of package ‘TMB’ had non-zero exit status

Reproducible Steps:

See above

Current Output:

See above

Expected Output:

Correct update of package

TMB Version:

See above

R Version:

See above

Operating System:

Windows 11 updated.

kaskr commented 5 months ago

I would have expected the folder C:/Larry/R/win-library/4.4/Matrix/include to contain Matrix_stubs.c. Which version of Matrix are you using?

lghunsicker commented 5 months ago

Matrix 1.7.0. I looked at my installed Matrix folder, no Matrix_stubs. But in the parent Matrix folder there is a folder, also Matrix, that contains stubs.c. I looked on my University Windows 11 desktop, which runs R 4.3.3. The current Matrix version there is 1.6-5. It has a Matrix_stubs.c file in the 'include' subdirectory.

/ For backwards compatibility only. Packages should start using / / LinkingTo: Matrix (>= 1.6-2) and #include <Matrix/stubs.c>. /

include "Matrix/alloca.h"

include "Matrix/remap.h"

include "Matrix/stubs.c"

The R 4.4.0 update has caused quite a number of problems with packages, many dealing with the revised structure of the Matrix library. Matrix 1.7.0 explicitly requires R >= 4.4.0, as does MASS, reticulate, and I suspect a number of other packages.

larry

On Thu, Jun 20, 2024 at 10:44 AM kaskr @.***> wrote:

I would have expected the folder C:/Larry/R/win-library/4.4/Matrix/include to contain Matrix_stubs.c. Which version of Matrix are you using?

— Reply to this email directly, view it on GitHub https://github.com/kaskr/adcomp/issues/394#issuecomment-2181013899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4AP77VAFMEZ2J3GPT37ELZIL2ERAVCNFSM6AAAAABJUDHA3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBRGAYTGOBZHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Larry Hunsicker

kaskr commented 5 months ago

Just checked that the Matrix-1.7.0 source has inst/include/Matrix_stubs.c as expected. I don't know what has gone wrong with your installation, but this is not an issue with TMB or the Matrix package.

lghunsicker commented 5 months ago

I just updated my R from the 4.4.1 patch version to the just released final 4.4.1 version, and this seems to have fixed the problem. I have been able now to update TMB without problem, and the updated version runs correctly. Thanks for your patience and help.

Larry Hunsicker

On Thu, Jun 20, 2024 at 4:49 PM kaskr @.***> wrote:

Just checked that the Matrix-1.7.0 source has inst/include/Matrix_stubs.c as expected. I don't know what has gone wrong with your installation, but this is not an issue with TMB or the Matrix package.

— Reply to this email directly, view it on GitHub https://github.com/kaskr/adcomp/issues/394#issuecomment-2181615270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4AP73HBGSVATMKTJCE35TZINE5PAVCNFSM6AAAAABJUDHA3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBRGYYTKMRXGA . You are receiving this because you authored the thread.Message ID: @.***>

-- Larry Hunsicker