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

Installing dev testthat fails on Windows R 4.2.1 on GitHub Actions #407

Closed
DavisVaughan opened this issue Aug 23, 2022 · 1 comment
Closed

Comments

@DavisVaughan
Copy link
Member

I've created a very simple package to reproduce this, no functions, it just Imports testthat and adds a Remote on dev testthat to ensure it gets installed.
https://github.com/DavisVaughan/testpaktestthat

If you go to the actions page, the only one that fails is Windows with R 4.2.1
https://github.com/DavisVaughan/testpaktestthat/actions/runs/2912273989

I've included the full log of the failure in the details below, but the relevant bit seems to be:

2022-08-23T14:22:02.2941585Z OE> Error: package or namespace load failed for 'testthat' in inDL(x, as.logical(local), as.logical(now), ...):
2022-08-23T14:22:02.2942539Z OE>  unable to load shared object 'C:/Users/runneradmin/AppData/Local/Temp/RtmpSykrUl/pkg-lib131c4633c7/testthat/libs/x64/testthat.dll':
2022-08-23T14:22:02.2943318Z OE>   LoadLibrary failure:  The specified procedure could not be found.

Note that I tried pak::pak("r-lib/testthat") locally on a Windows machine running R 4.2.1 with both rtools40 and rtools42 and it worked every time, so I'm not sure what is happening here

2022-08-23T14:22:02.2845614Z 
2022-08-23T14:22:02.2846115Z OE> * installing *source* package 'testthat' ...
2022-08-23T14:22:02.2846653Z OE> staged installation is only possible with locking
2022-08-23T14:22:02.2847398Z OE> ** using non-staged installation
2022-08-23T14:22:02.2847717Z OE> ** libs
2022-08-23T14:22:02.2849277Z OE> gcc  -I"C:/R/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT    -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -c init.c -o init.o
2022-08-23T14:22:02.2850983Z OE> gcc  -I"C:/R/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT    -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -c reassign.c -o reassign.o
2022-08-23T14:22:02.2853706Z OE> g++ -std=gnu++11  -I"C:/R/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT    -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -c test-catch.cpp -o test-catch.o
2022-08-23T14:22:02.2855558Z OE> g++ -std=gnu++11  -I"C:/R/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT    -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -c test-example.cpp -o test-example.o
2022-08-23T14:22:02.2858282Z OE> g++ -std=gnu++11  -I"C:/R/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT    -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -c test-runner.cpp -o test-runner.o
2022-08-23T14:22:02.2863550Z OE> In file included from ../inst/include/testthat.h:1,
2022-08-23T14:22:02.2867952Z OE>                  from test-runner.cpp:7:
2022-08-23T14:22:02.2929769Z OE> ../inst/include/testthat/testthat.h: In function 'std::ostream& Catch::cout()':
2022-08-23T14:22:02.2931405Z OE> ../inst/include/testthat/testthat.h:145:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
2022-08-23T14:22:02.2931950Z OE>   145 | }
2022-08-23T14:22:02.2932355Z OE>       | ^
2022-08-23T14:22:02.2933089Z OE> ../inst/include/testthat/testthat.h: In function 'std::ostream& Catch::cerr()':
2022-08-23T14:22:02.2934048Z OE> ../inst/include/testthat/testthat.h:152:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
2022-08-23T14:22:02.2934544Z OE>   152 | }
2022-08-23T14:22:02.2934834Z OE>       | ^
2022-08-23T14:22:02.2936078Z OE> g++ -std=gnu++11 -shared -s -static-libgcc -o testthat.dll tmp.def init.o reassign.o test-catch.o test-example.o test-runner.o -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/R/bin/x64 -lR
2022-08-23T14:22:02.2937181Z OE> installing to C:/Users/RUNNER~1/AppData/Local/Temp/RtmpSykrUl/pkg-lib131c4633c7/testthat/libs/x64
2022-08-23T14:22:02.2937634Z OE> ** R
2022-08-23T14:22:02.2937943Z OE> ** inst
2022-08-23T14:22:02.2938470Z OE> ** byte-compile and prepare package for lazy loading
2022-08-23T14:22:02.2938857Z OE> ** help
2022-08-23T14:22:02.2939334Z OE> *** installing help indices
2022-08-23T14:22:02.2939665Z OE> *** copying figures
2022-08-23T14:22:02.2940024Z OE> ** building package indices
2022-08-23T14:22:02.2940402Z OE> ** installing vignettes
2022-08-23T14:22:02.2940836Z OE> ** testing if installed package can be loaded
2022-08-23T14:22:02.2941585Z OE> Error: package or namespace load failed for 'testthat' in inDL(x, as.logical(local), as.logical(now), ...):
2022-08-23T14:22:02.2942539Z OE>  unable to load shared object 'C:/Users/runneradmin/AppData/Local/Temp/RtmpSykrUl/pkg-lib131c4633c7/testthat/libs/x64/testthat.dll':
2022-08-23T14:22:02.2943318Z OE>   LoadLibrary failure:  The specified procedure could not be found.
2022-08-23T14:22:02.2943693Z OE> 
2022-08-23T14:22:02.2944187Z OE> Error: loading failed
2022-08-23T14:22:02.2944602Z OE> Execution halted
2022-08-23T14:22:02.2944980Z OE> ERROR: loading failed
2022-08-23T14:22:02.2945713Z OE> * removing 'C:/Users/RUNNER~1/AppData/Local/Temp/RtmpSykrUl/pkg-lib131c4633c7/testthat'
2022-08-23T14:22:02.2946049Z 
2022-08-23T14:22:02.2946210Z  Stack trace:
2022-08-23T14:22:02.2946417Z 
2022-08-23T14:22:02.2946621Z  12. (function (...)  ...
2022-08-23T14:22:02.2947226Z  13. base:::withCallingHandlers(cli_message = function(msg) { ...
2022-08-23T14:22:02.2947751Z  14. get("lockfile_install_internal", asNamespace("pak"))(...)
2022-08-23T14:22:02.2948126Z  15. plan$install()
2022-08-23T14:22:02.2948625Z  16. pkgdepends:::install_package_plan(plan, lib = private$library,  ...
2022-08-23T14:22:02.2949103Z  17. base:::withCallingHandlers({ ...
2022-08-23T14:22:02.2949550Z  18. pkgdepends:::handle_events(state, events)
2022-08-23T14:22:02.2950773Z  19. pkgdepends:::handle_event(state, i)
2022-08-23T14:22:02.2951223Z  20. pkgdepends:::stop_task(state, worker)
2022-08-23T14:22:02.2951673Z  21. pkgdepends:::stop_task_build(state, worker)
2022-08-23T14:22:02.2952225Z  22. base:::throw(new_pkg_build_error("Failed to build source package {pkg}",  ...
2022-08-23T14:22:02.2952669Z  23. base:::signalCondition(cond)
2022-08-23T14:22:02.2953063Z  24. (function (e)  ...
2022-08-23T14:22:02.2953399Z  25. base:::stop(e)
2022-08-23T14:22:02.2956252Z  26. (function (e)  ...
2022-08-23T14:22:02.2956581Z 
2022-08-23T14:22:02.2956987Z  x Failed to build source package 'testthat' 
@gaborcsardi
Copy link
Member

This is an issue with GHA's Windows, apparently: r-lib/actions#610

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

2 participants