|
|
Subscribe / Log in / New account

why Linux users should care

why Linux users should care

Posted Nov 19, 2008 23:22 UTC (Wed) by danpb (subscriber, #4831)
In reply to: why Linux users should care by fuhchee
Parent article: MinGW and why Linux users should care

First, the title of the article would probably be better phrased as 'why open source users should care' rather than 'why Linux users should care'. I happen to use Linux for everything I do, but furthering open source software is my primary motivation.

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.


to post comments

why Linux users should care

Posted Nov 20, 2008 0:19 UTC (Thu) by fuhchee (guest, #40059) [Link]

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.

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.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds