Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to build boost libraries
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
circuit_rider
n00b
n00b


Joined: 21 Jun 2017
Posts: 5

PostPosted: Wed Jun 21, 2017 1:47 pm    Post subject: Unable to build boost libraries Reply with quote

Hello, thank you all for your time, I'm grateful for your assistance.

I'm using this guide to install on a Macbook 2,1. https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide

In Chapter 7, an error building boost libs happened in the step "Emerging buildkernel, and Additional Required Packages"

The error appears to be "x86_64-pc-linux-gnu-g++: internal compiler error: Killed (program cc1plus)"

In order to more rapidly attempt fixes to the program I began attempts to fix the issue by emerging only the boost libs directly instead of them being pulled in as a dependency and then failing to build.

From my research, this error can often happen due to insufficient memory, which makes sense when I'm using this ancient laptop. So I created swap space of increasing amounts during multiple attempts until my final attempts with 1GB swap. None of my efforts resulted in any changes to the outcome. The exact same error message happened in about the same amount of time.

Here is the build.log https://gist.github.com/circuitrider/751c265c0e7e612ee03d9227e3919816

Here is the output of the emerge --info command https://gist.github.com/circuitrider/22cce9ab2c77b199e93c3bfd325be092

Here is the output of the emerge --pqv command https://gist.github.com/circuitrider/fca99ad48cf1de53bc3d4b9e08d3d289

I will try to respond promptly if there's any other information requested I provide, but I am going to work and won't have access to this laptop until the evening. Have a great day and thanks again for your help.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21779
Location: here

PostPosted: Wed Jun 21, 2017 2:04 pm    Post subject: Reply with quote

For see if is a out of memory error, you can look dmesg.
You tried with MAKEOPTS="-j1"?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
circuit_rider
n00b
n00b


Joined: 21 Jun 2017
Posts: 5

PostPosted: Wed Jun 21, 2017 3:32 pm    Post subject: Reply with quote

fedeliallalinea wrote:
For see if is a out of memory error, you can look dmesg.
You tried with MAKEOPTS="-j1"?


dmesg shows lowmemorykiller like: lowmemorykiller: send sigkill to 1943 (cc1plus), adj 0, size 112034

/etc/portage/make.conf has MAKEOPTS set to -j1 already.

While building, I was running the "free" command to monitor the memory usage, and during this, the physical memory behaved as expected, but the swap barely changed but for maybe a hundred MB throughout the emerge attempt.

I have read in my research that the I_KNOW_WHAT_I_AM_DOING flag could allow usage of swap space where normally only physical memory is allowed for an operation. Do you think that this could be the case? I have tried adding it to /etc/portage/make.conf as:
I_KNOW_WHAT_I_AM_DOING="yes"

But honestly, I'm not 100% sure if either this is the file where that flag goes, nor if what I entered is the proper format.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jun 21, 2017 3:40 pm    Post subject: Reply with quote

What's the output of
Code:
swapon
and
Code:
grep '^Mem.*:' /proc/meminfo
both run as root?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Wed Jun 21, 2017 3:58 pm    Post subject: Reply with quote

circuit_rider,

The I_KNOW_WHAT_I_AM_DOING flag downgrades some checks at the start of the build process from fatal errors to warnings.
These checks are typically for RAM and build space. That flag does not change the build process in any way.

The flag goes in make.conf. Its value is not tested, just if its defined or not.

I know you can build boost with 1G RAM and 2G swap. It builds on a Raspberry Pi 3.
emergeInfo.txt :
KiB Mem: 1776080 total, 951624 free

What is using 800Mb RAM there?

What else is running?

You have
Code:
MAKEOPTS="-j3 -l2"
How is MAKEOPTS="-j1" set?
Code:
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=2"
allows portage to run 3 jobs in parallel.
That soaks up RAM. Depending on whats going on, you might actually get three parallel makes going.
Allow C++ 1G RAM per make thread.

With 2G RAM, its safe to run MAKEOPTS="-j2" most of the time but not with EMERGE_DEFAULT_OPTS="--jobs=3" at the same time.
Its a good idea to not run Xorg when you are building too.

--- edit ---
Code:
>>> Compiling source in /var/tmp/portage/dev-libs/boost-1.62.0-r1/work/boost_1_62_0 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
b2 --user-config=/var/tmp/portage/dev-libs/boost-1.62.0-r1/work/boost_1_62_0-abi_x86_64.amd64/user-config.jam gentoorelease -j3 -q


That shows -j3.

To avoid hunting that down right now, from the console, no Xorg, as root run
Code:
MAKEOPTS="-j1" emerge =dev-libs/boost-1.62.0-r1 -av1
and post the build log if it fails.
You are saying one thing and posting files that show something different. We need a self consistent data set to work with.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Wed Jun 21, 2017 4:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21779
Location: here

