From: Peter J. F. I. <pjf...@ea...> - 2013-11-23 16:54:24
|
> -----Original Message----- > From: Jared Maddox [mailto:abs...@gm...] > Sent: Friday, November 22, 2013 12:06 AM > To: min...@li... > Subject: Re: [Mingw-users] Trying to understand how to use > MinGW/msys to configure and make a GNU package > > I'm making a bit of an assumption in this email, so please excuse me > if I'm wrong. Your assumptions were not wrong (more below). > > Date: Thu, 21 Nov 2013 00:26:51 -0500 > > From: "Peter J. Farley III" <pjf...@ea...> > > Subject: [Mingw-users] Trying to understand how to use > MinGW/msys to > > configure and make a GNU package > > To: <min...@li...> > > Message-ID: <003f01cee67a$48a95aa0$d9fc0fe0$@earthlink.net> > > Content-Type: text/plain; charset="us-ascii" > > <Snipped> > > Just to check: did you also read the "What's the difference between > make and mingw32-make?" and "How do I execute configure scripts?" > questions from here: http://www.mingw.org/wiki/FAQ Why did I miss that page entirely? Sometimes I wonder about myself. Thank you! > > My goal is to be able to take a GNU project -- e.g. gawk 4.1 -- and > > figure out how to run the configure step to create the Makefile(s) > > and then use mingw32-make to build a MinGW executable, not an > > msys executable. > > By MinGW executable, do you perhaps mean "an executable that does > not require MSYS platform components"? I ask, because mingw32-make > is NOT required to do this, ordinary MSYS make should do perfectly well > for MSWindows native applications. Yes, that is what I mean. And thanks for another misconception cleared up. > > I guess I am just not quite getting what GNU facilities are available > > for pure MinGW compiles. Is it only what is contained in the MinGW > > include directory? So, for instance, "stdarg.h" is not available for > > MinGW compiles, only for msys compiles, since "stdarg.h" lives only > > in msys include? > > I'm currently using an old version (haven't had a need to update yet), > but as an example of what you shouldn't expect from the MinGW > environment, but should expect from MSYS: the common *nix "ls" > command. I've maybe used mingw32-make two or three times, so I > can't claim to be speaking from experience, but I suspect that for > MinGW you would need to use the standard MSDOS/MSWindows > "dir" command. > > There are, however, some facilities beyond this that MSYS does > provide. I don't recall what they are, but they basically act as a > POSIX partial-compatibility layer. Targeting these is roughly > equivalent to making your program depend on Cygwin (though more > minimalist), so for ordinary programs it isn't of interest. If it IS > what you want to do, then these are relevant HOWTOs: > (http://www.mingw.org/wiki/HOWTO_Create_an_MSYS_Build_Enviro > nment), (http://www.mingw.org/wiki/HOWTO_Build_MSYS), > (http://www.mingw.org/wiki/HOWTO_Build_an_MSYS_Application). No, I wasn't looking to make executables dependent on MSYS facilities or to run under MSYS, but thanks for the pointers. > > I am obviously missing either multiple concepts or multiple setup > > steps, so let me ask the basic questions: Should I be able to run a > > GNU configure under msys bash and then use mingw32-make to > > build a GNU project as a MinGW executable? If so, is there > > anywhere you can point me to where I can learn *exactly* how to > > do this, step-by-step? > > > > I do understand that at least some (perhaps many?) POSIX facilities > > are intentionally not available in MinGW and never will be, which > > would prevent at least some GNU projects from being build or > > executed without some (perhaps a lot of) coding work to replace > > those facilities with Windows equivalents or other changes to the > > project. I am more than willing to try to do such work, but I need to > > understand how the process should work *if* all needed facilities > > are in fact supported by MinGW. And also how to determine what > > GNU facilities are supported and which are not. > > > > TIA for any and all information, advice and RTFM's you can provide. > > My suspicion is that you read the HOWTOs on how to build the MSYS > environment itself, and got the mistaken impression that it was > intended only to build programs that needed a POSIX-ish environment > to run. If this is incorrect, please correct me. Well, I do understand the difference between building the MSYS environment itself and building programs that use the facilities provided by that environment. I wasn't sure if using the MSYS environment to build programs precluded building programs that don't use the MSYS dll's. > The actual situation is that MinGW consists of the smallest reasonable > set of tools to compile for the Windows platform. MinGW's make will > almost exclusively be used with the shell tools that natively ship > with MSWindows, because MinGW doesn't include POSIX shell tools, > due to not needing them to do it's job. That is a helpful clarification. I believe I understand much more clearly now. > Meanwhile, MSYS (including it's make) is used to compile programs > that need a POSIX-ish environment to COMPILE. This environment is > largely not provided to the resulting programs be default, due to the fact > that it mostly consists of separate executables that you would need to > ship alongside your program. That's also much clearer now that you state it plainly. This is precisely what I want to do. > Programs that need a POSIX-ish environment to RUN need to either > be compiled with the MSYS development code (which is used to develop > programs that run on MSYS, instead of programs that merely compile > on it), compiled for Cygwin + Xming (which is "heavier", but apparently > more complete in terms of POSIX; I think that it uses MinGW + MSYS to > bootstrap, but one of the real guys (Earnie, Eli, etc.) could tell you > better) or UWIN, or compiled for one of the full-enough > POSIX-on-MSWindows implementations (e.g., Interix or any of the > other "POSIX tool sets", + the MSWindows POSIX subsystem). I have worked with Cygwin before while working on another open-source project that used Cygwin to produce executables on Windows platforms, so I do understand what they provide and what the costs are. If I wanted to use that environment (or one of the others you mention) I would not be exploring MinGW as a build platform. > In general, it's best to have a very clear idea of which of these > categories that you really want. I would suggest the "compile on > POSIX" category, and abandoning mingw32-make for this project, as > it's likely to offer the best mix of compile-time features, and run-time > compatibility. Thank you again for your clear and helpful answers. Much appreciated. Peter -- |