|
From: Richard Frith-M. <ri...@br...> - 2002-03-12 09:44:24
|
On Friday, March 8, 2002, at 06:31 PM, Earnie Boyd wrote: > Richard Frith-Macdonald wrote: >> >> This is probably a FAQ (though I can't seem to find an answer >> anywhere) ... >> >> What are the rules for path handling in mingw and msys? >> > > Discussed in the literature in the msys\1.0\doc directory. Thanks ... that helped somewhat ... though it would be good to know exactly what circumstances path translation is performed in when running mingw tools It seems that any argument in the format of an msys path is converted to a windows path, but arguments like a '-I/usr/include' are not. To be honest, I can't actually think of a good way to handle this problem. It looks like configure scripts really need to be carefully hacked to make sure that values substituted into makefile templates are things like -Ic:/msys/1.0/include rather than -I/usr/include It would be good if msys included a path translation utility to make that easier (though I've just used sed in a shell script to do it). >> Various tools seem to behave inconsistently, so that (for instance), my >> configure >> script uses the shell to locate the install program and sets a path of >> /usr/bin/install >> for it, but then the make program fails to find it, and various other >> paths that >> scripts set up are not found by other tools. >> > > I've never had a problem with install. What happens is this ... the standard macros in autoconf result in configure scripts using msys tools to locate the install program as '/usr/bin/install' The configure script sets the INSTALL variable in makefiles it generates to '/usr/bin/install' The mingw make program reads the makefile, and attempts to install software using the value of INSTALL, but treats that as current- drive:/usr/bin/install when it actually represents c:/msys/1.0/bin/install ... it therefore can't find the install program and bombs out. The simplest solution is to force the path by setting the INSTALL environment variable, something like ... INSTALL=c:/msys/1.0/bin/install ./configure >> Is there a consistent convention for paths that will work with all the >> tools? >> > > The biggest problem I've had is with symlinks. Yes .. I've had problems there too ... the msys 'ln' command create windows shortcuts, and fools the autoconf macros into thinking that 'ln -s' works. However, when things like the compiler try to access files which have been created by the makefiles using 'ln -s', they fail to follow the shortcuts :-( Perhaps ln could read an environment variable to control whether it uses shortcuts or not, and we could have a short porting guide telling people about these issues. > You most likely need to try `gmake MAKE=gmake' to see if it helps. The > MinGW-1.1 version of make is somewhat deficient however I have used it > for a simple Makefile. Make sure that Cygwin isn't in your path. I really wanted to try to manage without cygwin. Is it actually possible to compile gcc-3.1 under mingw/msys? > Also, > be sure to install the MSYS snapshot. OK. I have been using 1.0.5 ... will upgrade. |