Installing x32 packages on x64 debian (or fix a dmd bug)

Jordi Sayol g.sayol at yahoo.es
Tue Mar 27 06:11:38 PDT 2012


Al 27/03/12 15:03, En/na simendsjo ha escrit:
> On Tue, 27 Mar 2012 13:24:06 +0200, Jordi Sayol <g.sayol at yahoo.es> wrote:
> 
>> Al 27/03/12 12:40, En/na simendsjo ha escrit:
>>> On Tue, 27 Mar 2012 12:18:45 +0200, Jordi Sayol <g.sayol at yahoo.es> wrote:
>>>
>>>> Al 27/03/12 11:52, En/na simendsjo ha escrit:
>>>>> This might not be the best forum to ask, but as it relates a dmd bug, I hope others here have found a workaround.
>>>>>
>>>>> I'm using a debian-based x64 distro. Due to http://d.puremagic.com/issues/show_bug.cgi?id=5570, I have to compile for -m32.
>>>>> The challenge is installing 32-bit libraries using apt-get. I've found some "solutions" on the web, but they are all terrible hacks, and I haven't gotten it working properly.
>>>>> Downloading packages directly (and all dependencies!) is a real drag!
>>>>>
>>>>> Has someone found an acceptable way of dealing with this?
>>>>>
>>>>
>>>> Hello simendsjo,
>>>>
>>>> All deb packages at http://dlang.org/download.html includes both 32-bit and 64-bit libraries, so, on a debian-based x64 distro, just install the 64-bit deb, and You'll be able to compile to 32-bit just adding -m32 as argument.
>>>> Same situation for debian-based x32 distros, You can compile to 64-bit adding -m64 as argument. Of course, you'll not allowed to run a 64-bit binary on a x32 platform.
>>>>
>>>> Best regards,
>>>
>>> Thanks, but I was probably not very clear when writing the question.
>>> DMD itself is not a problem (rather than the bug which forces me to only use 32-bit), it's all the packages available through the package manager - it only downloads 64-bit libraries.
>>
>> This is not strictly truth. dmd deb packages installs, among others, "gcc-multilib", witch make possible to compile to 32-bit in x64 platform and vice versa .
>>
>>> If I want to use a c library, I need to find both the library and all it's dependencies as 32-bit libraries rather than just installing through the package manager.
>>> It can be a tedious process..
>>>
>>
>> If you want to run a 32-bit program on a x64, install "ia32-libs" and all its dependencies, through the package manager.
>>
>> Best regards,
> 
> I have ia32-libs, but say I want to install mysql? I can only get x64 versions thourgh the package manager. Trying to download and install 32-bit .deps says it's conflicting with the installed x64 library.
> 

Ok, then you can try chroot command into a directory created with debootstrap. Also you can install a debian-based x32 distro onto a virtualbox machine.

Best regards,
-- 
Jordi Sayol


More information about the Digitalmars-d-learn mailing list