D.gnu - Precompiled GDC binary issues
Elliott Darfink <elliott.darfink gmail.com> writes:
Hi! I have been trying to transition from DMD on Windows (32bit) to GDC. At first I tried to compile the GDC sources myself, but with the shallow documentation of the process I had no success. After this I searched and found out about the pre-compiled binaries for GDC (found at github). At first I tried this with a clean install of TDM GCC 4.6.1 (found at sourceforge) combined with an older binary release of GDC, namely 2012-01-09. This worked perfectly, but I noticed this wasn't using the most recent version of DMD (2.057, not 2.060). Therefore I wanted to install the newest GDC version, so I did a new, clean, install of TDM GCC (still 4.6.1) and applied the newest GDC patch (i.e copied the GDC files into the 'MinGW32' directory) just like last time. When I then tried to compile the same example as before I received an error (using 'gdc ./test.d'): "cc1d.exe - System Error The program can't start because libgmp-3.dll is missing from your computer. Try reinstalling the program to fix this problem" I discovered that the missing library file could be found in "\MinGW32\libexec\gcc\mingw32\4.6.1", so I added this directory to $PATH. After executing the same command as before ('gdc ./test.d') I no longer received an error complaining about the missing library file, or at least not the same one: gdc ./test.d gdc: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not found compilation terminated. Just as before, this shared library file was located in the same directory as 'libgmp-3.dll', but since the directory was already in $PATH I did not know what to do. So here I am. I'd greatly appreciate any kind of help that might solve my problem. The only other reference I could find about this error was from this thread. The poster ('bearophile') had the exact same issue and did just like me (added the mentioned directory to $PATH) but ended up with 'liblto-plugin-o.dll' not found. The solution in that thread was using a different release of GDC (which is now rather old, and I would preferably avoid, considering the huge amount of changes to D since then). NOTE: I also tried using the latest TDM GCC version (4.7.1), but that did not help at all (still the same issue) References:  https://bitbucket.org/goshawk/gdc/downloads  http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/  http://www.digitalmars.com/d/archives/digitalmars/D/announce/Release_MinGW_GCC_4.6.1_GDC_1.070_2_.055_21524.html#N21556
Nov 20 2012
Daniel Green <venix1 gmail.com> writes:
Are you using the 64-bit version of TDM? This usually gets installed into c:\MinGW64 but you mention that you copied the files into c:\MinGW32 . The error can also indicate that the DLL is missing exported functions required by the executable. I've encountered the same error when mixing the binaries and DLL files from TDM32 and TDM64 versions. I can also produce the same error by attempting to run GDB from TDM32 with TDM64 DLLs on the path.
Nov 27 2012