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

Fix #49 error of caused by Windows GCC compiler #50

Merged
merged 13 commits into from
Aug 1, 2024

Conversation

iblacksand
Copy link
Collaborator

Fixes error caused by gcc compiler provided by Rtools. Tested on R's provided windows check service.

@iblacksand
Copy link
Collaborator Author

iblacksand commented Jun 25, 2024

Warnings with CRAN checks caused by depreciated R APIs. Being tracked in extendr/extendr#806.

@iblacksand
Copy link
Collaborator Author

Build errors due to non-api calls. Fixed in the master branch of extendr/rextendr. Will update this PR with the latest version of rextendr when it is released.

@CGMossa
Copy link
Contributor

CGMossa commented Jul 1, 2024

The non-api issues are dealt with in #51

@iblacksand iblacksand force-pushed the 49-windows-linking-error branch from 73d78b5 to ef26b78 Compare July 1, 2024 14:37
@CGMossa
Copy link
Contributor

CGMossa commented Jul 1, 2024

I'm very curious as to what is going on here.. Can you explain it to me?

@iblacksand
Copy link
Collaborator Author

This PR aims to address the linker issue in #49. The exact issue is hard to replicate, as it passes checks in my GitHub action, and passes both R-release and R-devel on the win-builder service (https://win-builder.r-project.org/).

There has been progress in this PR, as the current master branch will fail to build on win-builder. After I updated src/Makevars.win.in to follow the https://github.com/r-rust/hellorust structure, it builds without any errors. However, it still doesn't fix the linker issue the user faces.

I think the last piece of the puzzle is lgcc_eh, which from my understanding is not provided by Rtools. From my previous Makevars.win.in, the fix was to create an empty lgcc_eh.a file that is in the LIBRARY_PATH variable. This is going to be my next attempt to fix.

If you have any suggestions for how to fix this error, I would welcome any comments.

@CGMossa
Copy link
Contributor

CGMossa commented Jul 1, 2024

Yes! We routinely update the package configuration in rextendr (the R-package for using Rust in R with extendr). I'd really just recommend..

remotes::install_github("extendr/rextendr")
usethis::create_package("exampleRustRpkg")
rextendr::use_extendr()

And have a look at those files, copy them over, and adjust them to meet your package's needs.

Sorry, but these things are constantly changing, and we couldn't get it right the first time.

@CGMossa
Copy link
Contributor

CGMossa commented Jul 1, 2024

The reason I'm also here, is because I think you'd have some issues here with extracting info from the shell in Makevars. Something about using backticks for this for compatibility.. I don't recall the details of this, unfortunately.

PS: found it
image

See https://cran.r-project.org/doc/manuals/R-exts.html#Writing-portable-packages-1

@iblacksand
Copy link
Collaborator Author

This branch has solved some other peoples issues with windows, so I will merge this PR. I will work on a fix in a separate branch.

@iblacksand iblacksand merged commit cec3285 into master Aug 1, 2024
6 checks passed
@iblacksand iblacksand deleted the 49-windows-linking-error branch August 1, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants