problem adding gdb to RTOOLS40 on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problem adding gdb to RTOOLS40 on Windows

Bravington, Mark (Data61, Hobart)
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
             mingw-w64-x86_64-gettext-0.19.8.1-9002
             mingw-w64-x86_64-libsystre-1.0.1-9002
             mingw-w64-x86_64-libtre-git-r128.6fb7206-9002
             mingw-w64-x86_64-ncurses-6.1.20180526-9002
             mingw-w64-x86_64-readline-8.0.001-2
             mingw-w64-x86_64-termcap-1.3.1-9002
             mingw-w64-x86_64-gdb-8.3.1-9500

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.
 
 - NB I have absolutely no idea what is meant by msys2 or pacman or any of that, I'm just following instructions...


Thanks
Mark

 


Mark Bravington
CSIRO Marine Lab
Hobart
Australia

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem adding gdb to RTOOLS40 on Windows

Voeten, C.C.
Hi Mark,

Try pacman -Suy first to update pacman's package database. It's quite possible that the versions pacman is trying to install are no longer available due to being out of date.

HTH,
Cesko

-----Original Message-----
From: R-devel <[hidden email]> On Behalf Of Bravington, Mark (Data61, Hobart)
Sent: Thursday, April 15, 2021 6:53 AM
To: R-Devel-2 <[hidden email]>
Subject: [Rd] problem adding gdb to RTOOLS40 on Windows

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
             mingw-w64-x86_64-gettext-0.19.8.1-9002
             mingw-w64-x86_64-libsystre-1.0.1-9002
             mingw-w64-x86_64-libtre-git-r128.6fb7206-9002
             mingw-w64-x86_64-ncurses-6.1.20180526-9002
             mingw-w64-x86_64-readline-8.0.001-2
             mingw-w64-x86_64-termcap-1.3.1-9002
             mingw-w64-x86_64-gdb-8.3.1-9500

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.
 
 - NB I have absolutely no idea what is meant by msys2 or pacman or any of that, I'm just following instructions...


Thanks
Mark

 


Mark Bravington
CSIRO Marine Lab
Hobart
Australia

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem adding gdb to RTOOLS40 on Windows

Tomas Kalibera
In reply to this post by Bravington, Mark (Data61, Hobart)
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
>               mingw-w64-x86_64-gettext-0.19.8.1-9002
>               mingw-w64-x86_64-libsystre-1.0.1-9002
>               mingw-w64-x86_64-libtre-git-r128.6fb7206-9002
>               mingw-w64-x86_64-ncurses-6.1.20180526-9002
>               mingw-w64-x86_64-readline-8.0.001-2
>               mingw-w64-x86_64-termcap-1.3.1-9002
>               mingw-w64-x86_64-gdb-8.3.1-9500
>
> 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

solib-search-path
attach xxx
(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).

Tomas

>
>
> Thanks
> Mark
>
>  
>
>
> Mark Bravington
> CSIRO Marine Lab
> Hobart
> Australia
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem adding gdb to RTOOLS40 on Windows

Avraham Adler
In reply to this post by Voeten, C.C.
Also, packages should be installed in the MSYS2 environment and not the
MINGW64. Invoke msys2.exe, synchronize with Jeroen’s via the pacman -Syu,
and then try the install. It should work as Jeroen has gdb in the upstream
repository [
https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-gdb]

Thanks,

Avi

On Thu, Apr 15, 2021 at 2:59 AM Voeten, C.C. <[hidden email]>
wrote:

