jacob-carlborg/dvm — Issue #1: Installed DMDs can't cross-compile with -m64/-m32
Author: Abscissa
Created: 2012-01-29 04:20:07+00:00
State: open

For example:

Install the 64-bit DVM on 64-bit Linux. Then:

{{{
$ dvm install 2.056
$ dvm use 2.056
$ cat test.d
void main(){}
$ rdmd test.d
$ rdmd -m32 test.d
/usr/bin/ld: cannot find -lphobos2
collect2: ld returned 1 exit status
--- errorlevel 1
}}}

But it works fine when DMD is installed like this:

{{{
$ dvm fetch 2.056
$ unzip dmd.2.056.zip
$ PATH=`pwd`/dmd2/linux/bin64:$PATH
}}}

My understanding is that the other way around *should* work too (ie, using -m64 on a 32-bit installation of dmd), but likely doesn't (though I haven't checked).

I think the problem is that {{{dvm install ...}}} throws away one of DMD's lib dirs and renames the other to "lib" instead of just leaving both intact.