public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygport - avoid stripping binaries
@ 2021-11-06 14:31 Federico Kircheis
  2021-11-06 15:01 ` Achim Gratz
  2021-11-06 17:30 ` Corinna Vinschen
  0 siblings, 2 replies; 6+ messages in thread
From: Federico Kircheis @ 2021-11-06 14:31 UTC (permalink / raw)
  To: cygwin


Hello,


it seems that cygport always strip binaries, but I have one program that 
when stripped does not work correctly.

As far as I've understood

https://cygwin.github.io/cygport/compilers_cygpart.html#robo759


I should be able to set something like

STRIP=/usr/bin/true

and then stripping should be a no-op, but it did not work, the binaries 
in the install folder are still stripped.

Any hints?

Best

Federico

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cygport - avoid stripping binaries
  2021-11-06 14:31 cygport - avoid stripping binaries Federico Kircheis
@ 2021-11-06 15:01 ` Achim Gratz
  2021-11-06 17:30 ` Corinna Vinschen
  1 sibling, 0 replies; 6+ messages in thread
From: Achim Gratz @ 2021-11-06 15:01 UTC (permalink / raw)
  To: cygwin

Federico Kircheis via Cygwin writes:
> I should be able to set something like
>
> STRIP=/usr/bin/true
>
> and then stripping should be a no-op, but it did not work, the
> binaries in the install folder are still stripped.

That only works if strip was used to remove the symbol information.  You
probably need

RESTRICT="strip"

instead, see:

https://cygwin.github.io/cygport/src_postinst_cygpart.html#robo140


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cygport - avoid stripping binaries
  2021-11-06 14:31 cygport - avoid stripping binaries Federico Kircheis
  2021-11-06 15:01 ` Achim Gratz
@ 2021-11-06 17:30 ` Corinna Vinschen
  2021-11-06 19:29   ` Federico Kircheis
  1 sibling, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2021-11-06 17:30 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cygport - avoid stripping binaries
  2021-11-06 17:30 ` Corinna Vinschen
@ 2021-11-06 19:29   ` Federico Kircheis
  2021-11-06 20:53     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Kircheis @ 2021-11-06 19:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]


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.


Also setting


RESTRICT="strip" and STRIP=/usr/bin/true


seems to strip some information compared to the manually built binary.

Best

Federico


PS:
Why does cygport strip binaries by default?
Doesn't it generally makes harder to debug issues?
If stripping removes unused data I would actually expect the compiler to 
not generate it, and if the data is used....

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

[-- Attachment #2: pari.cygport --]
[-- Type: text/plain, Size: 623 bytes --]

# pari.cygport
NAME="pari"
VERSION=2.13.3
RELEASE=1
SUMMARY="add summary"
DESCRIPTION="add description"
CATEGORY="Mail" #FIXME, find category

HOMEPAGE="https://pari.math.u-bordeaux.fr"
SRC_URI="https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-${VERSION}.tar.gz"
SRC_DIR="pari-${VERSION}"



# for documentation needs latex (pdflatex for creating pdf)
BUILD_REQUIRES="libncurses-devel libreadline-devel libgmp-devel"
REQUIRES="libreadline libgmp10"

PKG_NAMES="pari"

src_compile() {
	lndirs
	cd ${B}
	sh ./Configure \
	  --prefix=/usr
	cygmake gp
}

src_install() {
	cd ${B}
	cyginstall
}

src_test() {
	cygmake bench
}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cygport - avoid stripping binaries
  2021-11-06 19:29   ` Federico Kircheis
@ 2021-11-06 20:53     ` Corinna Vinschen
  2021-11-06 20:55       ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2021-11-06 20:53 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cygport - avoid stripping binaries
  2021-11-06 20:53     ` Corinna Vinschen
@ 2021-11-06 20:55       ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2021-11-06 20:55 UTC (permalink / raw)
  To: cygwin

On Nov  6 21:53, Corinna Vinschen via Cygwin wrote:
> - create binaries with debug info
> - create debug info files from the non-stripped binaries and copy
>   them to usr/debug/...

sorry, usr/lib/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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-06 20:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06 14:31 cygport - avoid stripping binaries Federico Kircheis
2021-11-06 15:01 ` Achim Gratz
2021-11-06 17:30 ` Corinna Vinschen
2021-11-06 19:29   ` Federico Kircheis
2021-11-06 20:53     ` Corinna Vinschen
2021-11-06 20:55       ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).