[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to provide support for -i386 utilities within -amd64 packages?



Hey Carl,

On Thu, May 22, 2014 at 8:41 AM, Carl Worth <cworth@cworth.org> wrote:
I'm interested in packaging (or helping to package) several programs and libraries related to OpenGL, (such as apitrace, vogl, fips, and waffle).

For each of these packages I have a question about best practices
related to supporting 32-bit libraries and binaries within a 64-bit
system.

Imagine a package (waffle-utils, say) that installs a program
(/usr/bin/wflinfo, say) that reports some information about a library
(libGL.so, say) against which it is linked.

So on either an -i386 or an -amd64 system, a user could install the
native package, run the program, and query the native library.

But now imagine a user with an -amd64 system that has an alternate -i386 library provided by a multilibs package (such as libgl1-mesa-glx:i386).
It would be useful for such a user to have both the native 64-bit
program and a 32-bit program available at the same time, (to be able to
query either library).

For this use case, would I make a separate waffle-utils-32 package
targeted for -amd64 but containing a 32-bit /usr/bin/wflinfo-32 that,
other than the name, would be identical to /usr/bin/wflinfo as contained
in waffle-utils:i386?

There are similar issues with apitrace, vogl, and fips where a 64-bit
wrapper program will be invoked on a target OpenGL application. Then,
depending on whether the target program is 32- or 64-bit, the wrapper
will need to load a 32- or 64-bit library provided by some dependent
package.

For apitrace we ended up using the $LIB dynamic expansion to let the
dynamic loader handle this itself (https://github.com/apitrace/apitrace/pull/177).

That's presumably applicable to fips and vogl also.

On the packaging side you just split the wrapper objects into their own
packages, (cf: [1]).

This doesn't help with package dependencies, though. Ideally installing
apitrace-gl-frontend:amd64 would also install
apitrace-gl-tracers:{all-the-enabled-foreign-archs}. I don't think there's any
way of specifying that relationship at the moment, though.

¹: http://anonscm.debian.org/gitweb/?p=pkg-xorg/app/apitrace.git;a=blob;f=debian/control;h=e47303eef55080593b676a5e4b2ac841f2e66b31;hb=8cac4181e65b2c074fdcd77ebd3470713425a8db


Reply to: