Development
FatELF: universal binaries for Linux
One interesting feature of Mac OS X is the concept of a Universal Binary, a single binary file that runs natively on both PowerPC and Intel platforms. Professional game porter Ryan Gordon got sick of Mac developers pointing out that Linux doesn't have anything like that, so he did something about it and wrote FatELF. FatELF brings the idea of single binaries supporting multiple architectures to Linux.
Universal binaries in Mac OS X
Apple introduced the Universal Binary file format in 2005 to ease the transition of the Mac platform from the PowerPC architecture to the Intel architecture. The solution was to include both PowerPC and x86 versions of an application in one "fat binary". If a universal binary is run by Mac OS X, the operating system executes the appropriate section depending on the architecture in use. The big advantage was that Mac developers could distribute one executable of their software, so that end-users wouldn't have to worry about which version to download. Later, Apple went even further and allowed four-architecture binaries: 32 and 64 bit for both Intel and PowerPC.
This was not the first time Apple performed such a trick: in 1994 the company transitioned from Motorola 68k processors to PowerPC and introduced a "fat binary" which included executable code for both platforms. Moreover, NeXTSTEP, the predecessor of Mac OS X, had a fat binary file format (called "Multi-Architecture Binaries") which supported Motorola 68k, Intel x86, Sun SPARC, and HP PA-RISC. So Apple knew what needed to be done when they chose Intel as their new Mac platform. In fact, the Universal Binary format in Mac OS X is essentially the same as NeXTSTEP's Multi-Architecture Binaries. This was possible because Apple uses NeXTSTEP's Mach-O as the native object file format in Mac OS X.
A fat elf for Linux
Ryan Gordon is a well-known game porter: he has created ports of commercial games and other software to Linux and Mac OS X. Notable examples of his work are the Linux ports of the Unreal Tournament series, some of the Serious Sam Series, the Postal Series, Devastation and Prey, but also non-gaming software such as Google Earth and Second Life. With this experience, he knows a lot of both Mac OS X and Linux, so Ryan is well suited to implement the Mac OS X universal binary functionality in Linux.
His FatELF file format embeds multiple Linux binaries for different architectures in a single file. FatELF is actually a simple container format: it adds some accounting information at the start of the file and then appends all the ELF (Executable and Linking Format) binaries after it, adding padding for alignment. FatELF can be used for both executable files and shared libraries (.so files).
An obvious downside of FatELF is that the executable's size gets multiplied by the number of embedded ELF architectures. However, this only holds for the executable files and libraries; common non-executable resources such as images and data files are just shipped as they are without FatELF. For example, a game that ships with hundreds of megabytes of data will, relatively, become only slightly larger.
Moreover, a FatELF binary doesn't require more RAM to run than a regular ELF binary, because the operating system decides which chunk of the file is needed to run on the current system and ignores the ELF objects of the other architectures. This also means that the entire FatELF file does not have to be read (except for kernel modules), so the disk bandwidth overhead is minimal.
On the project's website, Ryan lists a lot of reasons why someone would use FatELF. Some of them are rather far-fetched, such as:
Another benefit in the same vein is that third party packages no longer have to publish multiple packages for different architectures. An obvious critique is that this multiplies the needed disk space and bandwidth if FatELF is used systematically.
However, there is something to be said for FatELF as a means to abstract away architecture differences for end-users. For example, install scripts for proprietary Linux software, such as the scripts for the graphics drivers by AMD and Nvidia, that select which driver to install based on the detected architecture, could be implemented as FatELF binaries. This seems like a cleaner solution than each software vendor implementing his own scripts and flaky logic to detect the right version. Web browser plug-ins are another type of binary that could be an interesting match for FatELF. In support of this idea, Ryan admits he made flaky shell script errors himself in the past:
Another use for FatELF is what Apple used its universal binary for: a transition to a new architecture. The 32-bit to 64-bit transition comes to mind, where FatELF makes it possible to no longer need separate /lib, /lib32 and /lib64 trees. It also makes it possible to get rid of IA-32 compatibility libraries: if you want to run a couple of 32-bit applications on a 64-bit system, you only need FatELF versions of the handful of packages needed by them. But more exotic transitions are also possible, for example when the ELF OSABI (Operating System Application Binary Interface) used by the system changes, or for CPUs that can handle different byte orders.
Status
At the moment, Ryan has written a file format
specification and documentation for FatELF. To make the fat binary concept
possible on Linux, he created patches for the Linux kernel to support
FatELF, and he also adapted the file command to recognize FatELF
files, the binutils commands to allow GCC to link against a FatELF
shared library, and gdb to be able to debug FatELF
binaries. The patches are stored in a Mercurial repository
"until they have been merged into the upstream project
". The
repository also hosts some tools to manipulate FatELF binaries, which are
zlib-licensed.
One of the FatELF tools is fatelf-extract, which lets the user extract a specific ELF binary from a FatELF file, e.g. the x86_64 one. The fatelf-split command extracts all embedded ELF binaries, ending up with files like my_fatelf_binary-i386 and my_fatelf_binary-x86_64. The fatelf-info command reports interesting information about a FatELF file. A tool for developers is fatelf-glue, which will glue ELF binaries together, because GCC currently can't build FatELF binaries. You just have to build each ELF binary separately and then create a FatELF file of them.
As a proof-of-concept, Ryan created a VMware virtual machine image of Ubuntu 9.04 where almost every binary and library is a FatELF file with x86 and x86_64 support. The image can be downloaded and run in VMware Workstation or VMware Player to try the FatELF functionality. But this is not the regular use case. When FatELF is used, it's probably only for a handful of applications. FatELF files also coexist fine with ELF binaries: a FatELF binary can load ELF shared libraries and vice versa.
Relatively simple implementation
Ryan recalls the real point of inspiration for FatELF, a thread on the mailing list of the installer program MojoSetup. On May 20 2007, he writes on this list:
Two years later, Ryan has implemented this idea:
So after a few weeks of work in his spare time, Ryan got a working fat binary implementation for Linux. In contrast, building the virtual machine proof-of-concept literally took days, because it took a lot of work to automate. Ryan also spent a lot of time preparing to post the kernel patches:
Reception
Overall, the patch that allows the Linux kernel to load a FatELF file was received quite positively, but with some questions. For example, Jeremy Fitzhardinge asked why Ryan made it ELF-specific:
Later in the discussion, Jeremy adds that a generic approach would allow the last executable
in the file to be a shell script. If no other format was supported, this
shell script would then be executed, doing something like displaying a
useful message. Ryan seems
unsure that the added flexibility is worth the extra complications, although
he admitted that he would have chosen this route if other executable
formats like a.out files "were still in widespread use and actively
competed with ELF for mindshare.
" He also thinks it should be
possible to support other executable formats in the existing FatELF
format.
Some reactions to the patch that allows kernel
modules to be FatELF binaries are less positive. For example, Jeremy
objected to this because it would only encourage
more binary modules. Ryan understands his concern, but answered:
"I worry about refusing to take steps that would aid free software
developers in case it might help the closed-source people, too.
"
However, Jeremy didn't see it
that way, casting doubt on the use case of FatELF kernel modules:
I don't see much upside in making it "easier" to distribute binary-only open source drivers separately. (It wouldn't help that much, in the end; the modules would still be compiled for some finite set of kernels, and if the user wants to use something else they're still stuck.)
Moreover, even for proprietary kernel modules the use case is not that compelling. Companies like Nvidia have to distribute modules for multiple kernel versions. If the OSABI version doesn't change, they can't use FatELF to pack together multiple drivers for this purpose. So, all in all, FatELF support for kernel modules seems a bit dubious.
In another discussion, Rayson Ho found that Apple (NeXT, actually) has
patented
the technologies behind universal binaries, as a "method and
apparatus for architecture independent executable files
" (#5432937 and
#5604905).
Something that may be considered prior art is the mix of 32-bit and 64-bit object files in a single archive
on AIX, Rayson
thinks. David Miller adds another
possible prior art: TILO, a variant of the Sparc SILO boot loader, that
packs a 32-bit and 64-bit Linux kernel into one file an figures out which
one to actually boot depending on the machine it is running on, but Rayson
doubts this counts, because the project was started in 1995
or 1996, while NeXT's patent filing is from 1993. Ryan also entered the
discussion and clarified that FatELF has a few fields that Apple's
format doesn't, so the flow chart in the patent isn't the same. However,
it's not clear yet if Ryan should be concerned and if so, which changes he
should make to work around the patent.
The future
There are still a lot of things to do. Patches for module-init-tools, glibc (for loading shared FatELF libraries), and elfutils still have to be written. And the patches for binutils and gdb still have to be submitted, Ryan said:
Ryan even thinks about embedding binaries from other UNIXes into a FatELF file. He mentions FreeBSD, OpenBSD, NetBSD and OpenSolaris. In principle, each operating system using ELF files for its binaries could be supported. In addition to the ones mentioned, this also includes DragonFly BSD, IRIX, HP-UX, Haiku, and Syllable. The implementations should not be difficult, according to Ryan:
The support for other operating systems will make it possible to ship one file that works across Linux and FreeBSD, for example, without a platform compatibility layer. This could also be an interesting feature for hybrid Debian GNU/Linux and Debian GNU/kFreeBSD binaries.
The biggest hurdle that FatELF is facing now are adoption pains, Ryan explains:
Another disadvantage is the problems with creating fat binaries in build systems. For example, Erik de Castro Lopo writes about this on his blog. According to Ryan making the build systems handle this situation cleanly still needs some work. He expects the most popular way to build FatELF files will be to do two totally independent builds and glue them together instead of rethinking autoconf and such.
Conclusion
While a universal binary seems much less interesting for Linux than for Mac OS X, because most software in Linux is installed from within a package manager that knows the architecture, the concept is interesting for proprietary Linux software such as games. For a non-expert user, it's not evident if their processor is 32 or 64 bit. A FatELF download embedding both the x86 and x86_64 binary may be a good solution for this problem. And if ARM-based smartbooks become more popular, an x86/x86_64/arm FatELF binary may be the perfect way to distribute a binary that works on 32 bit Intel Atom netbooks, 64 bit Intel computers and ARM smartbooks.
System Applications
Database Software
MySQL Community Server 5.0.87 released
Version 5.0.87 of MySQL Community Server has been announced, it includes numerous bug fixes.MySQL Community Server 5.1.40 has been released
Version 5.1.40 of MySQL Community Server has been announced. "MySQL Community Server 5.1.40, a new version of the popular Open Source Database Management System, has been released. MySQL 5.1.40 is recommended for use on production systems."
PostgreSQL 8.5alpha2 released
Version 8.5alpha2 of the PostgreSQL DBMS has been announced. "The second alpha release for PostgreSQL version 8.5, 8.5alpha2, is now available. This alpha contains several new major features added since the previous alpha. Please download, install, and test it to give us early feedback on the features being developed for the next version of PostgreSQL."
PostgreSQL Weekly News
The October 25, 2009 edition of the PostgreSQL Weekly News is online with the latest PostgreSQL DBMS articles and resources.
Web Site Development
lighttpd 1.4.24 released
Version 1.4.24 of the lighttpd web server has been announced. "Update: There is a small regression in mod_magnet, see #1307. We finally added TLS SNI, and many other small improvements. We also fixed pipelining (that should fix problem with lighty as debian mirror) and some mod_fastcgi bugs this should result in improved handling of overloaded and crashed backends (you know which one :D)."
luban 0.2a2 released
Version 0.2a2 of luban, a generic (web/native) user interface builder, has been announced. "The luban package is a python-based, cross- platform user interface builder. It provides UI developers a generic language to describe a user interface, and the description can be rendered as web or native interfaces. Gongshuzi, an application built by using luban, can help users visually develop UIs and run the UIs as web or native applications."
nginx 0.7.63 announced
Version 0.7.63 of the nginx web server has been announced. See the CHANGES document for more information.
Miscellaneous
Symbian releases microkernel
The Symbian Foundation has announced the release of the platform microkernel (EKA2) and supporting development kit under the Eclipse Public License (EPL). "To enable the community to fully utilise the open source kernel, Symbian is providing a complete development kit, free of charge, including ARM's high performance RVCT compiler toolchain. The provision of the kit demonstrates Symbian's commitment to lowering access barriers to encourage the wider development community - such as research institutions, enthusiast groups and individual developers - to get creative with the code."
Desktop Applications
Business Applications
Tryton 1.4 is available
Version 1.4 of Tryton has been announced. "Tryton is a three-tiers high-level general purpose application platform under the license GPL-3 written in Python and using PostgreSQL as database engine. It is the core base of a complete business solution providing modularity, scalability and security. This new series comes up with new modules, security and performance improvements as well as the SQLite support and welcomes the arrival of Neso, the standalone version of Tryton."
Desktop Environments
GNOME 2.28.1 released
Version 2.28.1 of GNOME has been announced. "This is the first update to GNOME 2.28. It contains the usual mixture of bug fixes, translations updates and documentation improvements that are the hallmark of stable GNOME releases, thanks to our wonderful team of GNOME contributors! The next stable version of GNOME will be GNOME 2.28.2, which is due on December 16. Meanwhile, the GNOME community is actively working on the development branch of GNOME that will lead to the next major release in March 2010."
Gnome Foundation meeting minutes published
The Gnome Foundation's October 15, 2009 meeting minutes have been published. "Attendance * Diego Escalante * Germán Póo-Caamaño * Lucas Rocha * Srinivasa Ragavan * Stormy Peters".
GNOME Software Announcements
The following new GNOME software has been announced this week:- Brasero 2.29.1 (new features and bug fixes)
- Clutter Core 1.1.2 (new features and bug fixes)
- Empathy 2.28.1.1 (bug fixes and translation work)
- Empathy 2.29.1 (bug fixes, documentation and translation work)
- EOG Plugins 2.29.1 (new features and translation work)
- Evince 2.29.1 (new features, bug fixes and translation work)
- Eye of GNOME 2.29.1 (new features, bug fixes and translation work)
- GCalctool 5.29.1 (new features)
- GNOME Games 2.29.1 (new features, bug fixes and code cleanup)
- GOK 2.29.1 (bug fixes and translation work)
- libchamplain 0.4.2 (bug fixes)
- mousetweaks 2.29.1 (bug fixes and translation work)
- Nautilus-Actions 2.29.1 (new features and bug fixes)
- Orca 2.29.1 (new features, bug fixes and translation work)
- RTM-GLib 0.1.0 (initial release)
- Rygel 0.4.4 (new features and bug fixes)
- Sabayon 2.28.1 (bug fixes and translation work)
- seahorse-plugins 2.29.1 (no changes)
- tracker 0.7.4 (new features and bug fixes)
- Vinagre 2.29.1 (new features, bug fixes and translation work)
KDE4 Demonstrates Choice Is Not A Usability Problem (KDEDot)
KDE.News presents an article by Daniel Memenode that contrasts the availability of features with usability. "KDE always stood out as a desktop environment that doesn't shy away from giving you lots of options and features. It is no wonder that one of its flagship products, Konqueror, was often compared to a swiss army knife. It could be used as a file manager for both local and remote files, an image viewer and a fairly powerful web browser shifting from one role to the other as needed. This however came with one downside in that it increased the perceived complexity of the desktop environment and increased the learning curve of a new user. KDE 4 was expected, among other things, to come with innovations which would possibly resolve this issue and I think it has already made some significant strides in that direction."
The Semantic Desktop Wants You (KDEDot)
KDE.News takes a look at Nepomuk. "The KDE team working on Nepomuk aims to bring the Semantic Desktop to KDE 4, allowing applications to share and respond intelligently to meta data about files, contacts, web pages and more. Let us make this short: Nepomuk is an important project for the future KDE desktop. Its goal is to get all the information available on the system to the user. You are receiving an email - Nepomuk should show you information relevant to related projects or persons or tasks. You look at images of a person - Nepomuk should have links to other images of that person or unanswered emails or events you met that person at. You open the video player - Nepomuk should propose to watch the next episode in the series you are currently watching."
what's brewing in KDE?
Sebastian Kügler points out some highlights from the KDE blogs including KDE on Maemo, Journal Viewer, Visual improvements in the window decoration and Qt opens up further.KDE Software Announcements
The following new KDE software has been announced this week:- Danbooru Client 0.1 (initial release)
- Dolphin [idea-2] 0.1 (initial release)
- EasyRPM 0.1.0 (initial release)
- Kpar2 for KDE4 0.4.1 (unspecified)
- Krecipes 2.0-alpha4 (new features)
- KTorrent 3.2.5 and 3.3rc1 (bug fixes)
- kwooty 0.1.0 (initial release)
- synaptiks 0.1.0 (initial release)
X11R7.5 has been released
The X.Org Foundation has announced the release of X11R7.5. "X11R7.5 supports Linux, BSD, Solaris, MacOS X, Microsoft Windows and GNU Hurd systems. It incorporates new features, and stability and correctness fixes, including improved autoconfiguration heuristics, enhanced support for input devices, and new options for reconfiguring the screen geometry while the system is running." Click below for the full announcement including more details on new features in X11R7.5.
Hutterer: X11R7.5 released - but what is it?
As if in answer to some of the questions posed in the comments on our announcement of X11R7.5, Peter Hutterer has a great description of what makes up the release on his blog. "Since then, the X11R7.x releases (referred to as "katamari") are quite like distributions. They cherry-pick a bunch of module versions known to work together and combine them into one set. The modules themselves move mostly independent of the katamaris and thus their version numbers may skip between katamaris. For example, X11R7.4 had the X Server 1.5, X11R7.5 has X Server 1.7."
Xorg Software Announcements
The following new Xorg software has been announced this week:- libX11 1.3.2 (build fix and documentation work)
- libXext 1.1.1 (bug fixes)
- xf86-video-intel 2.9.1 (bug fixes)
- xorg-docs 1.5 (new features, bug fixes and documentation work)
- xorg-server 1.7.1 (bug fixes and code cleanup)
- xorg-sgml-doctools 1.3 (bug fixes, documentation work and new macro requirement)
Financial Applications
SQL-Ledger 2.8.26 released
Version 2.8.26 of SQL-Ledger, a web-based double entry accounting/ERP system, has been announced. Changes include: "1. Version 2.8.26 2. fixed AR aging duplicates in report 3. DST duedate and terms calculation".
Games
Gluon Sprint Wrap-Up (KDEDot)
KDE.News reports from the Gluon sprint recently held in Munich. "Gluon was conceived when the project's creator, Sacha Schutz, looked around the internet and saw how popular casual games based on Flash were. He saw the need for something which would make it possible to create similar games in a simple manner using technologies unrestricted by the closed world of proprietary software."
Graphics
Inkscape 0.47pre4 is out
Version 0.47pre4 of the Inkscape vector graphics editor has been announced. "Hopefully pre4 is the final prerelease. Please download the files and let us know if you stumble upon any serious bugs except the infamous crash when undoing changes in live path effects. We probably won't release the final version within next couple of weeks, because we really need the LPE bug fixed."
Interoperability
Wine 1.1.32 announced
Version 1.1.32 of Wine has been announced. Changes include: "- Many crypto fixes, particularly on 64-bit. - Improved DVD access on Mac OS. - Several common controls improvements. - Various HTML support improvements. - More DIB optimizations. - Various bug fixes."
Medical Applications
Call for Participation: openSUSE Medical
The openSUSE_Medical project has been launched. "I'm pleased to announce an new Subproject from openSUSE: openSUSE_Medical. This new Project tries to package more Software for doctors's practice or clinical needs. With our work we try to bridge a gap in the market."
Music Applications
guitarix 0.05.1-1 released
Version 0.05.1-1 of guitarix has been announced, it includes several new features and some bug fixes. "guitarix is a simple Linux Rock Guitar amplifier and is designed to achieve nice thrash/metal/rock/blues guitar sounds. Guitarix uses the Jack Audio Connection Kit as its audio backend and brings in one input and two output ports to the jack graph."
probility sequencing language 1.02 released
Version 1.02 of probility sequencing language has been announced. "probability sequencing language 1.02 has been released. psl is a text based piano roll language that is inspired by the probability in jeskola buzz, but with more control than you can get in a midi based envir[on]ment. every note has a percentage chance of hitting or it is marked with an x. The frequency on the roll is entirely up to the user. support for decimals has been added to 1.02."
Office Applications
SeaMonkey 2.0 released
The SeaMonkey 2.0 release is out. "The combination of an Internet browser, email & newsgroup client, HTML editor, IRC chat and web development tools, that has already established a wide user base in its previous incarnations, has been rebuilt on top of the modern Mozilla platform, featuring world-class add-on management among other things. In addition, it has been improved with feed support (including an RSS and Atom feed reader in the mail component), a modern look, restoration of browser tabs and windows after crashes or restarts, tabbed mail, automated updates, smart history search from the location bar, faster JavaScript, HTML5 features (for example video and downloadable fonts), and even support for the Lightning calendar add-on (which will issue a beta for installation on SeaMonkey 2.0 in the next few weeks)." More information can be found in the release notes.
Miscellaneous
XYZCommander 0.0.2 released
Version 0.0.2 of XYZCommander has been announced. "I'm pleased to announce the XYZCommander version 0.0.2! XYZCommander is a pure console visual file manager."
Languages and Tools
C
GCC adds support for Renesas RX processor
The Gnu Compiler Collection (GCC) now has support for the Renesas RX processor. "Support has been added for the Renesas RX processor (RX) target by Red Hat, Inc."
LLVM 2.6 released
Version 2.6 of the LLVM compiler is out. There's a lot of new stuff here, including much-improved x86-64 code generation, link-time optimization support, a number of new architectures supported, DragonEgg (using LLVM for GCC code generation), and more. "A major highlight of the LLVM 2.6 release is the first public release of the Clang compiler, which is now considered to be production quality for C and Objective-C code on X86 targets. Clang produces much better error and warning messages than GCC and can compile Objective-C code 3x faster than GCC 4.2, among other major features."
Caml
Caml Weekly News
The October 27, 2009 edition of the Caml Weekly News is out with new articles about the Caml language.
Python
Python 2.6.4 released
Version of has been announced. "This is the latest production-ready version in the Python 2.6 series. We had a little trouble with the Python 2.6.3 release; a number of unfortunate regressions were introduced. I take responsibility for rushing it out, but the good news is that Python 2.6.4 fixes the known regressions in 2.6.3. We've had a lengthy release candidate cycle this time, and are confident that 2.6.4 is a solid release. We highly recommend you upgrade to Python 2.6.4."
Proposal: Moratorium on Python language changes
Guido van Rossum has proposed that the Python development community stop changing language features for "several years." "The reason is that frequent changes to the language cause pain for implementors of alternate implementations (Jython, IronPython, PyPy, and others probably already in the wings) at little or no benefit to the average user (who won't see the changes for years to come and might not be in a position to upgrade to the latest version for years after)." Besides, he would really like to see the community working on building acceptance for Python 3.
Python-URL! - weekly Python news and links
The October 25, 2009 edition of the Python-URL! is online with a new collection of Python article links.ffnet 0.6.2 released
Version 0.6.2 of ffnet, a feed-forward neural network training solution for python, has been announced. "This release contains minor enhancements and compatibility improvements: - ffnet works now with >=networkx-0.99; - neural network can be called now with 2D array of inputs, it also returns numpy array instead of python list; - readdata function is now alias to numpy.loadtxt; - docstrings are improved."
mds-utils 1.2.0 released
Version 1.2.0 of mds-utils has been announced, it adds some new capabilities. "mds-utils is a library intended to become a collection of several C++ utilities. It makes heavy usage of the Boost C++ libraries."
python-daemon 1.5.2 released
Version 1.5.2 of python-daemon has been announced. "Since version 1.5 the following significant improvements have been made: * The documented option 'prevent_core', which defaults to True allowing control over whether core dumps are prevented in the daemon process, is now implemented (it is specified in PEP 3143 but was accidentally omitted until now). * A document answering Frequently Asked Questions is now added."
Tcl/Tk
Tcl-URL! - weekly Tcl news and links
The October 23, 2009 edition of the Tcl-URL! is online with new Tcl/Tk articles and resources.
Version Control
GIT 1.6.5.2 released
Version 1.6.5.2 of the GIT distributed version control system has been announced, it includes several bug fixes.Stacked Git 0.15 released
Version 0.15 of Stacked Git has been announced, it includes some new capabilities. "StGit is a Python application providing functionality similar to Quilt (i.e. pushing/popping patches to/from a stack) on top of Git. These operations are performed using Git commands, and the patches are stored as Git commit objects, allowing easy merging of the StGit patches into other repositories using standard Git functionality."
Page editor: Forrest Cook
Next page:
Announcements>>