Remove -s flag in Makefile
PATCH 1/1 Remove -s flag in Makefile
install -s is pretty and cute, but makes the binary get into the build directory without any debug information. This is bad, and makes glommer sad. Also, tools that attempt to extract that data, like fedora debuginfo extractor, will fail.
--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -251,7 +251,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"
Signature · 1 line
1.6.0.6
Quoted 4 lines · Glauber Costa
install -s is pretty and cute, but makes the binary get into the build directory without any debug information. This is bad, and makes glommer sad. Also, tools that attempt to extract that data, like fedora debuginfo extractor, will fail.
Fully ACK, but you'll want to fix that in Makefile.target too.
Quoted 22 lines
Signed-off-by Glauber Costa <[email protected]>--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Makefile +1
-1@@ -251,7 +251,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"Signature · 1 line
1.6.0.6
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
Quoted 10 lines · Riku Voipio
Quoted 5 lines · Glauber Costa
install -s is pretty and cute, but makes the binary get into the build directory without any debug information. This is bad, and makes glommer sad. Also, tools that attempt to extract that data, like fedora debuginfo extractor, will fail.
Fully ACK, but you'll want to fix that in Makefile.target too.
Does anyone object to this? I know Debian also carries a similar patch.
Regards,
Anthony Liguori
Quoted 25 lines
Quoted 23 lines
Signed-off-by Glauber Costa <[email protected]>--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Makefile +1
-1@@ -251,7 +251,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"Signature · 1 line
1.6.0.6
Quoted 1 line · Anthony Liguori
Does anyone object to this? I know Debian also carries a similar patch.
Makes sense since debian prefers to build binaries with debug info and then strip them (unless DEB_BUILD_OPTIONS=nostrip is set) when generating the .deb package. Keeps things consistent.
Signature · 1 line
Len Sorensen
Quoted 9 lines · Anthony Liguori
Quoted 8 lines · Riku Voipio
Quoted 5 lines · Glauber Costa
install -s is pretty and cute, but makes the binary get into the build directory without any debug information. This is bad, and makes glommer sad. Also, tools that attempt to extract that data, like fedora debuginfo extractor, will fail.
Quoted 4 lines
Quoted 2 lines
Fully ACK, but you'll want to fix that in Makefile.target too.
Does anyone object to this? I know Debian also carries a similar patch.
If people complain, we can add a ./configure flag for it. But I doubt anyone will notice; the floppy days are gone.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
In message: <[email protected]>
Avi Kivity <[email protected]> writes:
: Anthony Liguori wrote:
: > Riku Voipio wrote:
: >> On Wed, Mar 25, 2009 at 03:45:14PM -0300, Glauber Costa wrote:
: >>
: >>> install -s is pretty and cute, but makes the binary get into the build : >>> directory without any debug information. This is bad, and makes glommer : >>> sad. Also, tools that attempt to extract that data, like fedora : >>> debuginfo
: >>> extractor, will fail.
: >>>
: >>
: >> Fully ACK, but you'll want to fix that in Makefile.target too. : >>
: >
: > Does anyone object to this? I know Debian also carries a similar patch. :
: If people complain, we can add a ./configure flag for it. But I doubt : anyone will notice; the floppy days are gone.
But it is SOP to install stripped binaries.... I'm likely swimming against the tide on this one...
Warner
Quoted 2 lines · M. Warner Losh
But it is SOP to install stripped binaries.... I'm likely swimming against the tide on this one...
It is also standard to use a packaging system. :)
Signature · 1 line
Len Sorensen
Quoted 4 lines · Lennart Sorensen
Quoted 2 lines
But it is SOP to install stripped binaries.... I'm likely swimming against the tide on this one...
It is also standard to use a packaging system. :)
I advocate leaving as much choice/power/flexibility in the hands of the end-user (or packager) as possible. You can't "unstrip" a binary installed with -s, but if you leave off the -s, the user can always strip it later if they choose to do so. If there were a configure option, that would be ideal. (It's a lot easier to add --enable-strip to a spec file or control file than to have to maintain a patch from release to release.)
Being that strip is lossy, it should not be hard-coded IMHO. (Or, to quote the sage of old, "That's one doodle that can't be undid, home-skillet.")
Michael
Signature · 4 lines
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <[email protected]> Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) ----------------------------------------------------------------------- "Persistence trumps talent and looks every time." -- Aaron Brown
In message: <[email protected]>
[email protected] (Lennart Sorensen) writes:
: On Thu, Mar 26, 2009 at 01:02:58PM -0600, M. Warner Losh wrote:
: > But it is SOP to install stripped binaries.... I'm likely swimming : > against the tide on this one...
:
: It is also standard to use a packaging system. :)
It is also standard to strip before the packaging system gets involved...
Warner
Quoted 2 lines · M. Warner Losh
It is also standard to strip before the packaging system gets involved...
Well on debian (and the many derivatives) it is the package building step that does the stripping if it isn't told not to, which makes it easy to build a package with debug symbols if you need one, without having to know how the actual make files for the code work. Having to edit a makefile to enable debuging is annoying.
Signature · 1 line
Len Sorensen
In message: <[email protected]>
[email protected] (Lennart Sorensen) writes:
: On Thu, Mar 26, 2009 at 01:30:39PM -0600, M. Warner Losh wrote:
: > It is also standard to strip before the packaging system gets : > involved...
:
: Well on debian (and the many derivatives) it is the package building : step that does the stripping if it isn't told not to, which makes it : easy to build a package with debug symbols if you need one, without : having to know how the actual make files for the code work. Having to : edit a makefile to enable debuging is annoying.
The whole world isn't Linux. :)
Warner
Quoted 1 line · M. Warner Losh
The whole world isn't Linux. :)
Nooo? Really? Darn. Must be a defect of my world then. :)
Well as someone else said, calling configure with an argument can make install still call with '-s'. I suppose one could even make a make target that adds the -s option while installing. It is easier to add the -s option than to remove it when it is hardcoded in after all.
Signature · 1 line
Len Sorensen
Quoted 10 lines · M. Warner Losh
In message: <[email protected]>
[email protected] (Lennart Sorensen) writes:
: On Thu, Mar 26, 2009 at 01:02:58PM -0600, M. Warner Losh wrote:
: > But it is SOP to install stripped binaries.... I'm likely swimming : > against the tide on this one...
:
: It is also standard to use a packaging system. :)It is also standard to strip before the packaging system gets involved...
Stnadard where? In automake world it's not. There is a install-strip target available on automake.
Picking up a random non-automaked source (rsync), and behold, no strip in install stage. To check if this puts the non-linux people in deep misery, nope. The FreeBSD port copes fine by adding a single strip command in postinstall: target.
Unconditional stripping is bad, mmkay?
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
In message: <[email protected]>
Riku Voipio <[email protected]> writes:
: On Thu, Mar 26, 2009 at 01:30:39PM -0600, M. Warner Losh wrote:
: > In message: <[email protected]>
: > [email protected] (Lennart Sorensen) writes:
: > : On Thu, Mar 26, 2009 at 01:02:58PM -0600, M. Warner Losh wrote:
: > : > But it is SOP to install stripped binaries.... I'm likely swimming : > : > against the tide on this one...
: > :
: > : It is also standard to use a packaging system. :)
:
: > It is also standard to strip before the packaging system gets : > involved...
:
: Stnadard where? In automake world it's not. There is a
: install-strip target available on automake.
All the world isn't automake.
I guess I've been exposed to install -s by default systems since I started using Unix on both the 4.2BSD VAX we had as well as the Sys III (later SYS V) AT&T hardware. And through the years on SunOS, Solaris, HPUX, AIX, Linux, etc.
I guess this boils down to "It's how its been done since the early 1980's at least" but I do know times change.
: Picking up a random non-automaked source (rsync), and behold, : no strip in install stage. To check if this puts the non-linux : people in deep misery, nope. The FreeBSD port copes fine : by adding a single strip command in postinstall: target. :
: Unconditional stripping is bad, mmkay?
Of course. That's why most systems have a flag called STRIP that's passed to install so that users can turn it on or off, but it defaults to on.
Warner
Quoted 2 lines · M. Warner Losh
I guess this boils down to "It's how its been done since the early 1980's at least" but I do know times change.
Maybe you have heard about the new kids called GNU?
http://www.gnu.org/prep/standards/standards.html#Standard-Targets
I don't think qemu is following GNU guidelines, but these are pretty much the makefile targets *most* users expect these days.
Quoted 5 lines
: Unconditional stripping is bad, mmkay?
Of course. That's why most systems have a flag called STRIP that's passed to install so that users can turn it on or off, but it defaults to on.
Personally, this solution would work for me. Not that my random sampling from the debian archive found any application that uses STRIP in that way - when STRIP was defined, it is usually "strip". Including qemu btw...
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
In message: <[email protected]>
Riku Voipio <[email protected]> writes:
: On Thu, Mar 26, 2009 at 03:16:38PM -0600, M. Warner Losh wrote:
: > I guess this boils down to "It's how its been done since the early : > 1980's at least" but I do know times change.
:
: Maybe you have heard about the new kids called GNU?
Nah. They are just a fad that will fade away soon enough :)
: http://www.gnu.org/prep/standards/standards.html#Standard-Targets
:
: I don't think qemu is following GNU guidelines, but these are : pretty much the makefile targets *most* users expect these days.
These are just the coding standards for FSF projects. But that does have a lot of influence on other users in the worlds...
: > : Unconditional stripping is bad, mmkay?
:
: > Of course. That's why most systems have a flag called STRIP that's : > passed to install so that users can turn it on or off, but it defaults : > to on.
:
: Personally, this solution would work for me. Not that my random : sampling from the debian archive found any application that uses : STRIP in that way - when STRIP was defined, it is usually "strip". : Including qemu btw...
Yea, don't much work with debians.
Warner
Quoted 10 lines · M. Warner Losh
In message: <[email protected]>
[email protected] (Lennart Sorensen) writes:
: On Thu, Mar 26, 2009 at 01:02:58PM -0600, M. Warner Losh wrote:
: > But it is SOP to install stripped binaries.... I'm likely swimming : > against the tide on this one...
:
: It is also standard to use a packaging system. :)It is also standard to strip before the packaging system gets involved...
No. binutils and gdb can handle debuginfo being stored in separate files these days. The usual packaging procedure is to install unstripped, then split away debuginfo to separate files for a separate package, so you end up with one $software and one $software-debuginfo package. By default only $software is installed, but if needed you can install get debuginfo too without having to compile the package manually.
I'd tend to keep the default behavior to install stripped. There should be an easy way out for packaging tools, they should be able to override the default without having to patch the Makefile(s). Some configure script option should do the trick.
cheers,
Gerd
Quoted 11 lines · Gerd Hoffmann
No. binutils and gdb can handle debuginfo being stored in separate files these days. The usual packaging procedure is to install unstripped, then split away debuginfo to separate files for a separate package, so you end up with one $software and one $software-debuginfo package. By default only $software is installed, but if needed you can install get debuginfo too without having to compile the package manually.
I'd tend to keep the default behavior to install stripped. There should be an easy way out for packaging tools, they should be able to override the default without having to patch the Makefile(s). Some configure script option should do the trick.
Agreed.
Robert Riebisch
Signature · 2 lines
BTTR Software http://www.bttr-software.de/
Quoted 5 lines · Avi Kivity
Quoted 1 line · Anthony Liguori
Does anyone object to this? I know Debian also carries a similar patch.
If people complain, we can add a ./configure flag for it. But I doubt anyone will notice; the floppy days are gone.
No need to, you can already pass --install="install -s" to qemu's configure.
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
Hi,
Quoted 2 lines · Glauber Costa
install -s is pretty and cute, but makes the binary get into the build directory without any debug information.
Is it really the build directory?
Quoted 2 lines
This is bad, and makes glommer sad. Also, tools that attempt to extract that data, like fedora debuginfo extractor, will fail.
Is it not common standard to install stripped binaries? If it is not, where is it documented?
Thanks,
Dscho
In message: <alpine.DEB.1.00.0903252106570.26370@intel-tinevez-2-302>
Johannes Schindelin <[email protected]> writes:
: Hi,
:
: On Wed, 25 Mar 2009, Glauber Costa wrote:
:
: > install -s is pretty and cute, but makes the binary get into the build : > directory without any debug information.
:
: Is it really the build directory?
I wondered about the patch...
: > This is bad, and makes glommer sad. Also, tools that attempt to extract : > that data, like fedora debuginfo extractor, will fail.
:
: Is it not common standard to install stripped binaries? If it is not, : where is it documented?
It is standard.
Warner
Quoted 8 lines · M. Warner Losh
In message: <alpine.DEB.1.00.0903252106570.26370@intel-tinevez-2-302>
Johannes Schindelin <[email protected]> writes:
: Hi,
: : On Wed, 25 Mar 2009, Glauber Costa wrote:
: : > install -s is pretty and cute, but makes the binary get into the build : > directory without any debug information.
: : Is it really the build directory?
Quoted 7 lines
I wondered about the patch...
: > This is bad, and makes glommer sad. Also, tools that attempt to extract : > that data, like fedora debuginfo extractor, will fail. : : Is it not common standard to install stripped binaries? If it is not, : where is it documented?
It is standard.
Does anyone know what the various ports packages do? If everyone is modifying the Makefile to not strip by default (and they are stripping on install), then I think we ought to do the same. If you're installing from source, chances are you'd prefer the executable to have debug symbols.
Regards,
Anthony Liguori
Quoted 4 lines
Warner
Am Mittwoch, 25. März 2009 21:45:12 schrieb Anthony Liguori:
Quoted 11 lines
Quoted 5 lines · M. Warner Losh
Johannes Schindelin <[email protected]> writes:
: Is it not common standard to install stripped binaries? If it is not, : where is it documented?It is standard.
Does anyone know what the various ports packages do? If everyone is modifying the
Makefileto not strip by default (and they are stripping on install), then I think we ought to do the same. If you're installing from source, chances are you'd prefer the executable to have debug symbols.
Gentoo's portage per default strips all binaries on install step unless you specify FEATURES="nostrip". So there the package management system (=portage) is in charge of stripping the binaries. Portage even warns about pre-stiped binaries.
I think the default should be to let the binaries unstripped unless the user explicitly wants to do this during install.
With regards,
Jan