LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RPM Package building (http://www.linuxquestions.org/questions/linux-newbie-8/rpm-package-building-692413/)

harish.patel 12-23-2008 01:09 AM

RPM Package building
 
Hi,
I am working on RHEL4 linux system.
I am facing one problem with rpm package building. I have one static library.This static library is linked with other dynamic libraries.
This static & dynamic libraries are within one package. When it is installed in /usr/lib path & discarding all symbols using strip linux utility. At that time, strip command gives error for multiple strip of static library.
I use following command to build rpm package.

#rpmbuild -ba <PackageName>.spec
Log of rpm package building is mention below.
--------------------------------------------------------------------
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf AVL
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/AVL-1.0.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd AVL
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd AVL
+ LANG=C
+ export LANG
+ unset DISPLAY
+ LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
+ CFLAGS='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4'
+ ./configure
+ make
MP4Muxer_muxer.c: In function `MP4WR_Get_MUX_BufferSize':
MP4Muxer_muxer.c:53: warning: assignment makes integer from pointer without a cast
QTFFMuxer_muxer.c: In function `QTFFWR_Get_MUX_BufferSize':
QTFFMuxer_muxer.c:50: warning: assignment makes integer from pointer without a cast
+ exit 0
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd AVL
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/AVL-buildroot
+ make DESTDIR=/var/tmp/AVL-buildroot install
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/AVL
5636 blocks
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/st6zkEVG/libosal.a: Invalid operation
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/stcWwiGJ/libosal.a: Invalid operation
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/stCzOrhP/libosal.a: Invalid operation
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/stT1kbAc/libosal.a: Invalid operation
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/stBhTs9e/libosal.a: Invalid operation
/usr/bin/strip: /var/tmp/AVL-buildroot/usr/local/lib/stThQUIh/libosal.a: Invalid operation
error: Bad exit status from /var/tmp/rpm-tmp.32273 (%install)
Bad exit status from /var/tmp/rpm-tmp.32273 (%install)
-------------------------------------------------------------------------


Plese give me right solution for that.
How can I solve this problem & make one rpm package.

unSpawn 12-24-2008 10:41 AM

Either re-defining the "__os_install_post" macro as
Code:

%define __os_install_post    \
    /usr/lib/rpm/brp-compress \
%{nil}

in the top of your .spec file or exporting "DONT_STRIP=1" in the %install section should work.

harish.patel 12-25-2008 11:57 PM

Hi ,
Thank you,I created rpm package successfully.
Thanks a lot.

Thanks & Regards
Harish Patel


All times are GMT -5. The time now is 08:52 AM.