Bug 6813 - Large file support broken in python on 32-bit systems
Summary: Large file support broken in python on 32-bit systems
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.6
Hardware: All Multiple
: Medium+ normal
Target Milestone: 1.6.2
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-07 10:53 UTC by Paul Eggleton
Modified: 2014-11-26 18:03 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-10-07 10:53:34 UTC
Python attempts to force large file support on where possible when building. However, when building python for a 32-bit target, because we hardcode ac_cv_sizeof_off_t to 4 for 32-bit targets in site/*, large file support is disabled when python's configure script checks for it.

We should remove ac_cv_sizeof_off_t from the site files; but when doing this we need to check this won't cause any regressions. Any autotools-based software whose recipe does not bypass the autoreconf execution and uses AC_CHECK_SIZEOF (as python's configure does) will work without ac_cv_sizeof_off_t hardcoded since the latter works when cross-compiling, but any that use hand-rolled checks instead that still look at ac_cv_sizeof_off_t might regress.
Comment 1 Paul Eggleton 2014-10-14 09:31:02 UTC
I've looked through all recipes in the OE-Core master, of which only the following have references to ac_cv_sizeof_off_t *and* don't use autotools_do_configure (and therefore don't autoreconf):

meta/recipes-support/db/db_6.0.30.bb
meta/recipes-support/db/db_5.3.28.bb
meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
meta/recipes-devtools/rpm/rpm_5.4.14.bb
meta/recipes-devtools/binutils/binutils_2.24.bb
meta/recipes-devtools/gdb/gdb_7.7.1.bb

I checked the default versions of these and it seemed that all produced configure scripts with cross-compile compatible checks for the size; we should double check the other versions too, unless they get dropped in the mean time. However, when it came time to look outside the core (e.g. at meta-oe) the number of recipes that at least don't use autotools_do_configure suggests to me that we should probably be a bit conservative in fixing this for now.

I've sent an alternate fix just to force ac_cv_sizeof_off_t=8 for Python (if "largefile" is in DISTRO_FEATURES) rather than dropping the value from the site files, which should also be safe to backport to stable branches; we can look at applying the proper fix in 1.8.
Comment 2 Paul Eggleton 2014-10-27 15:16:13 UTC
The fix has gone into the master and dizzy branch for the 1.7 release:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f95d3fce42fe1021d6fb373b6d7b6fe1e84a752b

Next up, backport to 1.6.
Comment 3 Paul Eggleton 2014-11-26 18:03:00 UTC
The python fix was merged into daisy for 1.6.2 some weeks ago:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=daisy&id=19dc8bf950ae2dcca3e8165eaf122d3c1cb7006e

I think we can mark this bug as resolved now; the general issue of large file support enabling across the board is covered under bug 6803.