[cups.bugs] Re: [MOD] STR #1487: rpmbuild fails on x86_64

Michael Sweet mike at easysw.com
Wed Mar 15 07:46:25 PST 2006


Klaus Singvogel wrote:
> Michael Sweet wrote:
>> Johannes Meixner wrote:
> [...]
>>> Shouldn't the RPM macros %{_lib} and  %{_libdir} be even better?
>>> See for example
>>> http://www.redhat.com/magazine/009jul05/features/multilib/
>>> "Build-time issues"
>> Those don't handle multiple-arch builds, which is what we support for
>> x86_64 (among other platforms).  Life in the mixed 32/64-bit world is
>> a bit more complicated, unfortunately...
> 
> Sorry to disagree, but Johannes seems to be right.
> 
> Using %{_lib} or %{_libdir} is the correct way to use a architecture
> independend way in the specfiles.
> 
> If you call "configure" with option "--libdir=%{_libdir}" it should be
> enough at compilation time. Globbing in the Files section of the
> specfile later via
>   %{_libdir}/*.so
> should work either.

The problem is that you can only create ONE architecture that way,
and a spec file that allows you to build both 32-bit and 64-bit
libraries *in a single package/spec file* will just not work with
%{_libdir}, or at least not the way you expected.

> We don't have any problems any more at SUSE since we use those macros
> consistently, and this is done since a long time now.

You can do your packaging however you wish, however the purpose of
the spec file we include is to a) package CUPS in the standard
location on ALL Linux distributions and b) support generation and
packaging of both the 32-bit and 64-bit libraries on the x86_64
platform in a single RPM (i.e. no more hacks to produce a separate
32-bit library package like you currently use in SuSE...)

Using %{_libdir} and then an %ifarch with hardcoded /usr/lib for
x86_64 is just as much of a hack, and thanks to Debian not following
the LSB you can't even depend on /usr/lib for the 32-bit libraries -
we'd need to define a separate %{_lib32dir}.  Using /usr/lib*/*.so,
etc. covers ALL of the supported library directories without a lot
of conditional stuff.

The situation will only get more complicated if we try supporting
Linux on 64-bit PowerPC, SPARC, or i-Series systems, as you may be
compiling a 32-bit CUPS install with 64-bit libraries (that *is*
supported on Solaris and IRIX already, BTW!)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list