Bugzilla – Bug 1216458
python-numpy: variations in _multiarray_umath.cpython-39-x86_64-linux-gnu.so
Last modified: 2023-10-21 01:46:36 UTC
While working on reproducible builds for openSUSE, I found that our python-numpy package varied in every build at least the 311, 310 and 39 versions of /usr/lib64/python3.9/site-packages/numpy-1.25.2.dist-info/RECORD vary thus: -numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so,sha256=AqheHmg2MFytBdKCCIY2DO8dHS58gSmAuy3hkJclqmo,40188336^M +numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so,sha256=nlzKMAtipwUy5z6eV6KpruSJC2Mx8mfPz_dTyosfhPM,40188336^M even when the final .so files came out identical. The reason is that the .so gets compiled twice: once by setup.py build and then again by setup.py install This makes debugging rather hard. at one point, I captured this 4-byte-diff: > filterdiff hexdump\ -C ./RPMS*/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so --- hexdump -C ./RPMS.1/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so +++ hexdump -C ./RPMS.2/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so @@ -403654,7 +403654,7 @@ 0066e610 5f 6d 75 6c 74 69 61 72 72 61 79 5f 75 6d 61 74 |_multiarray_umat| 0066e620 68 2e 63 70 79 74 68 6f 6e 2d 33 39 2d 78 38 36 |h.cpython-39-x86| 0066e630 5f 36 34 2d 6c 69 6e 75 78 2d 67 6e 75 2e 73 6f |_64-linux-gnu.so| -0066e640 2e 64 65 62 75 67 00 00 84 ef 54 21 00 2e 73 68 |.debug....T!..sh| +0066e640 2e 64 65 62 75 67 00 00 79 21 36 45 00 2e 73 68 |.debug..y!6E..sh| 0066e650 73 74 72 74 61 62 00 2e 6e 6f 74 65 2e 67 6e 75 |strtab..note.gnu| 0066e660 2e 70 72 6f 70 65 72 74 79 00 2e 6e 6f 74 65 2e |.property..note.| 0066e670 67 6e 75 2e 62 75 69 6c 64 2d 69 64 00 2e 67 6e |gnu.build-id..gn| which has something to do with debug symbols.
So it embeds random .o file names into debuginfo: > filterdiff strings R*/usr/lib/debug/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so.debug --- strings RPMS.1/usr/lib/debug/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so.debug +++ strings RPMS.2/usr/lib/debug/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so.debug @@ -58853,310 +58853,310 @@ _Z22string_comparison_loopILb1EL4COMP1EjEiP25PyArrayMethod_Context_tagPKPcPKlS7_P14NpyAuxData_tag _Z22string_comparison_loopILb1EL4COMP2EjEiP25PyArrayMethod_Context_tagPKPcPKlS7_P14NpyAuxData_tag _Z22string_comparison_loopILb1EL4COMP3EjEiP25PyArrayMethod_Context_tagPKPcPKlS7_P14NpyAuxData_tag -ccZ1ycJY.o +ccSHFcOr.o __svml_dacos_ha_data_internal __svml_dacos_ha_cout_rare_internal _vmldACosHATab -cc41nX6y.o +ccvaGuWv.o It could have overlap with bug 1212698