> Hi Mark,
>
> Try pacman -Suy first to update pacman's package database. It's quite
> possible that the versions pacman is trying to install are no longer
> available due to being out of date.
>
> HTH,
> Cesko
>
> -----Original Message-----
> From: R-devel <[hidden email]> On Behalf Of Bravington,
> Mark (Data61, Hobart)
> Sent: Thursday, April 15, 2021 6:53 AM
> To: R-Devel-2 <[hidden email]>
> Subject: [Rd] problem adding gdb to RTOOLS40 on Windows
>
> 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
>              mingw-w64-x86_64-gettext-0.19.8.1-9002
>              mingw-w64-x86_64-libsystre-1.0.1-9002
>              mingw-w64-x86_64-libtre-git-r128.6fb7206-9002
>              mingw-w64-x86_64-ncurses-6.1.20180526-9002
>              mingw-w64-x86_64-readline-8.0.001-2
>              mingw-w64-x86_64-termcap-1.3.1-9002
>              mingw-w64-x86_64-gdb-8.3.1-9500
>
> 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.
>
>  - NB I have absolutely no idea what is meant by msys2 or pacman or any of
> that, I'm just following instructions...
>
>
> Thanks
> Mark
>
>
>
>
> Mark Bravington
> CSIRO Marine Lab
> Hobart
> Australia
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Sent from Gmail Mobile

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem adding gdb to RTOOLS40 on Windows

Bravington, Mark (Data61, Hobart)
Excellent, thank you all. Doing "pacman -Syu" before "pacman -S gdb...." did the trick, and yes it's a different version of gdb compared to what pacman was previously trying to install. Might be worth updating the RTOOLS40 documentation to recommend doing -Syu first.

Jeroen's documentation says to do the pacman bit from mingw64, and separately from mingw32--- whereas Avraham's suggestion is to do it just from msys2.  I actually did both; gdb seems to end up in the same place regardless, but tomorrow I'll find out if it's *really* worked...

Thanks
Mark

Mark Bravington
CSIRO Marine Lab
Hobart
Australia


________________________________________
From: Avraham Adler <[hidden email]>
Sent: Thursday, 15 April 2021 17:09
To: Voeten, C.C.
Cc: Bravington, Mark (Data61, Hobart); R-Devel-2
Subject: Re: [Rd] problem adding gdb to RTOOLS40 on Windows

Also, packages should be installed in the MSYS2 environment and not the MINGW64. Invoke msys2.exe, synchronize with Jeroen’s via the pacman -Syu, and then try the install. It should work as Jeroen has gdb in the upstream repository [
https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-gdb]

Thanks,

Avi

On Thu, Apr 15, 2021 at 2:59 AM Voeten, C.C. <[hidden email]<mailto:[hidden email]>> wrote:
Hi Mark,

Try pacman -Suy first to update pacman's package database. It's quite possible that the versions pacman is trying to install are no longer available due to being out of date.

HTH,
Cesko

-----Original Message-----
From: R-devel <[hidden email]<mailto:[hidden email]>> On Behalf Of Bravington, Mark (Data61, Hobart)
Sent: Thursday, April 15, 2021 6:53 AM
To: R-Devel-2 <[hidden email]<mailto:[hidden email]>>
Subject: [Rd] problem adding gdb to RTOOLS40 on Windows

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
             mingw-w64-x86_64-gettext-0.19.8.1-9002
             mingw-w64-x86_64-libsystre-1.0.1-9002
             mingw-w64-x86_64-libtre-git-r128.6fb7206-9002
             mingw-w64-x86_64-ncurses-6.1.20180526-9002
             mingw-w64-x86_64-readline-8.0.001-2
             mingw-w64-x86_64-termcap-1.3.1-9002
             mingw-w64-x86_64-gdb-8.3.1-9500

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<http://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<http://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<http://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.

 - NB I have absolutely no idea what is meant by msys2 or pacman or any of that, I'm just following instructions...


Thanks
Mark




Mark Bravington
CSIRO Marine Lab
Hobart
Australia

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
--
Sent from Gmail Mobile

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem adding gdb to RTOOLS40 on Windows

Jeroen Ooms
On Thu, Apr 15, 2021 at 10:19 AM Bravington, Mark (Data61, Hobart)
<[hidden email]> wrote:
>
> Excellent, thank you all. Doing "pacman -Syu" before "pacman -S gdb...." did the trick, and yes it's a different version of gdb compared to what pacman was previously trying to install. Might be worth updating the RTOOLS40 documentation to recommend doing -Syu first.

OK I have added a line to the docs. FYI, you can combine the two
commands into one:

  pacman -Sy mingw-w64-x86_64-gdb

This will first update the repository index (-y) and the install the package.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel