Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 736794 - sys-libs/glibc: binpkg locale-gen uses --jobs from host, and can exhaust memory on embedded systems
Summary: sys-libs/glibc: binpkg locale-gen uses --jobs from host, and can exhaust memo...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2020-08-11 20:31 UTC by David Flogeras
Modified: 2022-07-30 16:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2020-08-11 20:31:16 UTC
It seems that when installing glibc from a binpkg, when it gets to the locale-gen stage, the following line:

locale-gen ${inplace} --jobs $(makeopts_jobs) ...

Is using makeopts_jobs from the host.  So I build packages on a machine with -j8, but this target is a Rev1 Raspberry Pi with 256MB of RAM and it cannot handle this.

Reproducible: Always
Comment 1 David Flogeras 2020-08-11 21:13:36 UTC
I think I successfully worked around it as follows:

- Use qtbz2 -s to split the package into tarball and xpak
- Use qxpak -x to unpack the xpak
- Uncompress environment.bz2, edit the offending -j8, then recompress
- qxpak -c to recreate the xpak
- qtbx2 -j to re-join the tarball and xpak into tbz2
- Then ran emaint binhost to regenerate the package metadata
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-11 21:15:00 UTC
Looks similar to bug #680782. Which USE-flags you are using for glibc?

USE=compile-locales is one option to avoid it.
Comment 3 David Flogeras 2020-08-11 22:26:40 UTC
Default USE for arm, which is currently:

crypt multiarch ssp static-libs -audit -caps -cet -compile-locales -custom-cflags -doc -gd -headers-only -multilib -nscd -profile -selinux -static-pie -suid -systemtap -test -vanilla

I wasn't aware of compile-locales, but wouldn't that bloat the tbz2 if it includes all locales, which I'm just going to regenerate post install?

I guess I could filter using INSTALL_MASK, but then I'd have to remember to rebuild or I have 0 locales; that's also kinda hacky.

The aforementioned bug seems to state in the last comment this was fixed in 2.29-r5.  Was this fix reverted?
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-11 22:42:16 UTC
I don't think anything was fixed in linked bug. The only change was to introduce USE=compile-locales.