cygport - avoid stripping binaries

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Nov 6 20:53:11 GMT 2021


On Nov  6 20:29, Federico Kircheis via Cygwin wrote:
> 
> On 06/11/2021 18.30, Corinna Vinschen via Cygwin wrote:
> > On Nov  6 15:31, Federico Kircheis via Cygwin wrote:
> > > it seems that cygport always strip binaries, but I have one program that
> > > when stripped does not work correctly.
> > 
> > Out of curiosity, what program is that?  And why does it require the
> > symbols to be present in the executable?
> > 
> > 
> > Corinna
> > 
> 
> Hi Corinna,
> 
> it's pari-gp the program I'm having trouble packaging.
> 
> If I compile it manually, without cygport, then I'm able to execute it.
> If I use cygport, then the program misbehaves.
> 
> I've noticed that cygport strips the binaries, so I thought that could be
> the issue.

If the application isn't doing some really weird stuff, I seriously
doubt it.

> Why does cygport strip binaries by default?
> Doesn't it generally makes harder to debug issues?

Actually, no.  What cygport really does is this:

- create binaries with debug info
- create debug info files from the non-stripped binaries and copy
  them to usr/debug/...
- strip the binary and pack it into the base package "foo"
- pack the debug info files into the debug package "foo-debug"

So, a user of the package gets just the smaller stripped foo binary,
while a developer can install the foo-debug package and actually
debug the foo binary.

> Is it a common practice for GNU/Linux distribution to strip binaries when
> creating packages?

Yes.  Plus generating the debug info package.


Corinna


More information about the Cygwin mailing list