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

/usr/bin/time should be a pre-req #37832

Closed
dimpase opened this issue Apr 19, 2024 · 8 comments · Fixed by #37840
Closed

/usr/bin/time should be a pre-req #37832

dimpase opened this issue Apr 19, 2024 · 8 comments · Fixed by #37840
Milestone

Comments

@dimpase
Copy link
Member

dimpase commented Apr 19, 2024

from #37785

Instead of suppressing things, just make time a pre-req. In particular, as it appears to cause breakage beyond warnings only, see

https://groups.google.com/g/sage-devel/c/l2MFDazkpMQ/m/_t9LFC06BAAJ

file:///home/pi/sage/local/var/lib/sage/venv-python3.12/var/lib/sage/wheels/cypari2-2.1.5-cp312-cp312-linux_x86_64.whl->-r
/home/pi/sage/local/var/lib/sage/venv-python3.12/var/lib/sage/scripts/cypari/spkg-requirements.txt
(line 1)) (1.11.4)
[cypari-2.1.5] [spkg-pipinst] Installing collected packages: cypari2
[cypari-2.1.5] [spkg-pipinst] Successfully installed cypari2-2.1.5
[cypari-2.1.5] [spkg-pipinst] cat: ./spkg-pipinst.time: No such file or
directory
[cypari-2.1.5] Deleting build directory
/home/pi/sage/local/var/lib/sage/venv-python3.12/var/tmp/sage/build/cypari-2.1.5
[cypari-2.1.5] Finished installing cypari-2.1.5
[cypari-2.1.5] cat: /home/pi/sage/logs/pkgs/cypari-2.1.5.time: Aucun
fichier ou dossier de ce nom
make[2]: *** [Makefile:3052 : all-build] Erreur 2
make[2] : on quitte le répertoire « /home/pi/sage/build/make » 
@dimpase
Copy link
Member Author

dimpase commented Apr 19, 2024

@tornaria @mkoeppe

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 19, 2024

@dimpase What you did in #36726 will not be repeated.

@dimpase

This comment was marked as abuse.

@tornaria
Copy link
Contributor

The issue is not (only) about a missing /usr/bin/time but also about using option -h which is not generally available (not on gnu time, at least).

In #37785 (comment) I outlined an idea of how to use the bash builtin for time instead.

The fix in #37785 is not good IMO because it just disables the feature for a lot of platforms (i.e. it won't show the build time if /usr/bin/time is not available or does not support -h), but since @mkoeppe said he would work on it later, I think we can live with that.

(I'm still available to talk about it, but I can't really run the code since I don't normally build sage-the-distro, I don't even run ./configure)

@dimpase I hope this satisfies you, if so, maybe closing this issue is a good move.

@dimpase
Copy link
Member Author

dimpase commented Apr 19, 2024

I opened the issue because I cannot comment on or review code in PRs opened by mkoeppe.

I think the solution there just sweeps the problem under the carpet, and this is not good.

I suppose that every system supported by Sage has /usr/bin/time, so it can be a prereq

@tornaria
Copy link
Contributor

I opened the issue because I cannot comment on or review code in PRs opened by mkoeppe.

I know that is inconvenient, and I hope @mkoeppe will rethink about this, but I doubt it will happen if you keep triggering. Please, keep stating your concerns, your viewpoints, and your opposition, but in a more constructive tone (this also applies to others, each one will know... I've reported myself to sage-conduct in the past so I'm not free from mistakes either)

I think the solution there just sweeps the problem under the carpet, and this is not good.

I agree and I said so in that PR, and I outlined a way for a better fix. Maybe an issue can be opened from my comment in the PR.

I suppose that every system supported by Sage has /usr/bin/time, so it can be a prereq

As I said, this would not fix the problem, since the code uses /usr/bin/time -h which is often not available:

$ /usr/bin/time -h -o /dev/null true
/usr/bin/time: invalid option -- 'h'
Try '/usr/bin/time --help' for more information.

But please read the discussion in #37785 and feel free to create an issue from my comment to discuss further (that PR is not the place anyway since it's a temporary workaround). You can freely copy anything I said there.

@dimpase

This comment was marked as abuse.

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 20, 2024

Thanks @tornaria for speaking up. I appreciate it.

vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2024
…sh keyword `time`

    
<!-- ^ 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". -->

Follow-up after
- sagemath#37391
- sagemath#37785

... to make the display of package build times available on Linux too.

Fixes
sagemath#37785 (comment),
closes sagemath#37832.

### 📝 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: ... -->
- Depends on sagemath#37785
    
URL: sagemath#37840
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2024
…sh keyword `time`

    
<!-- ^ 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". -->

Follow-up after
- sagemath#37391
- sagemath#37785

... to make the display of package build times available on Linux too.

Fixes
sagemath#37785 (comment),
closes sagemath#37832.

### 📝 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: ... -->
- Depends on sagemath#37785
    
URL: sagemath#37840
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this issue May 24, 2024
…sh keyword `time`

    
<!-- ^ 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". -->

Follow-up after
- sagemath#37391
- sagemath#37785

... to make the display of package build times available on Linux too.

Fixes
sagemath#37785 (comment),
closes sagemath#37832.

### 📝 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: ... -->
- Depends on sagemath#37785
    
URL: sagemath#37840
Reported by: Matthias Köppe
Reviewer(s): Gonzalo Tornaría, Kwankyu Lee, Matthias Köppe
@mkoeppe mkoeppe added this to the sage-10.4 milestone May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants