You are not logged in.

#1 2013-07-21 21:49:06

VirtualTam
Member
From: Oslo
Registered: 2012-09-27
Posts: 9

qmake-qt4 generated Makefile calls GNU strip on program icon

Hi!
One of the packages I maintain is a Qt4 application: GoldenDict. When calling qmake-qt4 to generate the Makefile, the following two targets are created:

install_icons: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/pixmaps/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/pixm\
aps/ 
        -$(INSTALL_PROGRAM) /home/tamisier/arch-packages/goldendict-git/src/goldendict/redist/icons/gold\
endict.png $(INSTALL_ROOT)/usr/share/pixmaps/
        -strip $(INSTALL_ROOT)/usr/share/pixmaps/goldendict.png

install_desktops: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/applications/ || $(MKDIR) $(INSTALL_ROOT)/usr/share\
/applications/ 
        -$(INSTALL_PROGRAM) /home/tamisier/arch-packages/goldendict-git/src/goldendict/redist/goldendict\
.desktop $(INSTALL_ROOT)/usr/share/applications/
        -strip $(INSTALL_ROOT)/usr/share/applications/goldendict.desktop

Both targets are calling strip, which results in the following errors when running make install:

install -m 755 -p /home/virtualtam/arch-packages/goldendict-git/src/goldendict/redist/icons/goldendict.p\
ng /home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/pixmaps/
strip /home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/pixmaps/goldendict.png
strip:/home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/pixmaps/goldendict.png:\
 Unable to recognise the format of the input file
make: [install_icons] Error 1 (ignored)
install -m 755 -p /home/virtualtam/arch-packages/goldendict-git/src/goldendict/redist/goldendict.desktop\
 /home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/applications/
strip /home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/applications/goldendict\
.desktop
strip:/home/virtualtam/arch-packages/goldendict-git/pkg/goldendict-git/usr/share/applications/goldendict\
.desktop: Unable to recognise the format of the input file
make: [install_desktops] Error 1 (ignored)

The error does not prevent the package from being built, but it would be nice to not have it at all... roll
Is there a way to tell qmake-qt4 not to strip icons and .desktop files?

Offline

#2 2013-07-21 21:57:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: qmake-qt4 generated Makefile calls GNU strip on program icon

Given that makepkg will strip binaries anyways, you could just remove all calls to strip (via sed).

Or, perhaps (untested) just define and export strip as a function that does nothing.

Last edited by Trilby (2013-07-21 21:57:54)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-07-21 22:32:13

VirtualTam
Member
From: Oslo
Registered: 2012-09-27
Posts: 9

Re: qmake-qt4 generated Makefile calls GNU strip on program icon

Yes, I thought of patching the Makefile too, but I'm wondering if it is possible to do it the clean way by passing an option to qmake... In the generated makefile, there is a $STRIP variable that defines the utility for stripping, but in the Makefile, though it is passed as an option for compilation targets, it is not used for "resources" such as icons, where the call to "strip" is hardcoded.

Offline

#4 2013-07-22 11:11:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: qmake-qt4 generated Makefile calls GNU strip on program icon

while this may not solve your problem.  VirtualTam,

makepkg can be configured to NOT strip binaries by using

options = (!strip) in the PKGBUILD.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2013-07-22 18:57:46

VirtualTam
Member
From: Oslo
Registered: 2012-09-27
Posts: 9

Re: qmake-qt4 generated Makefile calls GNU strip on program icon

Actually, using

options=(!strip)

in the PKGBUILD prevents makepkg from stripping binaries when calling the package() method, which is not the issue here...

Offline

#6 2014-02-16 23:25:05

ava1ar
Member
From: NYC
Registered: 2009-10-20
Posts: 24

Re: qmake-qt4 generated Makefile calls GNU strip on program icon

Looks like problem still persists. I found a better workaround than sed'ing Makepkg - just pass "QMAKE_STRIP=echo" to qtmake like

qmake-qt4 -spec linux-g++-32 "QMAKE_STRIP=echo" 

and strip will not happen anymore.

Offline

Board footer

Powered by FluxBB