[Rd] problem adding gdb to RTOOLS40 on Windows
tom@@@k@||ber@ @end|ng |rom gm@||@com
Thu Apr 15 08:59:43 CEST 2021
On 4/15/21 6:52 AM, Bravington, Mark (Data61, Hobart) wrote:
> I've not been able to install gdb for RTOOLS40 on Windows 10. The rtools installer (rtools40-x64_86.exe) doesn't seem to include gdb by default, and when I follow the instructions for adding gdb (which I tracked down at https://github.com/r-windows/docs/blob/master/faq.md) this is what happened:
> <cd to c:\rtools\rtools40>
> <run mingw64.exe>
> $ pacman -S mingw-w64-x86_64-gdb
> resolving dependencies...
> looking for conflicting packages...
> Packages (8) mingw-w64-x86_64-expat-2.2.9-9002
> Total Download Size: 3.46 MiB
> Total Installed Size: 83.77 MiB
> :: Proceed with installation? [Y/n] y
> :: Retrieving packages...
> error: failed retrieving file 'mingw-w64-x86_64-gdb-8.3.1-9500-any.pkg.tar.xz' from cloud.r-project.org : The requested URL returned error: 404
> error: failed retrieving file 'mingw-w64-x86_64-gdb-8.3.1-9500-any.pkg.tar.xz' from cran.r-project.org : The requested URL returned error: 404
> error: failed retrieving file 'mingw-w64-x86_64-gdb-8.3.1-9500-any.pkg.tar.xz' from dl.bintray.com : The requested URL returned error: 404
> warning: failed to retrieve some files
> error: failed to commit transaction (failed to retrieve some files)
> Errors occurred, no packages were upgraded.
> Something very similar happens if I try the 32bit version.
> Do you have any suggestions?
> - I used to have this stuff working OK with R3.6/RTOOLS35 but have not needed to go back to C for a while. The version of gdb in RTOOLS is 7.9.1; I tried copying that gdb.exe into RTOOLS40 but it just exited instantly when I tried to run it from there.
If you can still run gdb in your Rtools 3.5 installation, you should be
able to use it to connect to the R session to debug, even if that R
session is run say from a terminal that originates from Rtools 4.
In the R session run Sys.getpid().
In the gdb session, run
(where xxx is the PID number)
> - NB I have absolutely no idea what is meant by msys2 or pacman or any of that, I'm just following instructions...
Msys2 is software distribution originating from archlinux, with pacman
package manager. Rtools4 is a customized version of Msys2. You should be
able to use gdb from any distribution, including Rtools 3.5 or say
vanilla Msys2 (that is what I do when building for UCRT - I use gdb and
other tools from vanilla Msys2).
> Mark Bravington
> CSIRO Marine Lab
> R-devel using r-project.org mailing list
More information about the R-devel