[ale] more rpms problems
Joe Steele
joe at madewell.com
Fri Mar 1 09:24:50 EST 2002
I think you will find the root of your problems by comparing the
Makefiles for V1.8.4 and V2.0.1.
The old makefile did not make shared libs -- only static. Therefore,
the rpm spec file had an extra gcc command to create the SO lib. The
spec file also installed the SO lib and created the symbolic links to
it.
The new makefile automatically creates the SO lib, installs it, and
creates the symbolic links. The makefile no longer automatically
creates or installs a static lib, but this can be done with 'make
libgd.a' if desired.
One problem you've encountered is that the new makefile is creating
the symbolic links with *absolute* paths in the RPM_BUILD_ROOT tree,
so the links would be wrong when the rpm is installed (rpm catches
this and warns about it). There are various alternatives for solving
this, a couple of which are:
1) Edit the makefile so that it:
cd $(INSTALL_LIB)
ln -s libgd.so.${VERSION} libgd.so.${MAJOR_VERSION}
ln -s libgd.so.${VERSION} libgd.so
cd -
This will make the links with relative paths rather than absolute, so
the links can be installed anywhere and work. You would also edit
the rpm spec file and remove the links which is creates.
2) Leave the makefile alone, but edit the rpm spec file so that it
removes the bad links before creating the new links (which is the
option that you call 'a TOTAL hack').
It also looks to me that you will need to edit the rpm spec file by
removing the gcc command and the install command for the SO lib
(since this is now handled by the makefile). If you want a static
lib, you would need to add 'make libgd.a' and add an install command
for libgd.a.
--Joe
-----Original Message-----
From: Ken Nagorski [SMTP:kenn at pcintelligent.com]
Sent: Thursday, February 28, 2002 12:05 PM
To: ale at ale.org
Subject: [ale] more rpms problems
Hi there,
I really hope there is someone on this list that knows about building RPMS
cause this it frustrtating.
OK - If I have this in the spec file,
install -m 755 libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/
ln -s libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libgd.so
ln -s libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libgd.so.2
ln -s libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libgd.so.2.0
I get this,
+ install -m 755 libgd.so.2.0.1 /var/tmp/gd-root/usr/lib/
+ ln -s libgd.so.2.0.1 /var/tmp/gd-root/usr/lib/libgd.so
ln: `/var/tmp/gd-root/usr/lib/libgd.so': File exists
error: Bad exit status from /var/tmp/rpm-tmp.10995 (%install)
If I take that out - I get this.
RPM build errors:
Symlink points to BuildRoot: /usr/lib/libgd.so.2 ->
/var/tmp/gd-root/usr/lib/libgd.so.2.0.0
Symlink points to BuildRoot: /usr/lib/libgd.so ->
/var/tmp/gd-root/usr/lib/libgd.so.2.0.0
[root at redhat SPECS]# vi gd-2.0.1.spec
As far as I can tell from reading the spec file and what I know about how
the build process goes it's working out of the $RPM_BUILD_ROOT which is
var/tmp/gd-root/usr/lib/libgd.so.2.0.0 so of course it is a link to itself.
This is so frustrating cause I have read the docs at rpm.org and a few other
places and everything I have found is so brief and has nonthing about
troubleshooting.
And why is it linking anything to the build root anyway? It is just a tmp
dir - There is something I am so totally missing here and it is making me
insane... Uhg!
Thanks
Ken
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.10995 (%install)
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list