LoginSignup
0
0

More than 3 years have passed since last update.

Gentoo の minimal install CD と chroot な環境で dev-libs/boost を MAKEOPTS="-j5" でビルドしようとして失敗、原因は swap 領域を有効化しなかったこと

Last updated at Posted at 2019-12-16

やらかしの原因

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks/ja#スワップパーティションを有効にする
↑こちらの手順を見落していたがために陥った問題でした。

「パーティションを切るのは何度もやってるし、別にガイド見なくてもよゆーでしょう」
👉「うわああああ▂▅▇█▓▒░(’ω’)░▒▓█▇▅▂」

以下のようなバグレポートを書いていました

dev-libs/boost-1.71.0 fails install phase on Chroot Environment with Minimal-install CD on VirtualBox

Problem

To install dev-libs/boost-1.71.0, I had to apply the workaround below on a chroot environment with minimal-install CD (install-amd64-minimal-20191211T214502Z.iso) on VirtualBox.

But, there was no problem to install boost with multi-threading option like MAKEOPTS="-j5", on already installed Gentoo environment on VirtualBox.

Workaround

Set the value MAKEOPTS="-j1".

For example,

mkdir /etc/portage/env
echo 'MAKEOPTS="-j1"' > /etc/portage/env/singlecore.conf
echo "dev-libs/boost singlecore.conf" >> /etc/portage/package.env
emerge --ask dev-libs/boost

Host System's Infomation

$ screenfetch -n
esi@esi-pc
OS: Manjaro 18.1.4 Juhraya
Kernel: x86_64 Linux 5.4.2-1-MANJARO
Uptime: 1d 1h 12m
Packages: 1200
Shell: bash
Resolution: 1280x1024
DE: KDE 5.64.0 / Plasma 5.17.4
WM: KWin
GTK Theme: Breath [GTK2/3]
Icon Theme: maia
Font: Noto Sans Regular
Disk: 48G / 70G (72%)
CPU: AMD A10-4655M APU with Radeon HD Graphics @ 4x 2GHz
GPU: GeForce GT 710
RAM: 6125MiB / 15935MiB

Host System's Infomation is here, as "host_system_info.txt".
https://drive.google.com/open?id=1IyPKrAkq-FrYB5MBPigODRXJAToCln3i

uname -a > host_system_info.txt
screenfetch -n -N >> host_system_info.txt
sudo lshw >> host_system_info.txt

Hardware infomation

VirtualBox 6.0.14 r132055 with Extension Pack 6.0.14

4core x86_64 CPU / UEFI Mode / Serial ATA AHCI Mode

configuration file is here, as "Gentoo.vbox".
https://drive.google.com/open?id=1Km0VxUjOs26Lb-8N_8WnDBw4aAIF74mt

Error Logs (on chroot environment)

emerge--info_dev-libs_boost-1.71.0.txt
(emerge --info '=dev-libs/boost-1.71.0::gentoo' > emerge--info_dev-libs_boost-1.71.0.txt)
https://drive.google.com/open?id=1G-4qw9iiDWMdFEugvruI4P8qHZ9sGFEN

/var/tmp/portage/dev-libs/boost-1.71.0/temp/build.log as build.log_dev-libs_boost-1.71.0.txt
https://drive.google.com/open?id=1cRHe2tFtL3JyEekTxryMSrH9KxmludnL

Files for Comparison (on already installed Gentoo environment)

/usr/src/linux/.config as dot_config_noproblem.txt
https://drive.google.com/open?id=1HiD0h44GB-kW_fUlcDXwRpnNcBRwewid

emerge--info_dev-libs_boost-1.71.0_noproblem.txt
https://drive.google.com/open?id=1457-eBOI2sEfhw0WO6Jb7j8p6HazFDDH

I compared emerge--info_dev-libs_boost-1.71.0.txt and emerge--info_dev-libs_boost-1.71.0_noproblem.txt, and found that the lack of swap caused this problem.

提出前に気がついてよかった

/dev/sda2 に swap 領域を用意してある状態で、swapon /dev/sda2したうえでemerge dev-libs/boostしてみると無事ビルドが通りました。

MAKEOPTS="-j5" かつメモリ割り当て 2G では swapon しないと不正終了。MAKEOPTS="-j1" なら swap 領域無しでもビルドが通りました。

Gentoo のバグレポガイドはこちら

https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide
https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide/ja

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0