Find and uninstall broken installed SPKGs and wheels
mkoeppe opened this issue · 83 comments
When system packages are upgraded, shared libraries that a Sage installation links to can disappear, rendering the Sage installation broken. This is a common problem, reported for example in https://groups.google.com/g/sage-devel/c/Iz8ZsmQM3Pg/m/CPl9CbHmBgAJ
To avoid a full rebuild (make distclean && make build), we can try to find the specific broken packages.
The new command make -j list-broken-packages assists the user with this:
$ make -j list-broken-packages
make --no-print-directory auditwheel_or_delocate-no-deps
sage-logger -p 'sage --pip install -r "/Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt"' '/Users/mkoeppe/s/sage/sage-rebasing/logs/pkgs/auditwheel_or_delocate.log'
[auditwheel_or_delocate] Ignoring auditwheel: markers 'sys_platform != "darwin"' don't match your environment
[auditwheel_or_delocate] Requirement already satisfied: delocate in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from -r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (0.10.2)
[auditwheel_or_delocate] Requirement already satisfied: wheel>=0.32.0 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from delocate->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (0.37.1)
[auditwheel_or_delocate] Requirement already satisfied: typing-extensions in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from delocate->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (3.10.0.0)
make[2]: warning: -jN forced in submake: disabling jobserver mode.
# Checking /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/installed/bliss-0.73+debian-1+sage-2016-08-02.p0
...
Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/lib/libumfpack.dylib'
Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib'
Error during installcheck of 'suitesparse': /Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib
Uninstall broken packages by typing:
make antic-SAGE_LOCAL-uninstall;
make e_antic-SAGE_LOCAL-uninstall;
make lcalc-SAGE_LOCAL-uninstall;
make ratpoints-SAGE_LOCAL-uninstall;
make normaliz-SAGE_LOCAL-uninstall;
make r-SAGE_LOCAL-uninstall;
make backports_zoneinfo-SAGE_VENV-uninstall;
make fastjsonschema-SAGE_VENV-uninstall;
make pytz_deprecation_shim-SAGE_VENV-uninstall;
make stack_data-SAGE_VENV-uninstall;
make tinycss2-SAGE_VENV-uninstall;
make tzdata-SAGE_VENV-uninstall;
make suitesparse-SAGE_LOCAL-uninstall;
real 2m25.787s
user 4m54.270s
sys 4m0.796s
The core functionality is implemented by the new command sage-spkg-installcheck (implemented in sage_bootstrap):
$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose givaro'
Checking shared library file 'lib/libgivaro.9.dylib'
Checking shared library file 'lib/libgivaro.dylib'
$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose matplotlib $SAGE_VENV'
Checking wheel file 'var/lib/sage/wheels/matplotlib-3.5.1-cp310-cp310-macosx_12_0_x86_64.whl'
$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose e_antic'
Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/lib/libeantic.0.dylib'
ERROR [libsana|get_dependencies:137]:
/usr/local/opt/flint/lib/libflint-16.dylib not found:
Needed by: /Users/mkoeppe/s/sage/sage-rebasing/local/lib/libeantic.0.dylib
Error during installcheck of 'e_antic': Could not find all dependencies.
It inspects the installation records in $SAGE_LOCAL/var/lib/sage/installed/ and all shared libraries and platform wheels listed there.
On macOS, instead of using otool directly, we use delocate-listdeps from https://pypi.org/project/delocate/
On Linux, instead of using ldd directly, we use auditwheel.lddtree.lddtree (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/lddtree.py)
(Both packages are also used by cibuildwheel)
See also: #34205 Optionally run auditwheel/delocate on wheels before installing them
Depends on #29097
CC: @dimpase @jhpalmieri @nbruin @EmmanuelCharpentier
Component: build
Author: Matthias Koeppe
Branch/Commit: 3c70a38
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/34203
Description changed:
---
+++
@@ -1,3 +1,4 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd` on any shared libraries and uninstall them if they refer to nonexisting libraries.
+The core functionality is implemented by the new command `build/bin/sage-spkg-installcheck` (implemented in sage_bootstrap)
Description changed:
---
+++
@@ -2,3 +2,10 @@
The core functionality is implemented by the new command `build/bin/sage-spkg-installcheck` (implemented in sage_bootstrap)
+On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
+
+On Linux, instead of using `ldd` directly, we use `auditwheel show` from https://pypi.org/project/auditwheel/
+
+(Both packages are also used by cibuildwheel)
+
+Description changed:
---
+++
@@ -1,6 +1,6 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd` on any shared libraries and uninstall them if they refer to nonexisting libraries.
-The core functionality is implemented by the new command `build/bin/sage-spkg-installcheck` (implemented in sage_bootstrap)
+The core functionality is implemented by the new command `sage -package installcheck` (implemented in sage_bootstrap)
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
Description changed:
---
+++
@@ -1,6 +1,6 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd` on any shared libraries and uninstall them if they refer to nonexisting libraries.
-The core functionality is implemented by the new command `sage -package installcheck` (implemented in sage_bootstrap)
+The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap)
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
562fcab | build/bin/sage-spkg-installcheck, build/sage_bootstrap/installcheck.py: New |
Commit: 562fcab
Description changed:
---
+++
@@ -1,6 +1,14 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd` on any shared libraries and uninstall them if they refer to nonexisting libraries.
-The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap)
+The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):
+
+```
+$ ./sage -sh -c 'build/bin/sage-spkg-installcheck --verbose givaro'
+Checking shared library file 'lib/libgivaro.9.dylib'
+Checking shared library file 'lib/libgivaro.dylib'
+$ ./sage -sh -c 'build/bin/sage-spkg-installcheck --verbose matplotlib $SAGE_VENV'
+Checking wheel file 'var/lib/sage/wheels/matplotlib-3.5.1-cp310-cp310-macosx_12_0_x86_64.whl'
+```
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
Branch pushed to git repo; I updated commit sha1. New commits:
5faa8cb | build/pkgs/auditwheel_or_delocate: New |
Description changed:
---
+++
@@ -3,10 +3,10 @@
The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):
```
-$ ./sage -sh -c 'build/bin/sage-spkg-installcheck --verbose givaro'
+$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose givaro'
Checking shared library file 'lib/libgivaro.9.dylib'
Checking shared library file 'lib/libgivaro.dylib'
-$ ./sage -sh -c 'build/bin/sage-spkg-installcheck --verbose matplotlib $SAGE_VENV'
+$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose matplotlib $SAGE_VENV'
Checking wheel file 'var/lib/sage/wheels/matplotlib-3.5.1-cp310-cp310-macosx_12_0_x86_64.whl'
```
Branch pushed to git repo; I updated commit sha1. New commits:
9265416 | build/sage_bootstrap/installcheck.py: Implement for macOS |
Description changed:
---
+++
@@ -8,6 +8,12 @@
Checking shared library file 'lib/libgivaro.dylib'
$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose matplotlib $SAGE_VENV'
Checking wheel file 'var/lib/sage/wheels/matplotlib-3.5.1-cp310-cp310-macosx_12_0_x86_64.whl'
+$ ./sage -sh -c 'python3 build/bin/sage-spkg-installcheck --verbose e_antic'
+Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/lib/libeantic.0.dylib'
+ERROR [libsana|get_dependencies:137]:
+/usr/local/opt/flint/lib/libflint-16.dylib not found:
+ Needed by: /Users/mkoeppe/s/sage/sage-rebasing/local/lib/libeantic.0.dylib
+Error during installcheck of 'e_antic': Could not find all dependencies.
```
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/Author: Matthias Koeppe
Description changed:
---
+++
@@ -1,4 +1,4 @@
-We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd` on any shared libraries and uninstall them if they refer to nonexisting libraries.
+We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd`/`otool` on any shared libraries and uninstall them if they refer to nonexisting libraries.
The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):
Description changed:
---
+++
@@ -1,4 +1,6 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd`/`otool` on any shared libraries and uninstall them if they refer to nonexisting libraries.
+
+The new command `make list-broken-packages` does this.
The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):
Description changed:
---
+++
@@ -1,6 +1,28 @@
We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd`/`otool` on any shared libraries and uninstall them if they refer to nonexisting libraries.
-The new command `make list-broken-packages` does this.
+The new command `make -j list-broken-packages` does this:
+
+```
+$ make -j list-broken-packages
+make --no-print-directory auditwheel_or_delocate-no-deps
+sage-logger -p 'sage --pip install -r "/Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt"' '/Users/mkoeppe/s/sage/sage-rebasing/logs/pkgs/auditwheel_or_delocate.log'
+[auditwheel_or_delocate] Ignoring auditwheel: markers 'sys_platform != "darwin"' don't match your environment
+[auditwheel_or_delocate] Requirement already satisfied: delocate in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from -r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (0.10.2)
+[auditwheel_or_delocate] Requirement already satisfied: wheel>=0.32.0 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from delocate->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (0.37.1)
+[auditwheel_or_delocate] Requirement already satisfied: typing-extensions in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from delocate->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/auditwheel_or_delocate/requirements.txt (line 1)) (3.10.0.0)
+make[2]: warning: -jN forced in submake: disabling jobserver mode.
+# Checking /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/installed/bliss-0.73+debian-1+sage-2016-08-02.p0
+...
+Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/lib/libumfpack.dylib'
+Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib'
+Error during installcheck of 'suitesparse': /Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib
+Uninstall broken packages by typing:
+ make -k antic-clean e_antic-clean lcalc-clean ratpoints-clean normaliz-clean r-clean thebe-clean asttokens-clean backports_zoneinfo-clean executing-clean fastjsonschema-clean pure_eval-clean pytz_deprecation_shim-clean stack_data-clean tinycss2-clean tzdata-clean suitesparse-clean
+
+real 0m6.671s
+user 0m33.285s
+sys 0m10.636s
+```
The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):
Ready for testing on macOS.
Branch pushed to git repo; I updated commit sha1. New commits:
f2dba63 | build/sage_bootstrap/uninstall.py: Do not refuse to uninstall packages that do not exist in the source tree |
Description changed:
---
+++
@@ -17,7 +17,22 @@
Checking shared library file '/Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib'
Error during installcheck of 'suitesparse': /Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib
Uninstall broken packages by typing:
- make -k antic-clean e_antic-clean lcalc-clean ratpoints-clean normaliz-clean r-clean thebe-clean asttokens-clean backports_zoneinfo-clean executing-clean fastjsonschema-clean pure_eval-clean pytz_deprecation_shim-clean stack_data-clean tinycss2-clean tzdata-clean suitesparse-clean
+
+ ./sage --buildsh -c "sage-spkg-uninstall antic ";
+ ./sage --buildsh -c "sage-spkg-uninstall e_antic ";
+ ./sage --buildsh -c "sage-spkg-uninstall lcalc ";
+ ./sage --buildsh -c "sage-spkg-uninstall ratpoints ";
+ ./sage --buildsh -c "sage-spkg-uninstall normaliz ";
+ ./sage --buildsh -c "sage-spkg-uninstall r ";
+ ./sage --buildsh -c "sage-spkg-uninstall asttokens \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall backports_zoneinfo \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall executing \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall fastjsonschema \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall pytz_deprecation_shim \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall stack_data \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall tinycss2 \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall tzdata \$SAGE_VENV";
+ ./sage --buildsh -c "sage-spkg-uninstall suitesparse ";
real 0m6.671s
user 0m33.285sDescription changed:
---
+++
@@ -18,21 +18,20 @@
Error during installcheck of 'suitesparse': /Users/mkoeppe/s/sage/sage-rebasing/local/var/tmp/sage/build/suitesparse-5.10.1/src/lib/libsliplu.1.0.2.dylib
Uninstall broken packages by typing:
- ./sage --buildsh -c "sage-spkg-uninstall antic ";
- ./sage --buildsh -c "sage-spkg-uninstall e_antic ";
- ./sage --buildsh -c "sage-spkg-uninstall lcalc ";
- ./sage --buildsh -c "sage-spkg-uninstall ratpoints ";
- ./sage --buildsh -c "sage-spkg-uninstall normaliz ";
- ./sage --buildsh -c "sage-spkg-uninstall r ";
- ./sage --buildsh -c "sage-spkg-uninstall asttokens \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall backports_zoneinfo \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall executing \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall fastjsonschema \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall pytz_deprecation_shim \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall stack_data \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall tinycss2 \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall tzdata \$SAGE_VENV";
- ./sage --buildsh -c "sage-spkg-uninstall suitesparse ";
+
+ make antic-SAGE_LOCAL-uninstall;
+ make e_antic-SAGE_LOCAL-uninstall;
+ make lcalc-SAGE_LOCAL-uninstall;
+ make ratpoints-SAGE_LOCAL-uninstall;
+ make normaliz-SAGE_LOCAL-uninstall;
+ make r-SAGE_LOCAL-uninstall;
+ make backports_zoneinfo-SAGE_VENV-uninstall;
+ make fastjsonschema-SAGE_VENV-uninstall;
+ make pytz_deprecation_shim-SAGE_VENV-uninstall;
+ make stack_data-SAGE_VENV-uninstall;
+ make tinycss2-SAGE_VENV-uninstall;
+ make tzdata-SAGE_VENV-uninstall;
+ make suitesparse-SAGE_LOCAL-uninstall;
real 0m6.671s
user 0m33.285sBranch pushed to git repo; I updated commit sha1. New commits:
1d95bbb | build/make/Makefile.in (list-broken-packages): Fix up |
Description changed:
---
+++
@@ -33,9 +33,9 @@
make tzdata-SAGE_VENV-uninstall;
make suitesparse-SAGE_LOCAL-uninstall;
-real 0m6.671s
-user 0m33.285s
-sys 0m10.636s
+real 2m25.787s
+user 4m54.270s
+sys 4m0.796s
```
The core functionality is implemented by the new command `sage-spkg-installcheck` (implemented in sage_bootstrap):Description changed:
---
+++
@@ -1,6 +1,8 @@
-We can inspect the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` by running `ldd`/`otool` on any shared libraries and uninstall them if they refer to nonexisting libraries.
+When system packages are upgraded, shared libraries that a Sage installation links to can disappear, rendering the Sage installation broken.
-The new command `make -j list-broken-packages` does this:
+To avoid a full rebuild (`make distclean && make build`), we can try to find the specific broken packages.
+
+The new command `make -j list-broken-packages` assists the user with this:
```
$ make -j list-broken-packages
@@ -54,6 +56,10 @@
Error during installcheck of 'e_antic': Could not find all dependencies.
```
+It inspects the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` and all shared libraries.
+
+
+
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
On Linux, instead of using `ldd` directly, we use `auditwheel show` from https://pypi.org/project/auditwheel/Description changed:
---
+++
@@ -62,7 +62,7 @@
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
-On Linux, instead of using `ldd` directly, we use `auditwheel show` from https://pypi.org/project/auditwheel/
+On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ -- follow-up ticket.
(Both packages are also used by cibuildwheel)
Branch pushed to git repo; I updated commit sha1. New commits:
37eaa92 | trac 29097: change "make SPKG-clean" to "make SPKG-uninstall". |
Changed author from Matthias Koeppe to Matthias Koeppe, John Palmieri
Changed author from Matthias Koeppe, John Palmieri to Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
1458ee4 | build/pkgs/auditwheel_or_delocate: New |
8d1c6a4 | build/sage_bootstrap/installcheck.py: Implement for macOS |
320a290 | build/sage_bootstrap/installcheck.py: Do not warn if there are no files to check |
f19ff62 | build/sage_bootstrap/installcheck.py: Skip pure Python wheels |
53a98fd | build/make/Makefile.in (list-broken-packages): New |
52bd73c | build/sage_bootstrap/installcheck.py: Only warn when delocate is not available |
3bca243 | build/make/Makefile.in (list-broken-packages): Parallelize it |
e00a064 | build/make/Makefile.in (list-broken-packages): Show uninstallation commands that actually work |
980bbdb | build/make/Makefile.in (list-broken-packages): Use targets %-SAGE_LOCAL-uninstall, %-SAGE_VENV-uninstall when possible |
1c24771 | build/make/Makefile.in (list-broken-packages): Fix up |
Description changed:
---
+++
@@ -62,7 +62,7 @@
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
-On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ -- follow-up ticket.
+On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/main_show.py) -- follow-up ticket.
(Both packages are also used by cibuildwheel)
Description changed:
---
+++
@@ -1,4 +1,4 @@
-When system packages are upgraded, shared libraries that a Sage installation links to can disappear, rendering the Sage installation broken.
+When system packages are upgraded, shared libraries that a Sage installation links to can disappear, rendering the Sage installation broken. This is a common problem, reported for example in https://groups.google.com/g/sage-devel/c/Iz8ZsmQM3Pg/m/CPl9CbHmBgAJ
To avoid a full rebuild (`make distclean && make build`), we can try to find the specific broken packages.
This also finds a strange bug in our suitesparse installation on macOS:
The installation record (local/var/lib/sage/installed/suitesparse-5.10.1) contains paths in the temporary build directory (var/tmp/sage/build/suitesparse-5.10.1).
I've opened #34206 for this
Description changed:
---
+++
@@ -66,4 +66,4 @@
(Both packages are also used by cibuildwheel)
-
+See also: #34205 Optionally run auditwheel/delocate on wheels before installing themBranch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
24fb9ff | build/sage_bootstrap/installcheck.py: Implement for macOS |
3a4d2ed | build/sage_bootstrap/installcheck.py: Do not warn if there are no files to check |
e36a56b | build/sage_bootstrap/installcheck.py: Skip pure Python wheels |
bebc782 | build/make/Makefile.in (list-broken-packages): New |
0924cf1 | build/sage_bootstrap/installcheck.py: Only warn when delocate is not available |
d5473ec | build/make/Makefile.in (list-broken-packages): Parallelize it |
75b1d96 | build/make/Makefile.in (list-broken-packages): Show uninstallation commands that actually work |
9418c08 | build/make/Makefile.in (list-broken-packages): Use targets %-SAGE_LOCAL-uninstall, %-SAGE_VENV-uninstall when possible |
51d2d56 | build/make/Makefile.in (list-broken-packages): Fix up |
9d449bd | build/sage_bootstrap/installclean.py: Clarify that the sage_local argument is SAGE_LOCAL or SAGE_VENV |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
00ec17b | build/sage_bootstrap/installcheck.py: Implement for macOS |
b2033b9 | build/sage_bootstrap/installcheck.py: Do not warn if there are no files to check |
eb47780 | build/sage_bootstrap/installcheck.py: Skip pure Python wheels |
30d9b5f | build/make/Makefile.in (list-broken-packages): New |
e6679a7 | build/sage_bootstrap/installcheck.py: Only warn when delocate is not available |
3d94488 | build/make/Makefile.in (list-broken-packages): Parallelize it |
6881409 | build/make/Makefile.in (list-broken-packages): Show uninstallation commands that actually work |
b5a7d05 | build/make/Makefile.in (list-broken-packages): Use targets %-SAGE_LOCAL-uninstall, %-SAGE_VENV-uninstall when possible |
6a73497 | build/make/Makefile.in (list-broken-packages): Fix up |
400eaee | build/sage_bootstrap/installclean.py: Clarify that the sage_local argument is SAGE_LOCAL or SAGE_VENV |
Description changed:
---
+++
@@ -56,7 +56,7 @@
Error during installcheck of 'e_antic': Could not find all dependencies.
```
-It inspects the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` and all shared libraries.
+It inspects the installation records in `$SAGE_LOCAL/var/lib/sage/installed/` and all shared libraries and platform wheels listed there.
Description changed:
---
+++
@@ -62,7 +62,7 @@
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
-On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/main_show.py) -- follow-up ticket.
+On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/main_show.py) or `auditwheel.lddtree.lddtree` (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/lddtree.py) -- follow-up ticket.
(Both packages are also used by cibuildwheel)
Branch pushed to git repo; I updated commit sha1. New commits:
ef9226b | build/sage_bootstrap/installcheck.py: Implement for Linux |
Description changed:
---
+++
@@ -62,7 +62,7 @@
On macOS, instead of using `otool` directly, we use `delocate-listdeps` from https://pypi.org/project/delocate/
-On Linux, instead of using `ldd` directly, we can use `auditwheel show` from https://pypi.org/project/auditwheel/ (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/main_show.py) or `auditwheel.lddtree.lddtree` (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/lddtree.py) -- follow-up ticket.
+On Linux, instead of using `ldd` directly, we use `auditwheel.lddtree.lddtree` (https://github.com/pypa/auditwheel/blob/main/src/auditwheel/lddtree.py)
(Both packages are also used by cibuildwheel)
Hi Nils, I developed this ticket as a solution for last time that you complained about people breaking your build. Care to review?
Can you explain what "package" means in list-broken-packages? I ran the command and saw
usage: sage-spkg-installcheck [-h] [-v] spkg [sage_local]
sage-spkg-installcheck: error: argument spkg: 'stack_data' is not a known spkg
followed by the suggestion to run make stack_data-SAGE_VENV-uninstall. Is stack_data actually broken, or is the "usage" message indication of something else going wrong? And what is stack_data, since it's not an spkg?
Replying to John Palmieri:
Can you explain what "package" means in
list-broken-packages?
An SPKG
Replying to John Palmieri:
Is
stack_dataactually broken, or is the "usage" message indication of something else going wrong? And what isstack_data, since it's not an spkg?
It's broken as follows: You have an installation of it (from some other branch), but it's not (per what is currently in build/pkgs) an SPKG.
In 9.7.rc1, stack_data of course is a package, so after merging 9.7.rc1, this will no longer be reported as "broken".
Branch pushed to git repo; I updated commit sha1. New commits:
0bbba44 | Merge tag '9.7.rc1' into t/34203/find_and_uninstall_broken_installed_spkgs_and_wheels |
And here's that merge commit.
Branch pushed to git repo; I updated commit sha1. New commits:
9a03d7f | build/sage_bootstrap/installcheck.py: Make error message more specific |
Should this have a nonzero return code if some packages are broken?
From its name list-broken-packages, I tend to say that it should not indicate a failure like that
I think I agree but I wanted to ask.
It is possible that some could want to do make -j list-broken-packages && do something else, but I don't see a concrete example.
Yes, I thought about this, but I'd say that this whole thing is a strictly manual operation, which doesn't lend itself to scripting.
For the new package auditwheel_or_delocate, it seems that potentially both are used on Linux, only delocate on OS X. If that's right, then the SPKG.rst should be modified.
Installing auditwheel via pip also installs pyelftools, and patchelf is listed as a dependency on the PyPI page. Do we need to create a new package pyelftools, too? Is patchelf really required, or is it only necessary if one is trying to fix files, not just detect whether they're broken?
The comment "and delete the rest" does not seem to be accurate (and I think it's fine not to delete the old stamp files here).
Branch pushed to git repo; I updated commit sha1. New commits:
6ceb44e | build/pkgs/auditwheel_or_delocate/SPKG.rst: Explain that we use delocate also on Linux |
Replying to John Palmieri:
Installing
auditwheelvia pip also installspyelftools, andpatchelfis listed as a dependency on the PyPI page. Do we need to create a new packagepyelftools, too?
Not needed - that's what makes optional "pip" packages so convenient.
Is
patchelfreally required, or is it only necessary if one is trying to fix files, not just detect whether they're broken?
Right, it's only needed for repairing wheels. But it's best not try to circumvent the declared dependencies.
The scipy upgrade (#34081) will bring a patchelf, by the way.
Branch pushed to git repo; I updated commit sha1. New commits:
3c70a38 | build/sage_bootstrap/installcheck.py: Update comment on stamp files |
Great, I think this is ready to go now.
Reviewer: John Palmieri
Thank you!
Changed branch from u/mkoeppe/find_and_uninstall_broken_installed_spkgs_and_wheels to 3c70a38