PostPosted: Wed Jun 21, 2017 4:03 pm    Post subject: Reply with quote

circuit_rider wrote:
I have read in my research that the I_KNOW_WHAT_I_AM_DOING flag could allow usage of swap space where normally only physical memory is allowed for an operation. Do you think that this could be the case? I have tried adding it to /etc/portage/make.conf as:
I_KNOW_WHAT_I_AM_DOING="yes"

This flag is provided by check-reqs.eclass. The boost ebuild don't inherit this eclass then has no influence.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Wed Jun 21, 2017 4:08 pm    Post subject: Reply with quote

I prefer
Code:
I_KNOW_WHAT_I_AM_DOING="maybe"
:)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
circuit_rider
n00b
n00b


Joined: 21 Jun 2017
Posts: 5

PostPosted: Wed Jun 21, 2017 9:25 pm    Post subject: Reply with quote

John R. Graham wrote:
What's the output of
Code:
swapon
and
Code:
grep '^Mem.*:' /proc/meminfo
both run as root?

- John


Code:

>swapon
NAME      TYPE      SIZE USED PRIO
/dev/dm-1 partition  10G 542M   -1

and
Code:

>grep '^Mem.*:' /proc/meminfo
MemTotal:        1776080 kB
MemFree:          151952 kB
MemAvailable:    1135124 kB
Back to top
View user's profile Send private message
circuit_rider
n00b
n00b


Joined: 21 Jun 2017
Posts: 5

PostPosted: Wed Jun 21, 2017 9:31 pm    Post subject: Reply with quote

NeddySeagoon wrote:

I know you can build boost with 1G RAM and 2G swap. It builds on a Raspberry Pi 3.
emergeInfo.txt :
KiB Mem: 1776080 total, 951624 free


Oh good news for me then, I only set 1G swap.
NeddySeagoon wrote:

What is using 800Mb RAM there?
What else is running?

Probably the default GUI stuff on the Live CD I started the install with, including Firefox running to read documentation and post to this forum.
NeddySeagoon wrote:

You have
Code:
MAKEOPTS="-j3 -l2"
How is MAKEOPTS="-j1" set?
Code:
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=2"
allows portage to run 3 jobs in parallel.
That soaks up RAM. Depending on whats going on, you might actually get three parallel makes going.
Allow C++ 1G RAM per make thread.

With 2G RAM, its safe to run MAKEOPTS="-j2" most of the time but not with EMERGE_DEFAULT_OPTS="--jobs=3" at the same time.
Its a good idea to not run Xorg when you are building too.

--- edit ---
Code:
>>> Compiling source in /var/tmp/portage/dev-libs/boost-1.62.0-r1/work/boost_1_62_0 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
b2 --user-config=/var/tmp/portage/dev-libs/boost-1.62.0-r1/work/boost_1_62_0-abi_x86_64.amd64/user-config.jam gentoorelease -j3 -q


That shows -j3.

To avoid hunting that down right now, from the console, no Xorg, as root run
Code:
MAKEOPTS="-j1" emerge =dev-libs/boost-1.62.0-r1 -av1
and post the build log if it fails.
You are saying one thing and posting files that show something different. We need a self consistent data set to work with.


Wow! I'm not sure why my MAKEOPTS is set to that. The portage build.conf has it set to j1 and .bashrc in the home directory of root has the export MAKEOPTS line commented out.

I'm sorry for posting contradicting information, I had no idea! I'll get back to you shortly after trying what you've recommended.
Back to top
View user's profile Send private message
circuit_rider
n00b
n00b


Joined: 21 Jun 2017
Posts: 5

PostPosted: Wed Jun 21, 2017 10:32 pm    Post subject: Reply with quote

NeddySeagoon wrote:

To avoid hunting that down right now, from the console, no Xorg, as root run
Code:
MAKEOPTS="-j1" emerge =dev-libs/boost-1.62.0-r1 -av1
and post the build log if it fails.
You are saying one thing and posting files that show something different. We need a self consistent data set to work with.


This worked :D

How would one identify the source of the MAKEOPTS value that was overriding portage/make.conf ?

I'm very much curious to learn more.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13845

PostPosted: Thu Jun 22, 2017 12:41 am    Post subject: Reply with quote

The first paragraph of man 5 make.conf describes the order in which Portage searches to get these variables. The most likely culprit is that you exported it into your process environment. If you still have the shell in which Portage was running excess jobs, run env to see the exported variables.
Back to top
View user's profile Send private message
kkinkouu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2015
Posts: 91
Location: United Kingdom

PostPosted: Thu Jun 29, 2017 6:36 pm    Post subject: Reply with quote

NeddySeagoon wrote:
I prefer
Code:
I_KNOW_WHAT_I_AM_DOING="maybe"
:)


LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum