This project has a project management page.
Contents |
glibc 2.4 is released, and is being picked up by many of the distributions releasing now. Current community versions such as Fedora Core 5 and OpenSUSE 10.1 are based on 2.4; Mandriva Cooker is running 2.4. Debian and derivatives are not currently on 2.4.
LSB version 3 is essentially based on glibc 2.3.4. This is a report on the difference between glibc 2.4 and LSB 3.1 in the POSIX area (excluding other areas in which glibc extends). It includes new features in 2.4, existing symbols with new versions, and features omitted from LSB which may not be new to 2.4 specifically that might be considered for inclusion in a future LSB version.
There is no question we need to deal seriously with glibc 2.4 as systems shipping this year will have it. That does not necessarily mean the uplift is appropriate for LSB 3.2; LSB 4.0 may be a more logical target as a major release number. Note that glibc 2.4 is at least partially a new ABI: the release claims "Once you install version 2.4, most program binaries you compile will not be able to run on older installations based on 2.3.6 or earlier versions. Existing dynamically-linked program binaries built using older glibc versions should continue to work if they make proper use of the library interfaces as specified". Note that our tests building with lsbcc (which means using the LSB stub libraries for linking) has not shown any particular problems to date.
This page is a work in progress and as issues are discovered they will be added here.
This is relative to the glibc 2.3 series based on library symbol versions, and does not treat interfaces that may have been added late in the 2.3 series but not included in the LSB (some of those are dealt with in the Excluded Interfaces section below).
The largest set of new functions is the set of 14 *at interfaces, which allows opening files "at" a relative location. These system calls are not currently in POSIX but are proposed for inclusion in the next revision of POSIX.1 (they make up Extended API Set Part 2). Similar system calls exist on Solaris, where they have an additional sense: they also open the extended attributes on a file, not the case on Linux.
...new system calls which take a file descriptor/filename pair instead of a single file name. These functions, openat etc, have been discussed on numerous occasions. They are needed to implement race-free filesystem traversal, they are necessary to implement a virtual per-thread current working directory (think multi-threaded backup software), etc.
An example manpage: openat
These interfaces are very recent, having been added in Linux kernel 2.6.16.
There are two other interfaces in the proposed POSIX Extended API Set Part 2 that can thus be grouped with these: fdopendir, which is like opendir but takes a file descriptor instead of a path name (new to glibc 2.4); and fexecve, which is like exeve but takes a file descriptor instead of a path name (has been in glibc since 2.0 but is not in the LSB, even in the database).
API for monitoring file system events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory.
Links to manpage source: inotify_init inotify_add_watch inotify_rm_watch
Note these interfaces are quite new - 2.6.13 kernel. Usually LSB tries not to add too many Linux-specific interfaces (which these are), but this one has already been specifically requested and seems quite applicable to desktop usage. This is now tracked as bug 1394
New versions of poll, select which take a finer-granularity timer (timespec instead of timeval) and a signal mask; that mask will be applied while the calling process waits for events, with the previous mask being restored on return. These are new to the kernel. Note that pselect is actually a POSIX interface, and not an optional one, which has been in glibc forever (it has version GLIBC_2.0), but is not included in LSB. This issue has been added as bug 1392. ppoll on the other hand is a new interface - see poll manpage for details.
unshare allows a process to disassociate parts of its execution context that are currently being shared with other processes. Part of the execution context, such as the namespace, is shared implicitly when a new process is created using fork or vfork while other parts, such as virtual memory, may be shared by explicit request when creating a process using clone.
The main use of unshare is to allow a process to control its shared execution context without creating a new process.
See unshare manpage for details.
A companion interface to open_memstream but using a wide-character buffer. opem_memstream is GLIBC_2.0 but is not in the LSB (marked Deferred in the database). Both of these interfaces are in the proposed "Extended API Set Part 1" for the next POSIX revision.
Alias for euidaccess, which is not in the LSB (Deferred in the database). Only the alias is new; euidaccess is GLIBC_2.0.
# A bug in sysdeps/generic/w_exp2.c kept this from appearing # in GLIBC_2.1 as it should have on platforms using that # implementation file. On others, sysdeps/CPU/Versions now # puts exp2l in GLIBC_2.1, which will override this entry.
Linux is such a platform, so we should not see a need to change.
On ppc32/ppc64 and s390/s390x, long double support was provided by making a long double be a double. As of glibc_2.4, proper long double support is added. This affects libm and libc functions, and for the LSB would actually add the 'l' suffixed routines into the ABI. This is a very significant change.
The POSIX async I/O interfaces (AIO set) in librt are excluded from the LSB. This is tracked as bug 1391. In addition to the set in POSIX, glibc also provides the non-POSIX aio_cancel64, aio_fsync64, aio_error64, aio_read64, aio_suspend64, aio_write64 and lio_listio64 as well as aio_init as a logical extension.
These continue to be an issue; the glibc (librt) versions implement async I/O in userspace while the new kernel aio does not use the POSIX interfaces.
It also appears that the GLIBC_2.4 version of lio_listio introduces a change in the implementation, from issuing only a single event when listio completes to issuing events for individual requests. This would not be an LSB compatibility issue, of course, since there is no existing LSB version to compare to.
19 stack-safe interfaces (_chk suffix) were added late in the 2.3 series with 48 additional interfaces added for 2.4. It's not clear whether they need to be in the LSB or not.
The POSIX message queue interfaces (MSG set) are excluded from the LSB. These routines are in librt with with a symbol version of GLIBC_2.3.4, but depended on a kernel version (2.6.6 or later) that seemed too new to make these interfaces mandatory for LSB 3.0, so they were omitted. This is now refiled as bug 1388 since the previous librt bug was closed when librt was added to the LSB.
Portions of the pthread set are not specified by LSB. This omission is described in bug 893, which is currently deferred until 4.0, but that was done before an LSB 3.2 was envisioned - it may still be the right action.
The POSIX Barriers (BAR) option is implemented by the pthread_barrier* and pthread_barrierattr* functions, in libpthread with a version of GLIBC_2.2, except pthread_barrierattr_getpshared which was omitted from 2.2 but added in GLIBC_2.3.3.
The POSIX Spinlocks (SPI) option is implemented by the pthread_spin* functions, in libpthread with a version of GLIBC_2.2.
The POSIX Thread CPUtime (TCT) option has is only one thread interface affected, pthread_getcpuclockid, which is in libpthread with a version of GLIBC_2.2. The other interfaces from TCT (clock_*, timer_create) are already included in LSB although it has not been fully investigated whether they have the support for this option. These interfaces are in libc with version of GLIBC_2.2.
Some of the features sets of POSIX Advanced Realtime are in glibc but either incomplete or omitted from LSB. Other pieces are not included in glibc and/or the Linux kernel. They are mentioned here for completeness.
The POSIX Advisory Information (ADV) set is partially implemented. posix_memalign does appear in LSB 3.x. Three POSIX interfaces and two additional extension interfaces do not. This is tracked as bug 1389. These interfaces all appear in libc with version of GLIBC_2.2.
The Spawn (SPN) set in implemented by the posix_spawn* and posix_spawnattr* functions, in libc with version of GLIBC_2.2. This is tracked as bug 1390.
The POSIX Tracing (TRC), Trace Event Filter (TEF), Trace Inherit (TRI) and Trace Log (TRL) sets are not supported in glibc 2.4. Tracing requires kernel support which does not appear to be forthcoming, at least in a form that would be useful for these interfaces.
The POSIX Typed Memory (TYP) objects are not supported in glibc 2.4, again as there is no kernel support.
libnss_compat, libnss_dns, libnss_files, libnss_hesiod, libnss_nis, libnss_nisplus and libcidn have no exported symbols (or rather, they are all GLIBC_PRIVATE) and are not intended to be called directly by applications.
libBrokenLocale, libanl, libnsl, libresolv and libthread_db do have exported public symbols but are not part of the LSB. libnsl and libresolv have been asked for. It is the current position of LSB that these are not needed by application programs. One particular case is that programs which had their genesis on Solaris often include -lnsl as a matter of course; however the interfaces actually used are often in libc on Linux. Thus, while linking with libnsl does not break anything in the non-LSB case, neither is the library actually used in many cases. The LSB team has encountered more than one program where the configure script tests for presence of a function in libnsl without testing if the function works without libnsl (which it would), thus needlessly including the library on the link line.