lsb

LSB include headers lack support for large files

Bug #1327305 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

There is no support for _FILE_OFFSET_BITS=64 (or _LARGEFILE_SOURCE), i.e. the
"implicit LFS" support:
http://people.redhat.com/berrange/notes/largefile.html

The LSB ABI does support the explicit LFS interface, so it would be a matter of
updating the headers to support it as well.
The headers do support _LARGEFILE64_SOURCE, so thats a start, but according to
feature_test_macros(7) that is only a transitional macro and
_FILE_OFFSET_BITS=64 should be used instead.

Attached testcase fails on 32-bit x86 when built with the LSB SDK, but works
fine when built with system compiler:
$ ./test.sh
[...]
checking for _FILE_OFFSET_BITS value needed for large files... unknown
[...]

=== Testing system build ===
file8G size: 8589934592
=== Testing LSB build ===
file8G: Value too large for defined data type

There are a few choices for me here:
 * do not distribute 32-bit binary packages built with LSB, just require people
to build from source if they want to run the application on 32-bit
 * switch application to open64/stat64/etc. => not portable, not worth the
complications
 * fix the LSB headers so they do the renaming as with _FILE_OFFSET_BITS=64 and
system headers
 * just use system headers always, and rely only on the link time checks of LSB
(bit risky)

Tags: sdk uplift
Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.