[pacman-dev] Issues with strip on package sources

Dave Reisner d at falconindy.com
Fri Apr 8 08:36:28 EDT 2011

On Fri, Apr 08, 2011 at 10:20:53PM +1000, Allan McRae wrote:
> On 08/04/11 22:12, Dave Reisner wrote:
> >On Fri, Apr 08, 2011 at 10:10:19PM +1000, Allan McRae wrote:
> >>On 08/04/11 21:57, Mathew de Detrich wrote:
> >>>A problem that seems to be occurring on packages (typically on AUR) where
> >>>makepkg using gnu's strip causes the package building process to fail (since
> >>>/usr/bin/strip terminates with a different error message) when there is an
> >>>incompatible object file in the source. As an example with this current
> >>>package (read the latest comments)
> >>>https://aur.archlinux.org/packages.php?ID=31566
> >>>
> >>>It fails to build unless you add
> >>>options=(!strip)
> >>>into the PKGBUILD, which of course solves the problem in a bastardized way
> >>>since it doesn't strip anything at all (and causes ridiculously bloated
> >>>packages)
> >>>
> >>>In this case the problem seems to be that the source package contains an
> >>>object file from a different architecture (x64) which when stripped, causes
> >>>the strip to prematurely terminate (and thus the building of the package to
> >>>fail)
> >>>
> >>>I looked through the man page for strip and there doesn't seem to be an
> >>>option for it to continue stripping even if it hits an incompatible source
> >>>file. The other option I guess would be to add more granularity (or another
> >>>option) where you can provide a mask for objects not to be stripped (so you
> >>>can do something like *64.so and any file matching that mask wont be
> >>>stripped). Or you could manually invoke strip on every object file, and not
> >>>terminate the makepkg process should it hit an "incompatible" object file
> >>>
> >>>In any case its an annoyance
> >>>
> >>
> >>I can not be sure given no-one who hits this issue ever posts any
> >>actual output...   but you are probably hitting this binutils issue:
> >>http://sourceware.org/bugzilla/show_bug.cgi?id=12632
> >>
> >>
> >>But anyway, it appears the change from using a whitelist to choose
> >>what files to strip to attempting to strip everything has caused
> >>some packaging issues.  So I also think some way to blacklist
> >>files/folders from being stripped would be useful.
> >>
> >>Allan
> >>
> >
> >I think this is just a matter of strip encountering files that aren't of
> >the architecture of the current system. qemu is a good example of where
> >this fails:
> >
> >/usr/bin/strip: Unable to recognise the format of the input file
> >`./usr/share/qemu/openbios-sparc32'
> >
> >and file reports this as...
> >
> >pkg/usr/share/qemu/openbios-sparc32: ELF 32-bit MSB executable, SPARC,
> >version 1 (SYSV), statically linked, stripped
> >
> >These are files that are shipped precompiled and prestripped.
> >
> What does "file -bi" give on that file?

$ file -bi pkg/usr/share/qemu/openbios-sparc32
application/x-executable; charset=binary


More information about the pacman-dev mailing list