numpy-wheels
Fix stripping binaries from debugging symbols
#87
Merged

Fix stripping binaries from debugging symbols #87

charris merged 1 commit into MacPython:master from seiko2plus:fix_strip
seiko2plus
seiko2plus5 years ago
No description provided.
mattip
mattip5 years ago

I am convinced that export LDFLAGS="$LDFLAGS" does something since now clang is complaining ld: unknown option: --strip-debug`.

seiko2plus seiko2plus force pushed from a51a7492 to 833ab300 5 years ago
mattip
mattip5 years ago

According to this stack overflow, clang accepts -Wl,-s. Does that work with gcc as well? But then I think that does too much: you wanted --strip-debug not --strip-all.

seiko2plus
seiko2plus5 years ago (edited 5 years ago)

@mattip, when I mentioned the use LDFLAGS instead of CFLAGS that because of clang usually produce warning message like this clang: warning: -Wl,-strip-debug: 'linker' input unused when '-S' is present if there are no objects represented to be linked, so I thought that was the reason of build failure. but I was wrong since the issue in macOS's linker, it simply doesn't support stripping symbols.

mattip
mattip5 years ago

I think you can add a conditional if [ -z "$IS_OSX" ]; then CFLAGS=...; else CFLAGS=...; fi

seiko2plus Fix stripping binaries from debugging symbols
1547c0db
seiko2plus seiko2plus force pushed from d0589670 to 1547c0db 5 years ago
seiko2plus
seiko2plus5 years ago (edited 5 years ago)

@mattip, better to avoid manybuild vars, in case if they change it or it may exposed in different domain. I fixed the bash path, and I think it works fine now. however, now we have an issue with macOS and I guess numpy/numpy#16110 became necessary.

EDIT: macOS doesn't require any stripping since DSYM files aren't combined with the wheel package.

charris charris merged 11d6d898 into master 5 years ago
charris
charris5 years ago

Thanks @seiko2plus, let's see if it makes a difference.

charris
charris5 years ago

The _multiarray_umath binary is about 1/10 the size and the manylinux1 files contain OpenBLAS. So good progress here. If we could shrink OpenBLAS...

charris
charris5 years ago

@mattip @tylerjereddy Looks like I don't have permissions to remove files in the nightly build directory.

tylerjereddy
tylerjereddy5 years ago

@charris You should now--I think added you to the staging site last time instead maybe? Anyway, you probably want access to both and hopefully have it now.

seiko2plus
seiko2plus5 years ago (edited 5 years ago)

@charris, OpenBLAS's shared object doesn't contain any debugging symbols, ususaly all c/c++ projects that use CMake or gnu autobuild tools don't provide debug info flag -g for release stages.

 bloaty libopenblasp-r0-edd6b1a3.3.9.dev.so
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  88.0%  24.8Mi  90.5%  24.8Mi    .text
   3.1%   884Ki   3.2%   884Ki    .eh_frame
   2.0%   573Ki   0.0%       0    .symtab
   1.0%   289Ki   1.0%   289Ki    [LOAD #0 [RX]]
   1.0%   279Ki   0.0%       0    .strtab
   1.0%   276Ki   1.0%   276Ki    .dynsym
   0.7%   198Ki   0.7%   198Ki    .dynstr
   0.7%   198Ki   0.7%   198Ki    [LOAD #7 [RW]]
   0.7%   188Ki   0.7%   188Ki    .rela.dyn
   0.4%   121Ki   0.4%   121Ki    .rodata
   0.3%  94.6Ki   0.3%  94.6Ki    .eh_frame_hdr
   0.3%  90.6Ki   0.3%  90.5Ki    .rela.plt
   0.3%  85.9Ki   0.3%  85.8Ki    .gnu.hash
   0.2%  60.4Ki   0.2%  60.3Ki    .plt
   0.0%       0   0.2%  60.0Ki    .tbss
   0.2%  47.7Ki   0.1%  40.1Ki    .data
   0.0%       0   0.2%  47.0Ki    .bss
   0.1%  30.2Ki   0.0%       0    .got.plt
   0.1%  23.1Ki   0.1%  23.0Ki    .gnu.version
   0.1%  20.9Ki   0.0%       0    .data.rel.ro
   0.0%  8.78Ki   0.0%     349    [15 Others]
 100.0%  28.2Mi 100.0%  27.4Mi    TOTAL
rgommers
rgommers4 years ago

I thought there was a SciPy issue or PR for this as well, but I can't find it anymore. Is my memory tricking me, or am I just bad at searching?

mattip
mattip4 years ago👍 1

Maybe matthew-brett/multibuild#162 which is still open

Login to write a write a comment.

Login via GitHub

Reviewers
No reviews
Assignees
No one assigned
Labels
Milestone