-
Notifications
You must be signed in to change notification settings - Fork 25
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
libgcc_eh.a hack no longer needed? #279
Comments
Hi! Funny thing I am struggling with this right now. We unfortunately still rely on this, and new version of Rtools (42 & 43) does not have it, so we rely on hacks. What did you do to solve it? |
I upgraded rust to the latest version on windows, afaict, it no longer needs it. But perhaps something in my package stack changed as well, I'm not sure. |
Can you be more specific on your setup? Which version of rtools do you use, which toolchain on windows and which target? |
We currently do something like this rextendr/inst/templates/Makevars.win Line 22 in f8f964b
|
Also summoning @yutannihilation & @CGMossa since you both worked with this issue before. |
I removed the stub in r-rust/gifski@153c92f. You can see from the CI that it works with rtools43 and the latest rust. CRAN on Windows has Rust 1.69.0 now I think. |
I am not sure I follow, but this looks to me like you are using Rtools40.
We use this linker rextendr/inst/templates/Makevars.ucrt Line 3 in f8f964b
Don't get me wrong, I would be so happy if we could drop this hack, but right now I do not understand how. |
This part is only used on < R 4.2.
I think you don't have to do anything, afaict, the latest rust simply no longer hardcodes |
Ok, I see. I will have to check this manually on our test projects. I hope it is so, this hack is painful to maintain. I will get back to you with results, thanks for letting us know! |
Thanks for sharing, Jeroen. Just for reference, it seems rustc itself still uses |
I confirmed it works without libgcc_eh.a at least on my local and on GHA. |
It seems to work regardless of the version of Rust toolchain. So, if something was changed, it's probably on R's side? I don't setup the CI very carefully, so I might be wrong here. https://github.com/yutannihilation/string2path/actions/runs/5036028906 |
Oh, extendr fails. Curious. https://github.com/extendr/extendr/actions/runs/5036073371/jobs/9031977734 |
The failure happens on the test step, not on the build step. This is probably because |
It seems to be caused by setting a custom linker. If I use this I get the
However if I comment this out, the problem disappears. Setting Perhaps we should just set the PATH correctly to the toolchain and not override the linker. R 4.2 and up automatically set the PATH so it might just work. |
Yeah, you know, not using the Rtools' toolchain stops the error. But, I think that's not what we want. |
To be clear, I think you will argue it works fine in most of the cases. I can probably agree with you, but extendr has some reasons. |
I don't understand what you mean. We still set the PATH such that gcc is used from rtools, otherwise the embedded C code would not work in the first place. We just use the default linker settings? Either way this is probably gone off topic, I am happy to have found that the |
Oh, you didn't know this? Then, sorry. The default linker name of the GNU target is |
I think the latest versions of rust on Windows no longer link to
-lgcc_eh
. I just released a version of gifski to CRAN that no longer has thelibgcc_eh.a
stub and all seems OK.Can you confirm if you find the same?
The text was updated successfully, but these errors were encountered: