JudoWill
JudoWill

Reputation: 4811

Conda build a 32 bit package on a 64 bit machine

I have been using conda as a package manager for a lot of my work and its really helped keep the environments of multiple people in check with both Python and binary packages. Its been all sunshine and rainbows while all of my users have been on 64-bit Linux machines.

Now I need to support a handful of 32-bit machines. Is there any way to build 32-bit versions of my packages on my 64-bit machine?

I've found this answer on SO, How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake but I can't figure out how to get it to compile and upload both 32 and 64 bit versions.

Upvotes: 2

Views: 1950

Answers (1)

asmeurer
asmeurer

Reputation: 91550

conda assumes that the entire installation is 64-bit, so the first thing you'll need to do is create a separate Miniconda installation for 32-bit building. Then build your recipe. If the package links against any system libraries, you'll need to have the 32-bit versions installed. I personally find it easiest to build 32-bit packages on a 32-bit VM, as then you know that everything is 32-bit, but building on a 64-bit machine is possible and it should work (although I would recommend testing the package on a 32-bit machine).

Upvotes: 5

Related Questions