I don't know if this is a bug, or it's me doing
something wrong, but here it is:
I've tried to build rpms from libgphoto2-2.1.3.tar.gz.
I have issued the command:
rpmbuild -ta libghoto2-2.1.3.tar.gz
The building of the rpms started nice, but...
When it's close to finish, %install exits with a nasty
error. Here's a copy from stdout, as well as from the
rpm-temp directory:
"make[2]: Leaving directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3/doc'
make[1]: Leaving directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3/doc'
make[1]: Entering directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3'
make[2]: Entering directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3'
/bin/sh ./mkinstalldirs
/var/tmp/libgphoto2-2.1.3-root/usr/bin
/usr/bin/install -c gphoto2-config
/var/tmp/libgphoto2-2.1.3-root/usr/bin/gphoto2-config
/bin/sh ./mkinstalldirs
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2
/usr/bin/install -c -m 644 AUTHORS
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2/AUTHORS
/usr/bin/install -c -m 644 COPYING
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2/COPYING
/usr/bin/install -c -m 644 README
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2/README
/usr/bin/install -c -m 644 CHANGES
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2/CHANGES
/usr/bin/install -c -m 644 NEWS
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2/NEWS
make[2]: Leaving directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3'
make[1]: Leaving directory
`/usr/src/redhat/BUILD/libgphoto2-2.1.3'
+ find /var/tmp/libgphoto2-2.1.3-root -name '*.la'
+ xargs perl -p -i -e 's|/var/tmp/libgphoto2-2.1.3-root||g'
+ /usr/lib/rpm/redhat/find-lang.sh
/var/tmp/libgphoto2-2.1.3-root libgphoto2
No translations found for libgphoto2 in
var/tmp/libgphoto2-2.1.3-root
error: Bad exit status from /var/tmp/rpm-tmp.90261
(%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.90261 (%install)"
(/var/tmp/rpm-tmp.90261):
"#!/bin/sh
RPM_SOURCE_DIR="/usr/src/redhat/SOURCES"
RPM_BUILD_DIR="/usr/src/redhat/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -march=i386 -mcpu=i686"
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS
RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="libgphoto2"
RPM_PACKAGE_VERSION="2.1.3"
RPM_PACKAGE_RELEASE="1"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION
RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/var/tmp/libgphoto2-2.1.3-root"
export RPM_BUILD_ROOT
set -x
umask 022
cd /usr/src/redhat/BUILD
cd libgphoto2-2.1.3
LANG=C
export LANG
rm -rf "${RPM_BUILD_ROOT}"
# Convince gphoto2 to be packaged.
perl -p -i -e
"s|^libdir.*|libdir='$RPM_BUILD_ROOT/usr/lib'|g" \
libgphoto2_port/libgphoto2_port/libgphoto2_port.la
make \ prefix=/var/tmp/libgphoto2-2.1.3-root/usr \ exec_prefix=/var/tmp/libgphoto2-2.1.3-root/usr \ bindir=/var/tmp/libgphoto2-2.1.3-root/usr/bin \ sbindir=/var/tmp/libgphoto2-2.1.3-root/usr/sbin \ sysconfdir=/var/tmp/libgphoto2-2.1.3-root/etc \ datadir=/var/tmp/libgphoto2-2.1.3-root/usr/share \
includedir=/var/tmp/libgphoto2-2.1.3-root/usr/include \ libdir=/var/tmp/libgphoto2-2.1.3-root/usr/lib \
libexecdir=/var/tmp/libgphoto2-2.1.3-root/usr/libexec \ localstatedir=/var/tmp/libgphoto2-2.1.3-root/var \
sharedstatedir=/var/tmp/libgphoto2-2.1.3-root/usr/com \
mandir=/var/tmp/libgphoto2-2.1.3-root/usr/share/man \
infodir=/var/tmp/libgphoto2-2.1.3-root/usr/share/info \ install
# Fix up libtool libraries.
find $RPM_BUILD_ROOT -name '*.la' | \
xargs perl -p -i -e "s|$RPM_BUILD_ROOT||g"
#cp -a
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2-2.1.3/html
html
#cp -a
/var/tmp/libgphoto2-2.1.3-root/usr/share/doc/libgphoto2_port-0.5.1/html/a
pi/gphoto2-port html/api
#find html -name '*.sgml' | xargs rm
/usr/lib/rpm/redhat/find-lang.sh
/var/tmp/libgphoto2-2.1.3-root libgphoto2
# build file list
find /var/tmp/libgphoto2-2.1.3-root -type f -or -type l \
| sed 's!^/var/tmp/libgphoto2-2.1.3-root!!' |
sort > libgphoto2-2.1.3.al
l.files
# extract .so libs
egrep '\.so(\.[0-9]+)*$' \
< libgphoto2-2.1.3.all.files >
libgphoto2-2.1.3.so.files
egrep -v '\.so(\.[0-9]+)*$' \
< libgphoto2-2.1.3.all.files >
libgphoto2-2.1.3.no-so.files
# extract files for devel package
egrep '(-config|\.h|\.la|\.a|\.pc)$' \
< libgphoto2-2.1.3.no-so.files >
libgphoto2-2.1.3.devel.files
egrep -v '(-config|\.h|\.la|\.a|\.pc|\.3)$' \
< libgphoto2-2.1.3.no-so.files >
libgphoto2-2.1.3.no-devel.files
# extract doc files
egrep '^/usr/share/doc' \
< libgphoto2-2.1.3.no-devel.files >
libgphoto2-2.1.3.doc.files
egrep -v '^/usr/share/doc' \
< libgphoto2-2.1.3.no-devel.files >
libgphoto2-2.1.3.no-doc.files
# extract i18n files
egrep '^/usr/share/locale' \
< libgphoto2-2.1.3.no-doc.files >
libgphoto2-2.1.3.i18n.files
egrep -v '^/usr/share/locale' \
< libgphoto2-2.1.3.no-doc.files >
libgphoto2-2.1.3.no-i18n.files
# extract misc files for lib package
egrep '^(/usr/lib|/usr/share)/libgphoto2' \
< libgphoto2-2.1.3.no-i18n.files >
libgphoto2-2.1.3.misc.files
egrep -v '^(/usr/lib|/usr/share)/libgphoto2' \
< libgphoto2-2.1.3.no-i18n.files >
libgphoto2-2.1.3.rest.files \
|| echo "non-zero exit code is not fatal here"
if [ -s libgphoto2-2.1.3.rest.files ]
then
cat libgphoto2-2.1.3.rest.files
fi
cat libgphoto2-2.1.3.{so,doc,misc,i18n}.files \ > libgphoto2-2.1.3.files
exit 0
####################################
/usr/lib/rpm/find-debuginfo.sh
/usr/src/redhat/BUILD/libgphoto2-2.1.3
/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/lib/rpm/redhat/brp-strip-comment-note
/usr/bin/strip /usr/bin/objdump"
I use Red Hat 9 (GLIBC_2.3, kernel 2.4.20-20.9,
gcc-3.2.2) distribution. Please let me know if there is
a library I need to install, or some changes I need to
perform in the spec file in order to successfully build
the rpms.
Sincerely,
Ferdi Badescu.
Logged In: YES
user_id=27487
can build it with usual methods ?(./configure; make)
Logged In: YES
user_id=394279
It works OK if it's build in a regular way:
./configure
make
I have attached the output of the ./configure command
(configure-params.txt). One interesting thing:
If I issued the command [./configure], I get the usual
standard output. However, issuing the comand
./configure > configure-params.txt
I get the file configure-params.txt, plus a message on the
stdout, like this:
./configure: line 13303: ABOUT-NLS: command not found
./configure: line 14407: ABOUT-NLS: command not found.
Ferdi, KG6RTR
the stdout of the ./configure command
Logged In: YES
user_id=674235
I use rh8 with the same stuff. I also get a bad exit:
+ /usr/lib/rpm/redhat/find-lang.sh
/var/tmp/libgphoto2-2.1.3-root libgphoto2
No translations found for libgphoto2 in
var/tmp/libgphoto2-2.1.3-root
error: Bad exit status from /var/tmp/rpm-tmp.57517 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.57517 (%install)
[root@w4 zip]#
Logged In: YES
user_id=674235
I use rh8 with the same stuff. I also get a bad exit:
<long snip>
+ /usr/lib/rpm/redhat/find-lang.sh
/var/tmp/libgphoto2-2.1.3-root libgphoto2
No translations found for libgphoto2 in
var/tmp/libgphoto2-2.1.3-root
error: Bad exit status from /var/tmp/rpm-tmp.57517 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.57517 (%install)
[root@w4 zip]#
Logged In: YES
user_id=919201
I've managed to get this to work, although parts of it are a
bit of a hack and should probably be looked at closer:
1. do a "./configure" in the top-level directory.
2. comment out the %find_lang %{name} line in the spec file
(packaging/rpm/package.spec). This seems to create a list
of all of the localization files for inclusion in the
package. I don't think this is needed as the files get
included regardless.
3. Add the man pages to the devel package file list:
Change the line "egrep '(-config|\.h|\.la|\.a|\.pc)$' \&quot; to
"egrep '(-config|\.h|\.la|\.a|\.pc|\.3)$' \&quot;. This is in
the same spec file (line 124, I think). If you don't do
this, rpmbuild will complain about there being some files
that are not included in the file list.
4. If building on Redhat 9, create the file "~/.rpmmacros"
and add a line: "%debug_package %(nil)". This is needed to
prevent rpm from building a debug package on RH9. I'm not
sure what this means, but it won't work without it.
5. Build it with "make rpm".
Logged In: YES
user_id=48092
rpms build differently everywhere.
if you have problems you need to adapt the .spec file to your
needs.