Compiler relocation with MinGW [Re: r50 mingw32 doesn't work]
David Friedman
dvdfrdmn at users.ess-eff.net
Mon Dec 11 03:20:12 PST 2006
I think I finally figured out this whole MinGW relocation thing...
If you want gdc (or g++) to work correctly, you have to configure with a
prefix that does not get translated by MSYS. One way to do this is to
use a real Win32 path. For example, "configure --prefix=c:/gdc"
This builds a working compiler that can also be relocated to another
directory. However, it is inconvenient for making packages (via "make
install DESTDIR=..."). To build with a prefix that starts with '/', do
the following:
Assuming the prefix you want is "/gdc"...
1. Add the following line to C:/msys/1.0/etc/fstab:
/gdc /gdc
Note that a real /gdc directory need not exist. If it does exist, it
will not be directly accessible after making this change.
2. Quit all MSYS shells.
3. Start a new MSYS shell. Verify that the fstab change as taken affect
by running "cmd //c echo /gdc". The output should be "/gdc".
4. You can now configure and build GCC with --prefix=/gdc. Note that
you cannot simply install with "make install" now (unless you revert the
fstab change.) You have to use "make DESTDIR=/some/other/place install"
David
Tomas Lindquist Olsen wrote:
> Hi folks.
>
> I've been trying to compile GDC in mingw32, and while I managed to
> compile it I can't get it to work properly.
>
> I'm using 0.20-dev revision 50.
>
> ./configure --prefix=c:/gdc --enable-threads=win32
> --enable-languages=c,d --disable-nls --disable-win32-registry
> --disable-shared --disable-bootstrap
> &&
> make all
> &&
> make install
>
> I also tried --prefix=/gdc same problem. And the problem is:
>
> object.d: module object cannot read file 'object.d'
>
> I then try adding /c/gdc/include/d/3.4.2 as include path but then I get:
>
> C:\MinGW\bin\ld.exe: crt2.o: No such file: No such file or directory
>
> The crt2.o file is not anywhere to be found. neither in my build or
> install dirs.
>
> I'm not really sure where to go from here... any help will be much
> appreciated!
>
More information about the D.gnu
mailing list