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

Reduce outdated gdb and valgrind packages to dummy script packages #30158

Closed
mkoeppe opened this issue Jul 16, 2020 · 14 comments · Fixed by #38306
Closed

Reduce outdated gdb and valgrind packages to dummy script packages #30158

mkoeppe opened this issue Jul 16, 2020 · 14 comments · Fixed by #38306

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 16, 2020

These are devtools, not needed for building.

Last update to gdb was made in 2018

Last update to valgrind was made in 2019

CC: @dimpase @jhpalmieri @orlitzky

Component: packages: experimental

Issue created by migration from https://trac.sagemath.org/ticket/30158

@mkoeppe

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Jul 16, 2020

comment:2

indeed, looks like makeinfo is missing;

can we just add makeinfo to the list of reqs on Linux (typically, it's texinfo, at least on debian/ubuntu package)

alternatively modify spkg-install to configure without makeinfo.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 24, 2021

comment:4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 24, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Update gdb package Reduce outdated gdb and valgrind packages to dummy script packages Dec 20, 2021
@jhpalmieri
Copy link
Member

comment:9

Rather than dummy packages, or maybe in addition, would it make sense to put the relevant scripts in their own package? Or just document how to replicate their effects in the Developer's Guide, as I think @orlitzky suggested on sage-devel?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 24, 2022

comment:10

These packages don't supply the scripts; they are equivalent to any system installation of gdb or valgrind.

One thing that our python3 spkg does do is install some .supp files that come from the Python source distribution. Distribution packaging MIGHT install them too for use with system-packaged valgrind, but I am not sure how widespread that is.

So it could make sense to vendor python3's supp files as part of #33074.

@orlitzky
Copy link
Contributor

comment:11

What benefit would we get from script packages opposed to removal?

I think the scripts can go, but not before we add some docs. There are a few critical tricks one needs to know:

  • Entering a sage-shell
  • Passing -i to sage-ipython
  • The use of both python's and sage's suppression files
  • Setting PYTHONMALLOC=malloc in the environment
  • Ensuring that your glibc has debug symbols available

The python3 suppression rules generally won't be installed, but instead of vendoring them for the zero people that currently use this, we could probably just link to the rules file in the upstream repo. This is a process that's heavy on manual intervention anyway.

@jhpalmieri
Copy link
Member

comment:12

Replying to @mkoeppe:

These packages don't supply the scripts; they are equivalent to any system installation of gdb or valgrind.

Sorry, I wasn't very clear. By "maybe in addition," I was asking if there should be a new package that supplies the scripts, valgrind-sage-support or whatever. The point is to remove those rarely scripts from src/bin unless the user specifically requests them.

One thing that our python3 spkg does do is install some .supp files that come from the Python source distribution. Distribution packaging MIGHT install them too for use with system-packaged valgrind, but I am not sure how widespread that is.

So it could make sense to vendor python3's supp files as part of #33074.

I don't know how any of this works. If someone uses a system Python without .supp files, can they use Sage-distributed .supp files instead? For what it's worth, homebrew doesn't seem to provide these:

% find /usr/local -name "*.supp" -print 
find: /usr/local/mysql-8.0.23-macos10.15-x86_64/keyring: Permission denied
find: /usr/local/mysql-8.0.23-macos10.15-x86_64/data: Permission denied
/usr/local/Cellar/glib/2.70.3/share/glib-2.0/valgrind/glib.supp

find /System/Library/Frameworks/Python.framework -name "*.supp" -print also returns nothing, although I don't know if that's the right place to look for .supp files for the default OS X Python installation.

Anyway, if it is possible to mix .supp files for different versions of Python, or if we can create new ones using whatever Python is being used by Sage, that could be part of the same valgrind support package.

@jhpalmieri
Copy link
Member

comment:13

Regarding this I tend to agree with @orlitzky. Unlike some aspects of Sage, this is something that will only be used by people who know what they're doing, and they should be able to handle reading some docs to do it. Other parts of Sage must be accessible to math students and math researchers and other computer neophytes, but not valgrind.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 24, 2022

comment:14

Replying to @orlitzky:

What benefit would we get from script packages opposed to removal?

Dummy script packages are there for advertising system package information.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 24, 2022

comment:15

Replying to @jhpalmieri:

If someone uses a system Python without .supp files, can they use Sage-distributed .supp files instead? For what it's worth, homebrew doesn't seem to provide these

Yes, the idea of the sage-valgrind script is that it provides --suppressions options to valgrind.

I like the idea of this script, but the details need updating. I needed valgrind only once in the last 5 years and noticed that it was outdated but didn't have the energy to make the proper update. For such rare uses, an updated script (and a vendored copy of the Python suppressions -- note that they are NOT frequently updated upstream) would be of great value.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 24, 2022

comment:16

Replying to @jhpalmieri:

I was asking if there should be a new package that supplies the scripts, valgrind-sage-support or whatever. The point is to remove those rarely scripts from src/bin unless the user specifically requests them.

That would of course be possible; but I am not sure if it would be an improvement.

@orlitzky
Copy link
Contributor

comment:17

Replying to @mkoeppe:

Replying to @orlitzky:

What benefit would we get from script packages opposed to removal?

Dummy script packages are there for advertising system package information.

Yeah, I know, but... do we really need to suggest installing gdb and valgrind to people? Installing them doesn't improve the normal sage experience. And anyone who's actually going to use them is aware of their existence.

@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 7, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe removed this from the sage-10.0 milestone Mar 16, 2023
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 29, 2024

Replying to @jhpalmieri:

If someone uses a system Python without .supp files, can they use Sage-distributed .supp files instead? For what it's worth, homebrew doesn't seem to provide these

Yes, the idea of the sage-valgrind script is that it provides --suppressions options to valgrind.

I like the idea of this script, but the details need updating. I needed valgrind only once in the last 5 years and noticed that it was outdated but didn't have the energy to make the proper update. For such rare uses, an updated script (and a vendored copy of the Python suppressions -- note that they are NOT frequently updated upstream) would be of great value.

The scripts are updated in:

The packages are reduced to dummy in:

vbraun pushed a commit to vbraun/sage that referenced this issue Aug 27, 2024
sagemathgh-38306: Reduce outdated `gdb` and `valgrind` packages to dummy packages
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- As discussed in sagemath#30158.

Resolves sagemath#30158.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38306
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this issue Aug 28, 2024
sagemathgh-38306: Reduce outdated `gdb` and `valgrind` packages to dummy packages
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- As discussed in sagemath#30158.

Resolves sagemath#30158.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38306
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
@mkoeppe mkoeppe added this to the sage-10.5 milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants