|
From: Earnie B. <ear...@ya...> - 2002-03-12 12:04:46
|
Richard Frith-Macdonald wrote: > > 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. > Works for me. Note, you must use the MSYS shell and not the COMMAND.COM/CMD.EXE shell for -I/usr/include to be translated as GCC and friends aren't a part of MSYS but are a native version using MSVCRT.DLL. > 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 > Uh, MSYS does change the /usr/include to c:/msys/1.0/include. I just checked. > 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). > That's MSYS's job, if it's not happening then it's broken. BTW, are your include files in /usr/include or in /mingw/include? By default there isn't a /usr/include or a /usr/lib. > >> 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' > Again, this should be handled by MSYS. > The mingw make program reads the makefile, and attempts to install > software This may be the problem. Try instead `gmake MAKE=gmake install'. In the next version typing make will get you the MSYS version of make while typing make.exe will get you the mingw version of make from the MSYS shell. I wasn't positive which make should be used when I first conceptualized MSYS so I named the MSYS version of make `gmake' so that you could have a choice. You can accomplish this now by doing `cp /bin/gmake.exe /bin/make'. > 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 :-( > I'm working out strategies for this problem. Currently, I'm under the impression that if I get rid of ln.exe that should suffice as configure will then use cp instead. The other workaround would be to modify the symlink code in MSYS to do the copy. > 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. > That won't help. > > 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? > I've built gcc-2.95.3 with mingw and msys, so yes it should be possible to build gcc-3.1. Earnie. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |