Note: This website is archived. For up-to-date information about D projects and development, please visit

Ticket #37 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

cannot build 32-bit for dmd on 64-bit system

Reported by: Lutger Assigned to: somebody
Priority: minor Version:
Keywords: Cc:


Building as per instruction on a 64-bit linux for dmd will result in 64-bit c++ libraries linked in, which dmd cannot handle.

I was able to build QtD by adding the lines below to FindD.cmake and run some of the examples, so it seems to work out. However, I admit to not knowing anything about CMake so I cannot vouch if this is the right way to do it.

After line 14 in FindD.cmake (revision 304, where it checks for dmd) insert the following lines:



I'm not sure all those are needed. I have tried setting this in the terminal before running cmake and it also worked:

export CXXFLAGS=-m32 export CFLAGS=-m32 export LDFLAGS=-m32

However, when I put the flags in FindD.cmake as opposed to just the terminal, I got a lot of linker errors due to missing 32 bit devel packages, which is normal. (I think my qt-devel.i586 was screwed though as it showed dependencies on 64bit libs). I would guess this difference is because of the shared libs flag in FindD.cmake.

Change History

01/25/10 23:38:38 changed by eldar

I am sorry that it got lost from my attention. It is probably worth putting in a wiki. I am not sure if incorporating this into the CMake script would break things or not. And I am not good enough in cmake to be sure about that.

Anyway Walter mentioned recently that he will be working on 64 bit compiler straight after D2 release, so it is relatively soon. lets hope for the best.

10/14/10 08:41:57 changed by NNemec

  • status changed from new to closed.
  • resolution set to fixed.

-m32 is present in the current version, so this issue seems to be fixed