Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: atrpms: users

Trouble building RPMs on RHEL4 with atrpms-rpm-config-183

 

 

atrpms users RSS feed   Index | Next | Previous | View Threaded


abbotti at mev

Apr 9, 2009, 4:54 AM

Post #1 of 4 (820 views)
Permalink
Trouble building RPMs on RHEL4 with atrpms-rpm-config-183

I recently switched from using my local .rpmmacros for building KMDL
packages to using the atrpms-rpm-config package. But now I have trouble
building binary RPMs from SRPMs on RHEL4. In particular, I can't seem
to build KMDL packages or library packages based around an autotools config.

For example, building a typical KMDL package ('drm' in this case) with
the following command:

$ rpmbuild --rebuild --target i686 ~/rpmbuild/SRPMS/drm-0.20070513-8.src.rpm

ends with the following output:
[...]
+ /usr/lib/rpm/atrpms/find-debuginfo.sh /home/abbotti/rpmbuild/BUILD/drm
extracting debug info from
/var/tmp/drm-0.20070513-8.el4-root/lib/modules/updates/drivers/char/drm/i830.ko
*** WARNING: No build ID note found in
/var/tmp/drm-0.20070513-8.el4-root/lib/modules/updates/drivers/char/drm/i830.ko
error: Bad exit status from /var/tmp/rpm-tmp.33019 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.33019 (%install)


Another example, building a52dec with the following command:

$ rpmbuild --rebuild ~/rpmbuild/SRPMS/a52dec-0.7.4-7.0.1.src.rpm

ends with the following output:
[...]
+ /usr/lib/rpm/atrpms/find-debuginfo.sh
/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4
extracting debug info from /var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
*** WARNING: No build ID note found in
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
error: Bad exit status from /var/tmp/rpm-tmp.21145 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.21145 (%install)


