You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected compiled-objects-have-debug-symbols check to only find debug symbols if a mach-o binary contains them.
What actually happened?
Over in LightGBM, observed that when upgrading scikit-build-core for a shared library from v0.4.4 to 0.9.3, pydistcheck started raising this on the resulting library lib_lightgbm.dylib.
1. [compiled-objects-have-debug-symbols] Found compiled object containing debug symbols. For details, extract the distribution contents and run 'nm -a "lightgbm/lib/lib_lightgbm.dylib"'.
errors found while checking: 1
But ONLY that macOS library... not the equivalent files on linux (lib_lightgbm.so) or windows (lib_lightgbm.dll).
How can someone else reproduce this problem?
I mention that scikit-build-core version because in that range, scikit-build-core added the ability to strip the binaries it produced.
(Compare with the output of `nm lssym` and `dsymutil -s lssym` in both cases.
Note that `strip` adds a symbol that looks like
radr://5614542 N_STAB 3c n_sect 000 n_desc 0x0000 n_value 0x5614542
I wonder what that bug is. `nm` doesn't list it because `nm` only lists symbols,
and this is a stabs debug info entry which `nm` only shows if you pass `-a`.)
I strongly suspect that's what's happening here! Not sure what the best fix is though for pydistcheck, will need to think through that.
What did you expect to happen?
Expected
compiled-objects-have-debug-symbols
check to only find debug symbols if a mach-o binary contains them.What actually happened?
Over in LightGBM, observed that when upgrading
scikit-build-core
for a shared library from v0.4.4 to 0.9.3,pydistcheck
started raising this on the resulting librarylib_lightgbm.dylib
.But ONLY that macOS library... not the equivalent files on linux (
lib_lightgbm.so
) or windows (lib_lightgbm.dll
).How can someone else reproduce this problem?
I mention that
scikit-build-core
version because in that range,scikit-build-core
added the ability to strip the binaries it produced.https://github.com/scikit-build/scikit-build-core/blob/2994db5d993f0cb252dbeebfac7d66677b670ed8/README.md#L278-279
I built that library (
lib_lightgbm.dylib
) on an M2 mac, in a build driven byscikit-build-core
, like this:Then diffed those files. Only saw 1 difference.
The results of
nm -a
includes this:It seems that maybe this is added by
strip
?I found this repo, https://github.com/nico/lssym, which says
I strongly suspect that's what's happening here! Not sure what the best fix is though for
pydistcheck
, will need to think through that.What version of
pydistcheck
are you using?0.6.0
Notes
Thanks @nico for putting up https://github.com/nico/lssym! It was a great clue to help me investigate this!!
The text was updated successfully, but these errors were encountered: