Immer wenn ich Paperwork (paperwork-gtk) starte, bricht das Programm mit einer Fehlermeldung ab. Hat das wer auch beobachtet? Gibt es eine Lösung?
Every time I launch Paperwork (paperwork-gtk), the program crashes with an error message. Has anyone else experienced this? Is there a solution?
[INFO ] [openpaperwork_core ] Loading plugin 'paperwork_backend.guesswork.label.sklearn' ...
Ungültiger Maschinenbefehl(Speicherabzug geschrieben) paperwork-gtk
Um die erste Frage zu beantworten: nein.
Ich habe paperwork-gtk mal fix auf einem aktuellen KDE-System installiert und weder unter X11 noch unter Wayland ein Problem beim Start. Hier mal ein Auszug der Ausgabe:
[INFO ] [openpaperwork_core ] Loading plugin 'paperwork_backend.guesswork.label.sklearn' ...
[INFO ] [openpaperwork_core ] Plugin 'paperwork_backend.guesswork.label.sklearn' loaded
[INFO ] [openpaperwork_core ] Examining dependencies of 'paperwork_backend.guesswork.label.sklearn' ...
[INFO ] [openpaperwork_core ] Initializing plugin '<class 'paperwork_backend.guesswork.label.sklearn.Plugin'>' ...
[INFO ] [paperwork_backend.guesswork.label.sklearn] Opening guesswork.label.sklearn database
[INFO ] [paperwork_backend.guesswork.label.sklearn] Transaction start: Guessing labels: False
[INFO ] [paperwork_backend.guesswork.label.sklearn] Committing
[INFO ] [paperwork_backend.guesswork.label.sklearn] Nothing to do. Training left unchanged.
[INFO ] [paperwork_backend.guesswork.label.sklearn] Pre-trained model not available. Re-training one
[INFO ] [paperwork_backend.guesswork.label.sklearn] Loading features of 1 documents for 1 labels
[INFO ] [paperwork_backend.guesswork.label.sklearn] Took 0ms to load features of 1 documents
[INFO ] [paperwork_backend.guesswork.label.sklearn] Training classifiers ...
[INFO ] [paperwork_backend.guesswork.label.sklearn] Closing guesswork.label.sklearn database
edlin
Vielen Dank für die Rückmeldung. Die Ausgabe "ungültiger Maschinenbefehl" hat mich im Nachhinein stutzig gemacht. Der Rechner ist mit einer PhenomII Cpu ausgestattet.
Ich habe hier zwei Alternativ-Systeme. Ein altes Notebook mit Core2Duo crashed ebenfalls und ist interessanterweise geschwätziger:
RuntimeError: NumPy was built with baseline optimizations:
(X86_V2) but your machine doesn't support:
(X86_V2).
Meine Interpretation: NumPy ist so compiliert, das es auf einer alten CPU nicht läuft und damit auch Paperwork nicht, das dieses Paket über die Abhängigkeiten braucht.
Die Gegenprobe mit einer Ryzen7 5800X CPU ist erfolgreich. Paperwork startet.
ärgerlich...
Die Frage nach der CPU wäre meine nächste gewesen. Der aktuelle Kernel unterstützt ja noch die Phenom II, so dass ich ebenfalls davon ausgehe, dass beim Kompilieren an den älteren CPUs vorbei optimiert wurde.
Ich würde da erst einmal noch ein paar Optionen testen. Paperwork bietet ja auch ein AppImage an. Das würde ich als erstes testen, danach das Flatpak.
Als letzte Option bleibt dann immer noch das Kompilieren aus dem Sourcecode.
Paperwork (https://www.openpaper.work/de/download/linux)
edlin
X86_V2 wird immer mehr Standard bei den Anwendungen, somit kann man solche alte HArdware mit einem Unstable bald nicht mehr sinnvoll betreiben.
@orinoco (https://forum.siduction.org/index.php?action=profile;u=658)
Ob python3-numpy die Ursache für die "illegal instruction" ist, kannst Du
folgendermaßen übeprüfen:
Folgende pakete sollten installiert sein:
$ dpkg -l|grep -e cython3 -e ninja-build -e python3-hypothesis -e meson
Falls nicht, bspw. mit
$ sudo apt-get install python3-hypothesis
nachinstallieren. Anschließend die numpy tests mit
$ python3
>>> import numpy
>>> numpy.test(label='slow')
ausführen. Ausgabe so ähnlich wie:
NumPy version 2.4.4
NumPy CPU features: X86_V2 X86_V3* X86_V4? AVX512_ICL? AVX512_SPR?
.............ss.s..................................................... [ 6%]
...
.............ss.s..................................................... [100%]
2630 passed, 187 skipped, 48337 deselected in 326.58s (0:05:26)
True
>>>
Falls es durchläuft, ist numpy nicht die Ursache, andernfalls kannst Du
python3-numpy anpassen, aber lass uns zunächst den Ausgang dieses Experiments
auf Deinen Rechnern wissen.
Das knallt schon beim Import:
$ python3
Python 3.13.12 (main, Feb 4 2026, 15:06:39) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Ungültiger Maschinenbefehl(Speicherabzug geschrieben) python3P.S.
Meine CPU ist X86_V1
@ orinoco (https://forum.siduction.org/index.php?action=profile;u=658)
> Das knallt schon beim Import: [...]
o.k. Dann exakt wo:
$ python3 -v
Zunächst kommt eine ganze Reihe von imports, die nicht weiter interessiert, anschließend nochmal:
>>> import numpy
Welche imports siehst Du noch kurz bevor numpy crashed?
Eines der Files
$ dpkg -L python3-numpy|grep 313|grep '\.so'
...
ist verantwortlich. Wechsle in das Verzeichnis /tmp und erzeuge dort ein Unterverzeichnis numpy:
$ cd /tmp; mkdir numpy; cd numpy
Hol' die Sourcen von python3-numpy:
$ apt-get source python3-numpy
$ cd numpy-2.4.4+ds
$ python3 vendored-meson/meson/meson.py setup build
$ cd build
$ ninja
$ find .|grep 313|grep '\.so'|xargs -n1 strip
Wenn das soweit funktioniert, ersetzt Du alle Files der Ausgabe
$ dpkg -L python3-numpy|grep 313|grep '\.so'
durch die von
$ find .|grep 313|grep '\.so$'|xargs -n1
Anschließend wieder ein
$ python3
>>> import numpy
Wie weit kommst Du?
Nachtrag: Ich hab' das Ganze 'mal auf einer VM ohne X86_V2 CPU support probiert.
Leider erkennt das meson Skript die fehlenden Features der CPU nicht und generiert
in Folge ein unbrauchbares Header File. Zwischen den obigen Zeilen
$ cd build
und
$ ninja
ist noch folgende Aktion erforderlich:
Die Zeilen
#define NPY_WITH_CPU_BASELINE "X86_V2"
und
#define NPY_WITH_CPU_BASELINE_N 1
in
/tmp/numpy/numpy-2.4.4+ds/build/meson_cpu/npy_cpu_dispatch_config.h
sind for dem Aufruf von ninja (und nach dem Aufruf von meson.py) noch durch
#define NPY_WITH_CPU_BASELINE "none"
und
#define NPY_WITH_CPU_BASELINE_N 0
zu ersetzen. Danach wird ">>> import numpy" auf der Machine ohne X86_V2
Support akzeptiert (Frag' mich nicht, wieso das nicht bei der Konfiguration
der Makefiles passiert, wenn es doch so leicht ist, die CPU Features zu
identifizieren und X86_V1 nach wie vor unterstützt wird).
O-Ren Ishii: "You didn't think it was gonna be that easy, did you?"
The Bride: "You know, for a second there, yeah, I kinda did."
O-Ren Ishii: "Silly rabbit."
The Bride: "Trix are..."
O-Ren Ishii: "...for kids"
Python-Shell verbose
$ python3 -v
>>> import numpy
# /usr/lib/python3/dist-packages/numpy/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/__init__.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/__init__.cpython-313.pyc'
# /usr/lib/python3/dist-packages/numpy/__pycache__/version.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/version.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/version.cpython-313.pyc'
import 'numpy.version' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c4ef0>
# /usr/lib/python3/dist-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_expired_attrs_2_0.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-313.pyc'
import 'numpy._expired_attrs_2_0' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c5130>
# /usr/lib/python3/dist-packages/numpy/__pycache__/_globals.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_globals.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_globals.cpython-313.pyc'
# /usr/lib/python3/dist-packages/numpy/_utils/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_utils/__init__.py
# code object from '/usr/lib/python3/dist-packages/numpy/_utils/__pycache__/__init__.cpython-313.pyc'
# /usr/lib/python3/dist-packages/numpy/_utils/__pycache__/_convertions.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_utils/_convertions.py
# code object from '/usr/lib/python3/dist-packages/numpy/_utils/__pycache__/_convertions.cpython-313.pyc'
import 'numpy._utils._convertions' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c5bb0>
import 'numpy._utils' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c5970>
import 'numpy._globals' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c5610>
# /usr/lib/python3/dist-packages/numpy/__pycache__/_distributor_init.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_distributor_init.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_distributor_init.cpython-313.pyc'
import 'numpy._distributor_init' # <_frozen_importlib_external.SourceFileLoader object at 0x7f06184c5730>
# /usr/lib/python3/dist-packages/numpy/__pycache__/__config__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/__config__.py
# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/__config__.cpython-313.pyc'
# /usr/lib/python3/dist-packages/numpy/_core/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_core/__init__.py
# code object from '/usr/lib/python3/dist-packages/numpy/_core/__pycache__/__init__.cpython-313.pyc'
# /usr/lib/python3/dist-packages/numpy/_core/__pycache__/multiarray.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_core/multiarray.py
# code object from '/usr/lib/python3/dist-packages/numpy/_core/__pycache__/multiarray.cpython-313.pyc'
Ungültiger Maschinenbefehl(Speicherabzug geschrieben) python3 -v
$ dpkg -L python3-numpy|grep 313|grep '\.so'
/usr/lib/python3/dist-packages/numpy/_core/_multiarray_tests.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_operand_flag_tests.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_rational_tests.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_simd.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_struct_ufunc_tests.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/_core/_umath_tests.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/fft/_pocketfft_umath.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/linalg/_umath_linalg.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/linalg/lapack_lite.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_common.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_generator.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_philox.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so
Nach Anpassung in meson_cpu/npy_cpu_dispatch_config.h
[color=#1818b2]/**[/color]
[color=#1818b2] * @def NPY_WITH_CPU_BASELINE[/color]
[color=#1818b2] * Enabled baseline features names as a single string where each is separated by a single space.[/color]
[color=#1818b2] * For example: "SSE SSE2 SSE3"[/color]
[color=#1818b2] * Required for logging purposes only.[/color]
[color=#1818b2] */[/color]
[color=#b218b2]#define NPY_WITH_CPU_BASELINE [/color][color=#b21818]"none"[/color]
[color=#1818b2]/**[/color]
[color=#1818b2] * @def NPY_WITH_CPU_BASELINE_N[/color]
[color=#1818b2] * Number of enabled baseline features.[/color]
[color=#1818b2] */[/color]
[color=#b218b2]#define NPY_WITH_CPU_BASELINE_N [/color]
Nach dem Build mit angepasster Header-Datei:
[color=#000000]$ find .|grep 313|grep '\.so'|xargs -n1 strip[/color]
[color=#000000]strip: Warning: './numpy/_core/_operand_flag_tests.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/_core/_umath_tests.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: ./numpy/_core/_umath_tests.cpython-313-x86_64-linux-gnu.so.p/_umath_tests.c: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/_core/_multiarray_tests.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_tests.cpython-313-x86_64-linux-gnu.so.p/_multiarray_tests.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_tests.cpython-313-x86_64-linux-gnu.so.p/templ_common.h: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/_core/_rational_tests.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/_core/_simd.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/matmul.h: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/funcs.inc: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/scalartypes.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/matmul.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/einsum_sumprod.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/npy_sort.h: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/arraytypes.h: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/templ_common.h: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/loops.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/loops.h: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/lowlevel_strided_loops.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/arraytypes.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/scalarmath.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/nditer_templ.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/_core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so.p/loops_utils.h: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/_core/_struct_ufunc_tests.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_sfc64.pyx.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_sfc64.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_sfc64.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_bounded_integers.pyx.c.dep: file format not [/color]
[color=#000000]recognized[/color]
[color=#000000]strip: ./numpy/random/_bounded_integers.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_bounded_integers.pyx.c: file format not reco[/color]
[color=#000000]gnized[/color]
[color=#000000]strip: Warning: './numpy/random/_philox.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_philox.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_philox.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_philox.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_philox.pyx.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_philox.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_philox.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/_generator.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_generator.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_generator.pyx.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_generator.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so.p/numpy/random/mtrand.pyx.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/mtrand.cpython-313-x86_64-linux-gnu.so.p/numpy/random/mtrand.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_pcg64.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_pcg64.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_pcg64.pyx.c: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/_common.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_common.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_common.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_common.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_common.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_common.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_common.pyx.c: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random/bit_generator.pyx.c.dep: file format not recogniz[/color]
[color=#000000]ed[/color]
[color=#000000]strip: ./numpy/random/bit_generator.cpython-313-x86_64-linux-gnu.so.p/numpy/random/bit_generator.pyx.c: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so.p/numpy' is a directory[/color]
[color=#000000]strip: Warning: './numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so.p/numpy/random' is a directory[/color]
[color=#000000]strip: ./numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_mt19937.pyx.c: file format not recognized[/color]
[color=#000000]strip: ./numpy/random/_mt19937.cpython-313-x86_64-linux-gnu.so.p/numpy/random/_mt19937.pyx.c.dep: file format not recognized[/color]
[color=#000000]strip: Warning: './numpy/fft/_pocketfft_umath.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/linalg/lapack_lite.cpython-313-x86_64-linux-gnu.so.p' is a directory[/color]
[color=#000000]strip: Warning: './numpy/linalg/_umath_linalg.cpython-313-x86_64-linux-gnu.so.p' is a director[/color]
Nach dem Kopieren der 19 *.so Dateien
[color=#ff54ff][b]>>> [/b][/color][color=#000000]import numpy[/color]
[color=#000000]# possible namespace for /home/frank/Projekte/shell_scripts/numpy[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/__init__.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/__init__.cpython-313.pyc'[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/version.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/version.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/version.cpython-313.pyc'[/color]
[color=#000000]import 'numpy.version' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c4e90>[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_[/color]
[color=#000000]expired_attrs_2_0.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-313.pyc'[/color]
[color=#000000]import 'numpy._expired_attrs_2_0' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c50d0>[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/_globals.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_globals.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_globals.cpython-313.pyc'[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/_utils/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_uti[/color]
[color=#000000]ls/__init__.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/_utils/__pycache__/__init__.cpython-313.pyc'[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/_utils/__pycache__/_convertions.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/[/color]
[color=#000000]_utils/_convertions.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/_utils/__pycache__/_convertions.cpython-313.pyc'[/color]
[color=#000000]import 'numpy._utils._convertions' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c5b50>[/color]
[color=#000000]import 'numpy._utils' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c5910>[/color]
[color=#000000]import 'numpy._globals' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c55b0>[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/_distributor_init.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_d[/color]
[color=#000000]istributor_init.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/_distributor_init.cpython-313.pyc'[/color]
[color=#000000]import 'numpy._distributor_init' # <_frozen_importlib_external.SourceFileLoader object at 0x7fc0950c56d0>[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/__pycache__/__config__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/__config_[/color]
[color=#000000]_.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/__pycache__/__config__.cpython-313.pyc'[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/_core/__pycache__/__init__.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_core[/color]
[color=#000000]/__init__.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/_core/__pycache__/__init__.cpython-313.pyc'[/color]
[color=#000000]# /usr/lib/python3/dist-packages/numpy/_core/__pycache__/multiarray.cpython-313.pyc matches /usr/lib/python3/dist-packages/numpy/_co[/color]
[color=#000000]re/multiarray.py[/color]
[color=#000000]# code object from '/usr/lib/python3/dist-packages/numpy/_core/__pycache__/multiarray.cpython-313.pyc'[/color]
[color=#000000]Ungültiger Maschinenbefehl(Speicherabzug geschrieben) python3 -[/color]
Es crashed wieder.
Bei der Ausgabe von Ninja ist mir aufgefallen
[color=#000000]Generating multi-targets for "[b]_umath_tests.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]argfunc.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]x86_simd_argsort.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3[/b][/color]
[color=#000000]Generating multi-targets for "[b]x86_simd_qsort.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3[/b][/color]
[color=#000000]Generating multi-targets for "[b]x86_simd_qsort_16bit.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]AVX512_SPR, AVX512_ICL[/b][/color]
[color=#000000]Generating multi-targets for "[b]highway_qsort.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color]
[color=#000000]Generating multi-targets for "[b]highway_qsort_16bit.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color]
[color=#000000]Generating multi-targets for "[b]loops_arithm_fp.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_arithmetic.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_comparison.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_exponent_log.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_hyperbolic.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_logical.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_minmax.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_modulo.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_trigonometric.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_umath_fp.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_unary.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_unary_fp.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_unary_fp_le.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_unary_complex.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V4, X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_autovec.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V3, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]loops_half.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]AVX512_SPR, X86_V4, baseline[/b][/color]
[color=#000000]Generating multi-targets for "[b]_simd.dispatch.h[/b]" [/color]
[color=#000000] Enabled targets: [/color][color=#54ff54][b]X86_V3, X86_V4, baseline[/b][/color]
Musste den Post wegen 20000 Zeichen-Limit splitten.
BTW weitere Programm meiner Installation, die wegen numpy nicht mehr starten:
Ein paar Sachen, die mir aufgefallen sind:
> #define NPY_WITH_CPU_BASELINE_N
sollte heißen:
#define NPY_WITH_CPU_BASELINE_N 0
> $ find .|grep 313|grep '\.so'|xargs -n1 strip
sollte heißen:
$ find .|grep 313|grep '\.so$'|xargs -n1 strip
(sonst wird versucht, nicht nur die auf ".so" endenden files zu strippen)
> Bei der Ausgabe von Ninja ist mir aufgefallen
Ist das nicht die Ausgabe von meson.py? Da ich nicht weiß, wie in meson.py
die baseline Option zu verändern ist, haben wir das halt nachträglich in der
von meson.py generierten Datei npy_cpu_dispatch_config.h manuell gemacht,
die wiederum von ninja verwendet wird, um die Compileroptionen
richtig zu setzen. Deshalb ist es nicht verwunderlich, die X86_V Optionen
in der von meson generierten header Datei noch zu sehen.
> >>> import numpy
> [...]
> Ungültiger Maschinenbefehl(Speicherabzug geschrieben) python3
Wenn ich ohne Modifikation numpy importiere (auf einer CPU ohne X86_V2 Support),
wird die Ausführung des import Befehls mit einer Fehlermeldung verweigert, während
bei Dir die Ausführung crashed. Kannst Du feststellen, ob auf Deiner anderen Maschine
ohne X86_V2 Support, die etwas gesprächiger war, sich nach obiger Prozedur
ein anderes Verhalten zeigt? Mglw. hat der ungültige Maschinenbefehl noch eine
andere Ursache, die es herauszufinden gilt (Ein Output von "$ cat /proc/cpuinfo"
(insb. die flags) ist vielleicht ebenfalls hilfreich).
Um festzustellen, ob die numpy *.so Files verantwortlich sind, kannst Du sie auch
vorübergehend mit "$ sudo mv /path/to/files/file.so /path/to/files/file.so.org" umbenennen.
Danach wieder mit "import numpy" kontrollieren, ob sich immer noch ein ungültiger
Maschinenbefehl beobachten lässt.
Soweit erst 'mal. Das Vorgehen ist zwar zeitraubend, führt uns aber nach endl. vielen
Schritten zur eigentlichen Ursache.
Ich finde es bedauerlich, dass die Entwickler ohne Vorwarnung oder Überprüfung
ein Paket wissentlich freigeben, welches zum Absturz führen muss, obwohl sich das
ohne große Anstrengung leicht verhindern ließe.
PS.:
Um die "illegale" Instruktion zu identifizieren können wir folgendes tun:
Starte python unter gdb mit dem unmodifizierten python3-numpy:
$ gdb python3
(gdb) run
>>> import numpy
Program received signal SIGILL, Illegal instruction.
0x0000555555555030 in ?? ()
(gdb) layout asm
Die erste Zeile gibt Dir das mnemo der Instruktion in assembler
Code.
(gdb) quit
Poste den Output dieser Zeilen.
Man kann sich die Modifikation der Header Datei ersparen, indem man statt
$ python3 vendored-meson/meson/meson.py setup build
einfach die Option -Dcpu-baseline="none" hintan fügt:
$ python3 vendored-meson/meson/meson.py setup build -Dcpu-baseline="none"
Außerdem sind die von Dir beobachteten "Enabled" Meldungen sogenannte dispatch
Optionen, deren Code dynamisch nur dann ausgeführt wird, wenn zur Laufzeit eine
dafür geeignete CPU erkannt wird. Auch die können für den ungültigen Machinenbefehl
nicht verantwortlich sein. Ich glaube, der gdb Versuch könnte uns weiter bringen.