MinGW and why Linux users should care
The Minimalist GNU for Windows (MinGW) project is a way to get GCC and tools like binutils working to build software for the Windows environment—something that might not sound very interesting to Linux users or developers. But there are a number of advantages to porting and regularly testing free software on Windows, as Red Hat's Richard Jones and Dan Berrange explain in the following interview. Richard and Dan also describe Red Hat's involvement, how developers can participate, as well as how it all helps the free software cause.
LWN: Could you describe the MinGW project? How did it get started?
Richard: For some time I have been making Windows builds of libvirt available and, frankly, it was a real chore. I needed a Windows virtual machine to do it. But Windows is so frustrating to use and maintain: it doesn't come with any of the tools such as shells or version control that we are used to, and because I was only doing builds once a month or so I'd go back to it and find something had gone wrong that would require maintenance or even reinstallation.
During this time, we didn't routinely build libvirt for Windows. New code would inevitably break something. I had to fix things on Windows, then copy the code back to Linux and check that my fixes didn't break the Linux build, then come up with a patch, and all of this was complicated by the fundamental incompatibility of Windows with the rest of the world -- even simply copying code back and forth is irritatingly difficult when one machine is a Windows machine. (There's no ssh or scp or tar, files get executable bits set or have CRLF line endings, etc.)
At the same time we were getting a strong demand for the rest of our virt tools on Windows. Enough was enough. We decided that the only way to deal with this was to remove Windows from the equation. We wanted to build and test libvirt and the virt tools for Windows routinely (daily or more often), from the Fedora host, using the normal development environment. The way to do this is through cross-compilation (the Fedora MinGW project) and testing under emulation (Wine).
Debian & Ubuntu have been shipping the MinGW cross-compiler for quite a while, but it's important to say that the cross-compiler itself is the easy bit. The hard part about this project are the 50+ libraries and development tools that we ship and maintain alongside. Without those, just having the cross-compiler is fairly useless.
Dan: The libvirt project started a few years ago to provide an API for managing Xen virtualization hosts. Initially it was just a locally accessed C library, but over time the project expanded in scope to allow remote RPC access to the management APIs, and over other virtualization technology like QEMU, KVM, OpenVZ, LXC (native Linux containers) & User-Mode Linux. Shortly after we added support for RPC, a number of community members expressed an interest in using the client side from the Windows platform to manage their Unix hosts. Periodically people would contribute patches to make libvirt build on Windows, but soon after they were applied, new unrelated work would break the Windows build again.
It became clear that if the libvirt community was to officially support building a Windows client, then all developers needed to be able to easily test builds for Windows. The obvious stumbling block here is that most of our community developers do not use or even own Windows machines for testing. The MinGW project provides a cross compiler toolchain and stubs for the Win32 APIs to allow building of Windows executables and DLLs from a Linux host. Add in WINE and you can also run your cross-compiled build. MinGW and WINE are completely open source, so we can provide a very good level of support without ever having to purchase a Windows license or leave our primary Linux development environment.
We are not the first people to see the value in MinGW for supporting Windows platforms in open source software. Prior to the the start of the Fedora MinGW effort, Fedora developers would have to build all the cross compilers & libraries themselves. This is not particularly hard, but it is a lot of wasted effort to have everyone duplicating the work. Providing the MinGW compiler toolchain, and important libraries such as libxml, gnutls, libpng, libjpeg, GLib, GTK, etc directly in the Fedora repositories enables developers to focus on their own code, rather than the cross-compilers.
LWN: What is Red Hat's involvement in MinGW?
Richard: Dan and I work for a Red Hat group responsible for fostering the development of new tools and technologies. We have an eye to productisation and I spend quite a lot of time going to customer conferences and asking them what they want to see, but as for whether MinGW will make it into some future supported Red Hat product I cannot say.
Dan: Red Hat initiated development on the libvirt project and supports its ongoing evolution with significant developer resources. Red Hat wants the libvirt project to be the de facto standard for managing virtualization hosts, and the project community members want Windows to be a supported client platform. The work we are doing on the MinGW project in Fedora is thus a response to demand from the libvirt community for better Windows support in our releases. It is just a small part of our day job, alongside major libvirt feature development for Linux systems and in particular KVM & Xen.
LWN: Why does Red Hat care? Are you going into the Windows software business now?
Richard: Red Hat certainly cares about libvirt, and making libvirt available on the widest range of platforms. The alternatives to libvirt are interfaces like XenAPI and VMWare's APIs, which lock customers into proprietary technologies. Any way we can make it easier to provide open APIs and open source software even on closed platforms like Windows is a win for Red Hat, the Linux community, and even for Windows users.
Dan: As Richard says, this effort isn't about any particular Red Hat product. It is a community focused effort to address demand from libvirt users for better Windows client support. People are interested in open source virtualization technology like Xen and KVM, as an alternative to closed source solutions. Open source exists in a heterogeneous world though, and even if someone decides to migrate their servers to virtual machines on a Linux KVM host, they may still need to manage these servers from a Windows desktop. The MinGW project helps us maintain a reliable client build for the Windows platform, and thus lets a broader spectrum of users take advantage of open source virtualization technology. Growing the size of the libvirt community, and encouraging use of virtualization is what is important to Red Hat, and the MinGW project is one small part of that effort.
LWN: Why should free software developers care about MinGW? Does it do anything for them?
Richard: There's been some opposition, along the lines of "why are we helping Windows?". IMHO people who say that are ignoring both history and reality. First the history bit: the GNU project started off as a set of better compilers and command-line tools for the proprietary Unix systems of the day. I remember before Linux was around that you'd get some horrible system like HP-UX or (in my case) OS-9, and the first thing you would do would be to install all the GNU tools. Without real GNU grep, make, awk, bash, those systems were less than useful. Eventually when GNU got a kernel (Linux) we moved over to that system because it came with all the good tools.
Second the reality bit: Windows users are locked into proprietary applications and file formats, everything from Photoshop to QuickBooks to MSN to Illustrator. No Windows user can switch without first switching all their applications, which is going to be a very long transition process. Therefore we need a way to enable the developers of Gimp, GnuCash, Pidgin, Inkscape (to pick four out of hundreds) to easily build and test their software for Windows, so they can ship their software for Windows, respond easily to bug reports, and break that proprietary lock-in. Fedora MinGW does this - in fact we already used our compiler and huge chain of libraries to port Inkscape. [PULL QUOTE: Another thing we've found in porting to other platforms, is that it can generally improve the quality of the codebase. Different compilers and runtime environments expose different bugs in an application. The more combinations you can regularly build & test on, the better the overall quality of your code. END QUOTE]
Dan: The libvirt project started off with a strong Linux focus due to our immediate needs for a management API for Xen in Fedora and later RHEL-5. Over time the community has contributed patches to improve our portability to non-Linux platforms, in particular Solaris and more recently Windows. While Red Hat's focus is on Linux, enabling portability to other platforms is important because it grows the size of your developer community. Every significant open source project has a huge wishlist of features and nowhere near enough developers and testers to address them all. Cross-platform portability enlarges the pool of potential contributors. They may initially only send minor patches to fix portability bugs for Windows, but over time they can end up working on major new features that benefit every platform.
Another thing we've found in porting to other platforms, is that it can generally improve the quality of the codebase. Different compilers and runtime environments expose different bugs in an application. The more combinations you can regularly build & test on, the better the overall quality of your code.
LWN: Is there anything in particular that developers should keep in mind to make life easier for people building their code for MinGW?
Richard: My pet list would be:
-
Don't write your own build system. Use autoconf/automake/libtool
or cmake. That's not to say I'm a great fan of autoconf, but
these really do make cross-compilation almost trivial.
Autoconf-based programs can generally be cross-compiled by doing:
yum install mingw32-* ./configure --host=i686-pc-mingw32 make
- Don't try to run executables during the build phase. It doesn't work when you're cross-compiling.
- Do use pkg-config. And if you can't use pkg-config, then make sure your *-config program is a shell script, not a binary.
- Do use common, portable libraries such as glib, gtk, libvirt or any of our other libraries.
- Please use Fedora MinGW to routinely cross-compile your own code for Windows.
Dan: I have been pleasantly surprised at just how easy it has been to build many open source libraries with MinGW. Despite almost universal dislike for autotools, the applications which use autotools have been some of the easiest to port, particularly when it comes to building DLLs. The apps with home-brewed build systems have been much more involved. I definitely echo Richard's suggestion to stick to a broadly supported build system like autotools or cmake.
Any project which is serious about enabling support for Windows in their releases should make sure they are running regular automated builds & tests of their codebase. This is actually just good sense for any software engineering project regardless of whether Windows support is desired - it just happens to be particularly useful for configurations that developers rarely test on a day-to-day basis to avoid otherwise unnoticed regressions.
If you are not using a support library like GLib, QT or NSPR (which provides a degree of cross-platform portability) then seriously consider making use of Gnulib. This is a library of code which you can drop into an application, fixing POSIX API portability problems on various platforms. As an example, it replaces Winsock's socket() call so it returns real file descriptors that you can use in both read() and recvfrom(). It can't fix all problems - such as the lack of fork()/exec() on Windows - but if your application / library is written against POSIX, using Gnulib will significantly improve your portability across all Linux, UNIX and Windows platforms.
LWN: What are the biggest challenges that your project faces now? How can the community help?
Richard: Scaling the project is a big challenge. Red Hat dedicates quite limited resources to this project. The only way we can scale it is if the application developers themselves start to use our tools to build and maintain their own programs. I would like to see everyone who has an important Linux app or library start building and shipping for Windows routinely. Bringing open APIs, apps and file formats to Windows users is important: It's important to Windows users because it breaks their lock-in and makes switching to a fully free platform easier down the road. It's important for you, because your potential audience of users will increase by a factor of 10x or 20x.
Dan: Spreading the package maintenance job across a larger number of Fedora members is an important task. There is a limit to how many packages a single person can do a good job at maintaining. To make it manageable we track & pull patches from the native builds to the MinGW cross-compiled builds of common packages. Ultimately we still need more package maintainers to look after the cross-compiled builds.
There are some core pieces of the open source ecosystem which do not work / are not fully portable to a Win32 environment. The most obvious one being DBus, which is used by an ever increasing number of apps for local RPC. There have been a number of efforts to port DBus, but none ever completely finished & merged into the official releases.
LWN: Anything else you'd like to say to LWN readers?
Richard: Get involved.
Dan: Cross platform portability is often beneficial to your project even if you personally only care about its use in Linux. In the libvirt case it is opening up use of libvirt & virtualization to a set of users who have only ever had access to closed source virtualization technology. Portability broadens the pool of potential contributors to your project. Open source developers on the various BSDs, OpenSolaris, and Windows all have the potential to make valuable contributions to your project.
[ We would like to thank Richard and Dan for taking time to answer our
questions. ]
Posted Nov 19, 2008 15:13 UTC (Wed)
by cde (guest, #46554)
[Link] (10 responses)
See for example VideoLAN, http://milw0rm.com/exploits/7051 which has none of these flags above and is trivially exploitable.
Posted Nov 19, 2008 15:13 UTC (Wed)
by cde (guest, #46554)
[Link]
Posted Nov 19, 2008 15:37 UTC (Wed)
by jreiser (subscriber, #11027)
[Link]
Posted Nov 19, 2008 15:38 UTC (Wed)
by mjthayer (guest, #39183)
[Link] (2 responses)
Posted Nov 19, 2008 17:46 UTC (Wed)
by jdahlin (subscriber, #14990)
[Link] (1 responses)
Posted Nov 19, 2008 18:59 UTC (Wed)
by mjthayer (guest, #39183)
[Link]
Posted Nov 19, 2008 17:00 UTC (Wed)
by rwmj (subscriber, #5474)
[Link]
Longer term, we want to add / fix all of these features in GCC and the toolchain, stack protection, NX, address space randomization, etc.
Using Visual Studio isn't an option for Fedora because of its non-free status, no matter how good the security features may be.
(I am "Richard" in the article).
Posted Nov 19, 2008 17:45 UTC (Wed)
by tialaramex (subscriber, #21167)
[Link] (1 responses)
IIRC at least the NX compatibility and address randomisation are flags. If Microsoft are going to get praise for the improved backwards compatibility, they deserve all the blame for applications that don't get the benefits.
Providing suitable linker flags for MinGW that produce suitably flagged PE executables (perhaps by default) would be nice, but it shouldn't be difficult to do it by hand meanwhile.
Posted Nov 20, 2008 13:09 UTC (Thu)
by PaXTeam (guest, #24616)
[Link]
Posted Nov 19, 2008 22:32 UTC (Wed)
by danpb (subscriber, #4831)
[Link]
Posted Nov 23, 2008 0:04 UTC (Sun)
by qu1j0t3 (guest, #25786)
[Link]
Posted Nov 19, 2008 17:04 UTC (Wed)
by rwmj (subscriber, #5474)
[Link] (1 responses)
This project is a Windows cross-compiler that runs on Fedora. You don't need Windows to use it.
Posted Nov 19, 2008 17:09 UTC (Wed)
by jake (editor, #205)
[Link]
As much as I'd like to blame Jon :), that was my intro paragraph which does, indeed, not make it very clear. Thanks for pointing it out.
jake
Posted Nov 19, 2008 20:21 UTC (Wed)
by ikm (guest, #493)
[Link]
Posted Nov 19, 2008 20:34 UTC (Wed)
by fuhchee (guest, #40059)
[Link] (15 responses)
Posted Nov 19, 2008 21:03 UTC (Wed)
by dlang (guest, #313)
[Link] (12 responses)
this is why most apps bother with a windows port in the first place instead of just telling people to use the *nix version under cygwin (many apps have tried this initially, but the preasure doesn't let up)
Posted Nov 19, 2008 21:14 UTC (Wed)
by zeekec (subscriber, #2414)
[Link] (2 responses)
Posted Nov 19, 2008 21:19 UTC (Wed)
by khim (subscriber, #9252)
[Link] (1 responses)
Cygwin can create native Window executables that don't use the
compatibility layer. Nope. There are no way. I believe that it actually uses MinGW. Yes, you can run MinGW under Cygwin as well and so it's possible to
create native execulables this way. But... what's the point? You can run
MinGW under Linux directly without WINE/Cygwin overhead!
Posted Nov 20, 2008 18:02 UTC (Thu)
by zooko (guest, #2589)
[Link]
Here is a HOWTO on how to use it, written in 1999:
http://www.delorie.com/howto/cygwin/mno-cygwin-howto.html
Posted Nov 19, 2008 21:25 UTC (Wed)
by jengelh (guest, #33263)
[Link] (8 responses)
All you need is cygwin1.dll and whatever other DLLs programs (including the Windows native ones) normally want to use.
Posted Nov 19, 2008 22:40 UTC (Wed)
by rwmj (subscriber, #5474)
[Link] (7 responses)
And it does a whole layer of Unix emulation, whereas this is a direct port to the Win32 API.
Posted Nov 20, 2008 2:50 UTC (Thu)
by dwheeler (guest, #1216)
[Link] (6 responses)
BUT Cygwin's license is special: you can use ANY open source software license, without charge, with Cygwin. You can also use Cygwin to run closed source software, but you have to pay extra for that privilege. The Cygwin license, which is the GPL plus some exceptions, is at: http://www.cygwin.com/licensing.html.
The Cygwin license says: "Red Hat permits programs whose sources are distributed under a license that complies with the Open Source Definition [See http://www.opensource.org/docs/osd/ for the precise Open Source Definition and a list of the licenses certified by OSI as conforming to that definition] to be linked with libcygwin.a/cygwin1.dll without libcygwin.a/cygwin1.dll itself causing the resulting program to be covered by the GNU GPL.
This means that you can port an Open Source application to Cygwin (TM), and distribute that executable as if it didn't include a copy of libcygwin.a/cygwin1.dll linked into it... Red Hat sells a special Cygwin (TM) License for customers who are unable to provide their application in open source code form."
Posted Nov 20, 2008 8:07 UTC (Thu)
by rwmj (subscriber, #5474)
[Link] (3 responses)
Posted Nov 20, 2008 12:21 UTC (Thu)
by fuhchee (guest, #40059)
[Link] (2 responses)
Since you consider licensing-based incentives to create free software as discrimination, what prevented you from (say) releasing libvirt into the public domain?
Posted Nov 20, 2008 12:35 UTC (Thu)
by rwmj (subscriber, #5474)
[Link]
As a free software developer yourself, you should know the difference between public domain, LGPL
Posted Nov 20, 2008 12:36 UTC (Thu)
by nix (subscriber, #2304)
[Link]
This is a classic example of a library that is better LGPLed than GPLed.
Posted Nov 21, 2008 17:39 UTC (Fri)
by giraffedata (guest, #1954)
[Link] (1 responses)
This wording shows a typical misunderstanding of copyright, wherein someone thinks a copyright license is something that restricts you in distributing software.
If the resulting program is not covered by GPL, nobody has Red Hat's permission to distribute it at all. (We assume of course that it's a derivative work so that Red Hat has copyright, because otherwise nobody needs Red Hat's permission and the whole point is moot).
I believe what the license means to say is, "... without Red Hat asserting any copyright over the resulting program due to libcygwin.a/cygwin1.dll itself."
Posted Nov 23, 2008 0:16 UTC (Sun)
by vonbrand (subscriber, #4458)
[Link]
The Red Hat people must have done their assignment before distributing the library under this license... and they are careful with legal stuff.
In any case, it is not the license which restricts distribution, it is copyright law. All the license does is allow you to do stuff the law forbids.
Posted Nov 19, 2008 21:46 UTC (Wed)
by zooko (guest, #2589)
[Link]
Personally, I've never yet had a need to learn how to install and use the mingw toolset, since the cygwin toolset that I happened to learn first already does everything I need, including producing GPL-free, Win32 executables.
Posted Nov 19, 2008 23:00 UTC (Wed)
by danpb (subscriber, #4831)
[Link]
Having made that decision, we want the same licensing terms to be applicable across all platforms, whether Linux or Windows - we don't wish to penalize Windows users over Linux users. As such the Windows binaries we provide must be LGPLv2+ licensed in line with Linux binaries we ship, and we also wanted to build the binaries from a Linux host machine. While we could have used WINE + Cygwin, we decided that MinGW suited our needs. We've nothing against Cygwin - both MinGW & Cygwin are great open source projects and we're happy to see them both thrive & co-exist. In the same way that we choose to use GTK rather than QT for some apps, does not mean we have anything against QT, it is just a choice to be made. The important thing is that the choice is for a completely open source toolchain & build host OS (Mingw or Cygwin on Linux), over closed source development platform (VisualStudio on Windows).
Posted Nov 19, 2008 20:35 UTC (Wed)
by fuhchee (guest, #40059)
[Link] (7 responses)
Posted Nov 19, 2008 22:40 UTC (Wed)
by rwmj (subscriber, #5474)
[Link] (6 responses)
Posted Nov 19, 2008 22:57 UTC (Wed)
by fuhchee (guest, #40059)
[Link] (5 responses)
Richard: There's been some opposition, along the lines of "why are we helping Windows?". [...]
But that's a redirection that is not responsive to the question. That really just argues that we need not care about whether this helps windows or not.
I read this as claiming that the code's portability is improved when, er, it is ported. OK, but again what does that do for linux users?
Or maybe I just missed a material argument somewhere else in the interview. Please help me by pointing it out.
Posted Nov 19, 2008 23:10 UTC (Wed)
by rwmj (subscriber, #5474)
[Link] (2 responses)
Maybe you could read more of the article. For example:
Anything which increases the user and developer base, and brings in future Linux users, is good for
Linux users and developers now. If you're a Linux developer forced to write software for Windows
it's good too because you don't need to leave the Linux environment to use this cross-
compiler.
Posted Nov 20, 2008 0:03 UTC (Thu)
by proski (subscriber, #104)
[Link]
As for general purpose applications (e.g. DVD burners, file managers etc), Windows users would probably only drain time of the developers without contributing back ideas and fixes. That could slow down or even halt the development, thus inconveniencing the existing users.
Posted Nov 20, 2008 14:09 UTC (Thu)
by chsnyder (guest, #52714)
[Link]
It means that when a Windows user tries Linux, she can appreciate the performance and usability improvements without having to re-learn how to use her applications. It means that when you leave your Windows computer at work, and fire up your Linux laptop at home, you can use the same apps, the same documents, and even the same preferences.
To put it another way, anything that makes it easier to write portable code makes it more likely to be developed first in Linux, and then ported to other OSes. That is extremely good news for Linux users.
Posted Nov 19, 2008 23:22 UTC (Wed)
by danpb (subscriber, #4831)
[Link] (1 responses)
The primary scenario faced is people evaluating whether to deploy a Xen/KVM Linux virtualization host vs a VMWare / Microsoft Hyper-V virtualization host. A common requirement is to be able to manage the virtualization host from a non-Linux client machine, Windows being very common, OS-X to a lesser extent. If a libvirt client were not available for Windows, then VMWare or Hyper-V would be chosen pretty much by default, instead of Linux. So providing Windows client binaries helps Linux adoption, which long terms helps all Linux & open source users. As a developer though I do not wish to use Windows myself, so using a cross-compiler like MinGW allows provision of Windows client binaries to help adoption of Linux virtualization, without requiring actual use of Windows on the part of the developer.
As a second scenario, there are developers who use Windows, but who value open source & wish to contribute to the project. By enabling use of libvirt (& other related apps & libraries) on Windows, it enables a larger pool of developers to become contributors to the project, beyond just Linux based developers. These developers will contribute new features, some of which help all users regardless of their host OS.
Addressing the last point raised, portability helps Linux users by identifying code which relies on undefined behaviour which "just happens" to currently work on Linux. As an example, printf() and the %s format specifier will happily accept NULL with GLibC, printing out '(null)'. This isn't true of other OS' implementation of printf(), so porting to Windows can identify this problem & result in a fix to the main codebase. It then turns out that even on Linux, passing a NULL to printf can cause crashes with certain optimizations the compiler may make - eg converting printf("%s", foo) to puts(foo). So, a porting to Windows identified & helped fix a problem which was lieing dormant during most use on Linux, but could ultimately still affect Linux. This is a little contrived, but the general point is to identify code which relies on undefined behaviour and only works on Linux by luck rather than design.
Posted Nov 20, 2008 0:19 UTC (Thu)
by fuhchee (guest, #40059)
[Link]
Cross-compiling per se will do very little to help with that. You'd actually have to test running the code on your targets, at which point you might as well run a native toolchain so as to get even more diversity.
Posted Nov 19, 2008 20:40 UTC (Wed)
by nix (subscriber, #2304)
[Link] (4 responses)
(OS-9? You poor sod. Even HP-UX 6 was better than that, IIRC, although
autoconf makes cross-compilation trivial? Sure, but, as you said, this is
It's certainly easier to cross-compile an autoconfiscated project than a
(Do people really have binary *-config scripts? Who? I mean, even
I second the mention of gnulib: it's wonderful and maintained by a
Posted Nov 19, 2008 23:15 UTC (Wed)
by rwmj (subscriber, #5474)
[Link] (3 responses)
Did I mention I'm no fan of autoconf ..?
Posted Nov 20, 2008 0:38 UTC (Thu)
by nix (subscriber, #2304)
[Link] (2 responses)
Posted Nov 20, 2008 12:21 UTC (Thu)
by aleXXX (subscriber, #2742)
[Link] (1 responses)
Since CMake 2.4.1 I think lower case commands are supported, and since
Beside that, I can recommend the same: don't try to run executables
Alex
Posted Nov 20, 2008 12:39 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Nov 20, 2008 7:31 UTC (Thu)
by ncm (guest, #165)
[Link] (8 responses)
Posted Nov 20, 2008 7:54 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Nov 20, 2008 8:04 UTC (Thu)
by rwmj (subscriber, #5474)
[Link] (5 responses)
The Fedora MinGW project is a cross-compiler that creates Windows executables. If you want
But you could also (and we'd recommend) use some portability library like glib or NSPR which deals
Posted Nov 20, 2008 12:23 UTC (Thu)
by aleXXX (subscriber, #2742)
[Link] (4 responses)
Doesn't Boost also have some file/threading classes in the meantime ?
Alex
Posted Nov 20, 2008 13:46 UTC (Thu)
by rwmj (subscriber, #5474)
[Link] (3 responses)
I packaged boost. Boost is a classic example of an upstream package where they've gone off and written their own build system, so they have to maintain all the complexity of building on every system out there, and I had to add to that complexity for cross-compiling. I also did another C++ network environment called POCO, and they also wrote their own build system, completely different from the boost one obviously. C++ programmers, eh - haven't they suffered enough already?
While we're on the subject of portability libraries, APR (Apache Portable Runtime) is another contender. Rich.
Posted Nov 20, 2008 22:50 UTC (Thu)
by nix (subscriber, #2304)
[Link] (2 responses)
Posted Nov 21, 2008 8:50 UTC (Fri)
by aleXXX (subscriber, #2742)
[Link] (1 responses)
Alex
Posted Nov 22, 2008 12:34 UTC (Sat)
by nix (subscriber, #2304)
[Link]
Posted Nov 20, 2008 9:52 UTC (Thu)
by danpb (subscriber, #4831)
[Link]
If you want a Windows based runtime environment that strives to completely simulate POSIX APIs, then Cygwin is likely a more suitable choice. If you are happy to work against the Win32 APIs more directly, then GNULib provides wrappers around a number of Win32 APIs to give you a degree of POSIX compatability often good enough for many apps. Finally there are higher level APIs like GLib, QT, NSPR which attempt to provide a platform agnostic APIs.
Posted Nov 20, 2008 12:25 UTC (Thu)
by hanwen (subscriber, #4329)
[Link] (2 responses)
Posted Nov 21, 2008 23:44 UTC (Fri)
by rwmj (subscriber, #5474)
[Link]
Posted Nov 23, 2008 0:06 UTC (Sun)
by qu1j0t3 (guest, #25786)
[Link]
Posted Nov 21, 2008 0:24 UTC (Fri)
by brouhaha (subscriber, #1698)
[Link] (2 responses)
The IMCROSS project is an attempt to solve these problems in a distribution-neutral way, and helped a lot, but I'm more excited about seeing MingW become a part of Fedora, with proper RPM packages. Now that the Fedora MingW SIG is making these packages available for Fedora 10, I am even more eager to upgrade to Fedora 10, though I might spend a bit of time finding out whether those SRPMs build and work on Fedora 9. Thanks, guys!
Posted Nov 21, 2008 19:00 UTC (Fri)
by danpb (subscriber, #4831)
[Link] (1 responses)
Posted Nov 21, 2008 23:43 UTC (Fri)
by rwmj (subscriber, #5474)
[Link]
I'm actually gonna go one better than Dan and say that I built quite a lot of the mingw32-*
packages on Fedora 8. The
ones we are building now are all done against Fedora 10 and some of them no longer just
install on Fedora 8, in particular I know the C++ ones don't because some fundamental C++
library has changed its soname.
The "official" line is we are supporting RHEL 5 (through EPEL) and Fedora ≥ 10.
Anything else that works is luck, or you will have to join the project and
help support it yourself.
Rich.
Posted Nov 22, 2008 3:57 UTC (Sat)
by k8to (guest, #15413)
[Link] (5 responses)
Sure the theory is that making these tools available to windows users will enable them to transition away from proprietary tools, but I don't buy it. I switched from windows to Linux in 1996 with no pain at all. If what Linux offers was compelling to most people, they would have already transitioned. I don't see any benefit to those who care about free software, because they're already off windows. I don't see any benefit to linux users in making linux desktop apps run on windows. The basic tools already work after a fashion in cygwin, and have for a long time.
I'm certainly not upset with these developers for working on this project, but I don't really see a benefit to me, the Linux user.
Posted Nov 22, 2008 8:25 UTC (Sat)
by bockman (guest, #3650)
[Link] (4 responses)
1. Porting applications to Windows makes for a larger user base
2. A larger user base makes open source developers happier (as long as windows users
3. An happier open-source developer makes better open-source software
4. Better open-source software makes linux user happier
Posted Nov 23, 2008 19:23 UTC (Sun)
by k8to (guest, #15413)
[Link] (3 responses)
My expectation as a Linux user is that programs that are available on Windows as well will cater primarily to Windows users (the larger potential market), and will become less usable.
Posted Nov 24, 2008 9:52 UTC (Mon)
by rwmj (subscriber, #5474)
[Link]
But that's your choice if you are the developer of a program. You could look at it another way
and say by keeping up your standards you are bringing better UI concepts / timezone handling /
whatever to Windows users.
Anyway there is nothing in the Fedora MinGW work which prevents you from #ifdef'ing pieces of
code, or even removing troublesome features from the Windows port entirely.
Posted Nov 24, 2008 11:33 UTC (Mon)
by Cato (guest, #7643)
[Link] (1 responses)
The sheer volume of users on Windows can be beneficial for OSS software, by stimulating bug fixes and features, as well as providing people to support the software.
As a co-developer of TWiki (before the recent fork by most of the developers, i.e. http://foswiki.org/ ), I supported it on Windows for a few years, and used it myself on Windows for a time when I didn't have a Linux server available. This helped Linux users, e.g. I18N hacks that I did to work around Windows Perl's (very broken) locale support also worked for Linux platforms with broken locales, Perl 5.005 hosting users where I18N regexes were more basic, etc.
Where Windows is somewhat broken but you still have ported the app, you can also deliver a Linux virtual machine using VMware, which is what the TWiki team did as well - this ends up being a good advert for Linux as well.
Doing cross-platform code always risks introduction of bugs, so wherever possible it's best to use a third party portability library, or a portable language such as Perl, Python, etc.
Posted Dec 1, 2008 5:35 UTC (Mon)
by k8to (guest, #15413)
[Link]
MinGW and why Linux users should care
MinGW and why Linux users should care
How does /GS differ from gcc -fstack-protector , and what about the -fpie option compared to /DYNAMICBASE+/FIXED:no ?
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
(OT) Visual C++ 2008 Express Edition runs well under WINE
Windows cross-compiler
Windows cross-compiler
MinGW and why Linux users should care
For completeness, the article might have mentioned cygwin, which could have been a fine POSIX layer for running libvirt etc. on windows. It was apparently not selected because its GPL license conflicts with the stated desire to aid proprietary software vendors in using libvirt.
Cygwin
Cygwin
Cygwin
Cygwin can not do this!
Cygwin can do this!
Cygwin
Cygwin
First of all, the LGPL is typically compatible with the GPL, depending on their versions. See my FLOSS License Slide for more information on license compatibility.
LGPL is compatible with Cygwin's license (GPL+exceptions)
LGPL is NOT compatible with Cygwin's license (GPL+exceptions)
applications. They don't want to open source their code, nor do we want to discriminate against
them by making them by a special license. They don't need to buy a special license for libvirt on
Linux, nor to use proprietary APIs such as VMWare API / XenAPI.
LGPL is NOT compatible with Cygwin's license (GPL+exceptions)
nor do we want to discriminate against
them by making them buy a special license
LGPL is NOT compatible with Cygwin's license (GPL+exceptions)
and GPL.
LGPL is NOT compatible with Cygwin's license (GPL+exceptions)
LGPL is compatible with Cygwin's license (GPL+exceptions)
Red Hat permits [open source programs] to be linked with libcygwin.a/cygwin1.dll without libcygwin.a/cygwin1.dll itself causing the resulting program to be covered by the GNU GPL.
LGPL is compatible with Cygwin's license (GPL+exceptions)
Cygwin
Cygwin
why Linux users should care
why Linux users should care
I did read it. The closest thing seems to be this tidbit:
why Linux users should care
Why should free software developers care about MinGW? Does it do anything for them?
Dan: The libvirt project started off with a strong Linux focus due to our immediate needs for a management API for Xen in Fedora and later RHEL-5. Over time the community has contributed patches to improve our portability to non-Linux platforms, [...]
why Linux users should care
Bringing open APIs, apps and file formats to Windows users is important: It's important to Windows
users because it breaks their lock-in and makes switching to a fully free platform easier down the
road. It's important for [Linux developers], because your potential audience of users will increase by
a factor of 10x or 20x.
I can imagine it would work for specialized (e.g. scientific) applications, where potential users are experts in the problem area and can express their ideas in writing in a concise way.
why Linux users should care
why Linux users should care
why Linux users should care
why Linux users should care
This is a little contrived, but the general point is to identify code which relies on undefined behaviour and only works on Linux by luck rather than design.
MinGW and why Linux users should care
that's not saying much.)
only true *if* you don't use AC_TRY_RUN and friends, or otherwise need
accurate runtime tests, and a *lot* of programs fall into one category or
the other. If you do, you're screwed (or you have to do them *really* at
runtime rather than at configure time, which is not always practical).
non-autoconfiscated project, but not necessarily all that much easier. As
ever, it really depends on whether the project has been written with an
eye to portability...
guile-config is a script. A Guile script, but still.)
cross-section of fine portability wizards, largely as an offshoot of
maintaining other GNU software... but it has no official releases or
(naturally) stable API, the churn rate is quite high, and if you're not
using autoconf, you might as well give up hope of using it without
significant pain. (Also, quite a lot of it is GPLv3ed, but the gnulib
maintainers are often amenable to requests to loosen the license to v2+ or
LGPL.)
MinGW and why Linux users should care
To be fair though, only 2 out of 50+ of the libraries we ported actually used it.
MinGW and why Linux users should care
it's still CAPITAL LETTER HAPPY. Reading the cmake documentation or cmake
examples is almost physically painful. You'd think they hadn't realised
that lowercase letters are easier to read.
MinGW and why Linux users should care
http://www.cmake.org/cmake/help/cmake2.6docs.html#section...
2.6.0 using all-lowercase is recommended.
during the configure-step, in general this doesn't work for cross
compiling. If cmake recognizes that a cross-compiled executable should be
executed, it doesn't execute it, prints a warning, and writes a file for
setting the result-variables, with hopefully enough comments so this
becomes doable for the developer. Also the cross compiled executables are
kept so the developer can take them, execute them on the target platform
and enter the results manually in that file. That file can then be fed
into cmake using the -C argument.
MinGW and why Linux users should care
select
select
select(), and recent gnulib does so.
select
select-like ability, you could use some Win32 API for that such as - as nix says -
WaitForMultipleObjects.
with the matter in another way and has already been ported to whatever Win32 APIs exist (on
Windows) or whatever Linux/POSIX APIs exist on Linux/Unix.
select
Also signals..
select
select
changing CFLAGS and the preferred installation prefix was hell, and then I
had to figure out why jam coredumped as soon as it started... Autoconf
may be nasty but it's a lot kinder to packagers/builders than bloody jam.
While KDE was searching for a new build system for KDE4 I was in terror
that they'd choose Boost.Jam because it was used for a successful C++
project. Thankfully they are not utterly insane and chose something nicer
(now with added lowercase! ;)))) )
select
Boost repository a few weeks ago.
select
select
MinGW rocks!
Of course we're huge fans of lilypond. Does it build with the Fedora MinGW project? If you'd like help, let me
know.
MinGW rocks!
Indeed it rocks, not having to boot sucky XP!
(plugins here)
I build all my Free/GPL Photoshop plugins with MinGW!!
I've been using MingW on Fedora for several years to build Windows versions of several of my programs. It's great when it works, but I've found it difficult to build working versions of the compiler, tools, libraries, etc. for various Fedora releases. Some combinations work well, and some fail to build for non-obvious reasons. Lately I've been doing the cross-development in a virtual machine running Fedora 7, because I wasn't able to get MingW to work properly on Fedora 8 or 9.
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
don't whine too much ... but then at least windows users don't flame much )
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care
MinGW and why Linux users should care