If I add a "set -x" line near the top of
/usr/lib/rpm/atrpms/find-debuginfo.sh (so I can see what it's doing), I
get the following output at the end:

+ /usr/lib/rpm/atrpms/find-debuginfo.sh
/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4
+ strip_g=false
+ strict=false
+ BUILDDIR=.
+ out=debugfiles.list
+ nout=0
+ '[' 1 -gt 0 ']'
+ case "$1" in
+ BUILDDIR=/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4
+ shift
+ break
+ i=0
+ (( i < nout ))
+ LISTFILE=/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4/debugfiles.list
+ SOURCEFILE=/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4/debugsources.list
+ LINKSFILE=/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4/debuglinks.list
+ test -d /var/tmp/a52dec-root
+ debugdir=/var/tmp/a52dec-root/usr/lib/debug
+ shopt -s extglob
+ set -o pipefail
+ strict_error=ERROR
+ false
+ strict_error=WARNING
+ find /var/tmp/a52dec-root '!' -path
'/var/tmp/a52dec-root/usr/lib/debug/*.debug' -type f '(' -perm -0100 -or
-perm -0010 -or -perm -0001 -or -path
'/var/tmp/a52dec-root/lib/modules/*' ')' -print
+ file -N -f -
+ sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'
+ xargs --no-run-if-empty stat -c '%h %D_%i %n'
+ read nlinks inum f
+ get_debugfn /var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
++ dirname /usr/lib/liba52.so.0.0.0
+ dn=/usr/lib
++ basename /var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0 .debug
+ bn=liba52.so.0.0.0.debug
+ debugdn=/var/tmp/a52dec-root/usr/lib/debug/usr/lib
+ debugfn=/var/tmp/a52dec-root/usr/lib/debug/usr/lib/liba52.so.0.0.0.debug
+ '[' -f
/var/tmp/a52dec-root/usr/lib/debug/usr/lib/liba52.so.0.0.0.debug ']'
+ '[' 1 -gt 1 ']'
+ echo 'extracting debug info from
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0'extracting debug info from
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
++ /usr/lib/rpm/debugedit -b /home/abbotti/rpmbuild/BUILD -d
/usr/src/debug -i -l
/home/abbotti/rpmbuild/BUILD/a52dec-0.7.4/debugsources.list
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
+ id=
+ '[' -z '' ']'
+ echo '*** WARNING: No build ID note found in
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0'
*** WARNING: No build ID note found in
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
+ false
+ case "$dn" in
+ mkdir -p /var/tmp/a52dec-root/usr/lib/debug/usr/lib
+ test -w /var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
+ strip_to_debug
/var/tmp/a52dec-root/usr/lib/debug/usr/lib/liba52.so.0.0.0.debug
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
+ local g=
+ false
+ eu-strip --remove-comment -f
/var/tmp/a52dec-root/usr/lib/debug/usr/lib/liba52.so.0.0.0.debug
/var/tmp/a52dec-root/usr/lib/liba52.so.0.0.0
+ exit
+ exit
error: Bad exit status from /var/tmp/rpm-tmp.97375 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.97375 (%install)


It looks like the "eu-strip" command above is failing silently with exit
status 1. The version of "eu-strip" installed on RHEL4 is just a
simple-looking bash script that doesn't look like it's designed to
handle the above command line syntax, so I think this is the cause of
the problem. Here is RHEL4's /usr/bin/eu-strip script, which I think
will fall through to the "else exit 1" with the above command line:

#!/bin/bash
[ "$1" != "-f" -a "$2" != "-f" ] && exec strip "$@"
if [ "$1" = "-f" ]; then
opts=
debug="$2"
file="$3"
[ $# -ne 3 ] && exit 1
file "$file" 2>/dev/null | grep -q relocatable && opts=-g
elif [ "$1" = "-g" ]; then
opts=-g
debug="$3"
file="$4"
[ $# -ne 4 ] && exit 1
else
exit 1
fi
set -e
objcopy --only-keep-debug "$file" "$debug"
strip $opts "$file"
objcopy --add-gnu-debuglink="$debug" "$file"



My question is, are the atrpms-rpm-config package macros supposed to be
supported on RHEL4 or should I uninstall them and go back to using my
previous .rpmmacros file?

Best regards,
Ian Abbott.

_______________________________________________
atrpms-users mailing list
atrpms-users [at] atrpms
http://lists.atrpms.net/mailman/listinfo/atrpms-users


john.robinson at anonymous

Apr 9, 2009, 5:48 AM

Post #2 of 4 (718 views)
Permalink
Re: Trouble building RPMs on RHEL4 with atrpms-rpm-config-183 [In reply to]

On 09/04/2009 12:54, Ian Abbott wrote:
[...]
> It looks like the "eu-strip" command above is failing silently with exit
> status 1. The version of "eu-strip" installed on RHEL4 is just a
> simple-looking bash script

Not on my EL4 box it isn't:

[root [at] hol ~]# file /usr/bin/eu-strip
/usr/bin/eu-strip: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
[root [at] hol ~]# ldd /usr/bin/eu-strip
linux-gate.so.1 => (0xb7ffa000)
libelf.so.1 => /usr/lib/libelf.so.1 (0x4a513000)
libdl.so.2 => /lib/libdl.so.2 (0x4a4b3000)
libc.so.6 => /lib/tls/i686/libc.so.6 (0x4a397000)
/lib/ld-linux.so.2 (0x4a37f000)
[root [at] hol ~]# rpm -qif /usr/bin/eu-strip
Name : elfutils Relocations: (not relocatable)
Version : 0.97.1 Vendor: CentOS
Release : 5 Build Date: Sat Nov 17
09:44:50 2007
Install Date: Wed Dec 19 01:41:30 2007 Build Host: builder6
Group : Development/Tools Source RPM:
elfutils-0.97.1-5.src.rpm
Size : 302981 License: GPL
Signature : DSA/SHA1, Sun Nov 18 20:50:51 2007, Key ID a53d0bab443e1821
Summary : A collection of utilities and DSOs to handle compiled objects.
Description :
Elfutils is a collection of utilities, including ld (a linker),
nm (for listing symbols from object files), size (for listing the
section sizes of an object or archive file), strip (for discarding
symbols), readelf (to see the raw ELF file structures), and elflint
(to check for well-formed ELF files). Also included are numerous
helper libraries which implement DWARF, ELF, and machine-specific ELF
handling.
[root [at] hol ~]# cat /etc/redhat-release
CentOS release 4.7 (Final)


_______________________________________________
atrpms-users mailing list
atrpms-users [at] atrpms
http://lists.atrpms.net/mailman/listinfo/atrpms-users


abbotti at mev

Apr 9, 2009, 7:04 AM

Post #3 of 4 (710 views)
Permalink
Re: Trouble building RPMs on RHEL4 with atrpms-rpm-config-183 [In reply to]

John Robinson wrote:
> On 09/04/2009 12:54, Ian Abbott wrote:
> [...]
>
>> It looks like the "eu-strip" command above is failing silently with
>> exit status 1. The version of "eu-strip" installed on RHEL4 is just a
>> simple-looking bash script
>
>
> Not on my EL4 box it isn't:
>
> [root [at] hol ~]# file /usr/bin/eu-strip
> /usr/bin/eu-strip: ELF 32-bit LSB executable, Intel 80386, version 1
> (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
> stripped
> [root [at] hol ~]# ldd /usr/bin/eu-strip
> linux-gate.so.1 => (0xb7ffa000)
> libelf.so.1 => /usr/lib/libelf.so.1 (0x4a513000)
> libdl.so.2 => /lib/libdl.so.2 (0x4a4b3000)
> libc.so.6 => /lib/tls/i686/libc.so.6 (0x4a397000)
> /lib/ld-linux.so.2 (0x4a37f000)
> [root [at] hol ~]# rpm -qif /usr/bin/eu-strip
> Name : elfutils Relocations: (not relocatable)
> Version : 0.97.1 Vendor: CentOS
> Release : 5 Build Date: Sat Nov 17
> 09:44:50 2007
> Install Date: Wed Dec 19 01:41:30 2007 Build Host: builder6
> Group : Development/Tools Source RPM:
> elfutils-0.97.1-5.src.rpm
> Size : 302981 License: GPL
> Signature : DSA/SHA1, Sun Nov 18 20:50:51 2007, Key ID a53d0bab443e1821
> Summary : A collection of utilities and DSOs to handle compiled
> objects.
> Description :
> Elfutils is a collection of utilities, including ld (a linker),
> nm (for listing symbols from object files), size (for listing the
> section sizes of an object or archive file), strip (for discarding
> symbols), readelf (to see the raw ELF file structures), and elflint
> (to check for well-formed ELF files). Also included are numerous
> helper libraries which implement DWARF, ELF, and machine-specific ELF
> handling.
> [root [at] hol ~]# cat /etc/redhat-release
> CentOS release 4.7 (Final)

Mine is as follows, but it's from a copy of RHEL4WS that's never been
updated from RHN:

$ cat /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant Update 1)
$ file /usr/bin/eu-strip
/usr/bin/eu-strip: Bourne-Again shell script text executable
$ rpm -qif /usr/bin/eu-strip
Name : elfutils Relocations: (not relocatable)
Version : 0.97 Vendor: Red Hat, Inc.
Release : 5 Build Date: Mon 29 Nov 2004
00:52:39 GMT
Install Date: Fri 02 Mar 2007 12:16:09 GMT Build Host:
tweety.build.redhat.com
Group : Development/Tools Source RPM:
elfutils-0.97-5.src.rpm
Size : 5865 License: GPL
Signature : DSA/SHA1, Wed 05 Jan 2005 20:48:38 GMT, Key ID
219180cddb42a60e
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary : A collection of utilities for handling compiled objects.
Description :
Elfutils is a collection of utilities, including ld (a linker),
nm (for listing symbols from object files), size (for listing the
section sizes of an object or archive file), strip (for discarding
symbols), readline (the see the raw ELF file structures), and elflint
(to check for well-formed ELF files). Also included are numerous
helper libraries which implement DWARF, ELF, and machine-specific ELF
handling.

_______________________________________________
atrpms-users mailing list
atrpms-users [at] atrpms
http://lists.atrpms.net/mailman/listinfo/atrpms-users


Axel.Thimm at ATrpms

Apr 9, 2009, 8:41 PM

Post #4 of 4 (717 views)
Permalink
Re: Trouble building RPMs on RHEL4 with atrpms-rpm-config-183 [In reply to]

On Thu, Apr 09, 2009 at 03:04:38PM +0100, Ian Abbott wrote:
> John Robinson wrote:
> > On 09/04/2009 12:54, Ian Abbott wrote:
> > [...]
> >
> >> It looks like the "eu-strip" command above is failing silently with
> >> exit status 1. The version of "eu-strip" installed on RHEL4 is just a
> >> simple-looking bash script
> >
> >
> > Not on my EL4 box it isn't:
> >
> > [root [at] hol ~]# file /usr/bin/eu-strip
> > /usr/bin/eu-strip: ELF 32-bit LSB executable, Intel 80386, version 1
> > (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
> > stripped

> > [root [at] hol ~]# rpm -qif /usr/bin/eu-strip
> > Name : elfutils Relocations: (not relocatable)
> > Version : 0.97.1 Vendor: CentOS
> > Release : 5 Build Date: Sat Nov 17
> > 09:44:50 2007

> Mine is as follows, but it's from a copy of RHEL4WS that's never been
> updated from RHN:

> Release : 5 Build Date: Mon 29 Nov 2004
> 00:52:39 GMT

Please update your RHEL4 system. It looks like this was fixed in 2007.
--
Axel.Thimm at ATrpms.net

atrpms users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.