Вопрос

I have applications which successfully compile with the -m32 switch (in DMD and/or GCC) to produce:

appname: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.15, not stripped

The source packages I have created work fine, on both 32 bit and 64 bit Ubuntu to build the appropriate binary .debs.

I would like to produce the i386 .deb on the same 64 bit machine i use to produce the 64 bit .deb.

Is this possible, and where should I look for instructions?

Это было полезно?

Решение

The answer depends on the complexity of your build. When the normal 64 bit userland tools suffice for a build, simply specify the architecture via -a

debuild -ai386

However, there are often cases where this doesn't work, and in these cases you'll need pbuilder. pbuilder builds a clean Debian/Ubuntu system in a chroot-ed environment. man pbuilder is a good introduction. To get started, you'll need:

sudo pbuilder --create --architecture i386
sudo pbuilder --build mypackage.dsc

Другие советы

It starts with calling debuild with the -ai386 option, which will change the architecture that the package is built for.

Of course you have to ensure that the package contains the i386 build of the application.

You don't do anything thing different from building a 64bit .deb. Except that you include a 32bit build of your application.

The control file specifies the architecture, so be sure you select the correct one.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top