Mailing List Archive

btop fails to compile
Hi,

on my Hetzner server btop fails to compile. If I go to the build
directory and compile it manuallly (just type make) it compiles fine.

* Package: sys-process/btop-1.2.12:0
* Repository: gentoo
* Maintainer: nex+b-g-o@nexadn.de proxy-maint@gentoo.org
* Upstream: https://github.com/aristocratos/btop/issues
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: network-sandbox preserve-libs sandbox userpriv
usersandbox
>>> Unpacking source...
>>> Unpacking btop-1.2.12.tar.gz to
>>> /var/tmp/portage/sys-process/btop-1.2.12/work
>>> Source unpacked in /var/tmp/portage/sys-process/btop-1.2.12/work
>>> Preparing source in
>>> /var/tmp/portage/sys-process/btop-1.2.12/work/btop-1.2.12 ...
* Applying 876319-verbose-makefile.patch ...
[ ok ]
>>> Source prepared.
>>> Configuring source in
>>> /var/tmp/portage/sys-process/btop-1.2.12/work/btop-1.2.12 ...
>>> Source configured.
>>> Compiling source in
>>> /var/tmp/portage/sys-process/btop-1.2.12/work/btop-1.2.12 ...
make -j17 -l17 VERBOSE=true OPTFLAGS= CXX=x86_64-pc-linux-gnu-g++

??????? ????????? ??????? ???????
?????????????????????????????????? ??? ???
???????? ??? ??? ??????????? ??????????????
???????? ??? ??? ?????????? ??????????????
???????? ??? ???????????? ??? ???
??????? ??? ??????? ??? Makefile v1.5
PLATFORM ?| Linux
ARCH ?| amd64
CXX ?| x86_64-pc-linux-gnu-g++ (11.3.0)
THREADS :| 16
REQFLAGS !| -std=c++20
WARNFLAGS :| -Wall -Wextra -pedantic
OPTFLAGS :|
LDCXXFLAGS :| -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS
-fexceptions -fstack-clash-protection -fcf-protection -fstack-protector
CXXFLAGS +| $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) -O2
-march=znver2 -pipe
LDFLAGS +| $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) -Wl,-O1
-Wl,--as-needed

Building btop++ (v1.2.12) Linux amd64
Compiling src/linux/btop_collect.cpp
x86_64-pc-linux-gnu-g++ -O2 -march=znver2 -pipe -std=c++20 -pthread
-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-clash-protection -fcf-protection -fstack-protector -Wall
-Wextra -pedantic -Iinclude -Isrc -MMD -c -o obj/linux/btop_collect.o
src/linux/btop_collect.cpp
Assembler messages:
Fatal error: can't create obj/linux/btop_collect.o: No such file or
directory
make: *** [Makefile:269: obj/linux/btop_collect.o] Error 1
* ERROR: sys-process/btop-1.2.12::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info
'=sys-process/btop-1.2.12::gentoo'`,
* the complete build log and the output of `emerge -pqv
'=sys-process/btop-1.2.12::gentoo'`.
* The complete build log is located at
'/var/tmp/portage/sys-process/btop-1.2.12/temp/build.log'.
* The ebuild environment file is located at
'/var/tmp/portage/sys-process/btop-1.2.12/temp/environment'.
* Working directory:
'/var/tmp/portage/sys-process/btop-1.2.12/work/btop-1.2.12'
* S: '/var/tmp/portage/sys-process/btop-1.2.12/work/btop-1.2.12'


--
Mit freundlichen Grüßen,
Jochen Kirchner

eMail: jk@jk-foto.design
Web: https://www.jk-foto.design

Public Key: B67B 24AA CB0F E646 8E35 CF12 7FC8 C135 CEEB C714
Re: btop fails to compile [ In reply to ]
On 2022-11-30, Jochen Kirchner wrote:

[...]
> make -j17 -l17 VERBOSE=true OPTFLAGS= CXX=x86_64-pc-linux-gnu-g++

Can you try emerging with -j1 in MAKEOPTS?

Sadly, the makefile[1] does not print out the mkdir commands (recipe on
lines 202 thru 204), so it's not possible to spot in the output when are
these being executed, but, from a quick glance (I might have overlooked
something!), it sounds like the target that runs mkdir is not a
dependency of the targets that generate and link the object files (line
262, line 273), so it'd be possible for this to happen just because
the second mkdir did not complete before the first g++ was checking for
the directory.

[1] https://github.com/aristocratos/btop/blob/main/Makefile

--
Nuno Silva
Re: Re: btop fails to compile [ In reply to ]
Nuno Silva wrote:
> On 2022-11-30, Jochen Kirchner wrote:
>
> [...]
>> make -j17 -l17 VERBOSE=true OPTFLAGS= CXX=x86_64-pc-linux-gnu-g++
> Can you try emerging with -j1 in MAKEOPTS?
>
> Sadly, the makefile[1] does not print out the mkdir commands (recipe on
> lines 202 thru 204), so it's not possible to spot in the output when are
> these being executed, but, from a quick glance (I might have overlooked
> something!), it sounds like the target that runs mkdir is not a
> dependency of the targets that generate and link the object files (line
> 262, line 273), so it'd be possible for this to happen just because
> the second mkdir did not complete before the first g++ was checking for
> the directory.
>
> [1] https://github.com/aristocratos/btop/blob/main/Makefile
>


That's a good idea.  Just to test if that error happens to everybody, I
installed btop-1.2.12 here.  Actually, it's kinda neat looking.  Anyway,
it installed fine here on my 8 core machine with normal -j settings, -j9
I think.  It could help using -j1 tho.  Still, it installed here without
any problems. 

If -j1 doesn't work, maybe sync the tree again to see if maybe some typo
got fixed or something else was wrong during last sync.  That is rare
nowadays but when grasping at straws, grab what you can. 

Oh, my google search earlier didn't yield anything either.  This seems
to be a odd failure.

Dale

:-)  :-) 
Re: Re: btop fails to compile [ In reply to ]
Am 2022-11-30 12:45, schrieb Dale:
> Nuno Silva wrote:
>> On 2022-11-30, Jochen Kirchner wrote:
>>
>> [...]
>>> make -j17 -l17 VERBOSE=true OPTFLAGS= CXX=x86_64-pc-linux-gnu-g++
>> Can you try emerging with -j1 in MAKEOPTS?
>>
>> Sadly, the makefile[1] does not print out the mkdir commands (recipe
>> on
>> lines 202 thru 204), so it's not possible to spot in the output when
>> are
>> these being executed, but, from a quick glance (I might have
>> overlooked
>> something!), it sounds like the target that runs mkdir is not a
>> dependency of the targets that generate and link the object files
>> (line
>> 262, line 273), so it'd be possible for this to happen just because
>> the second mkdir did not complete before the first g++ was checking
>> for
>> the directory.
>>
>> [1] https://github.com/aristocratos/btop/blob/main/Makefile
>>
>
>
> That's a good idea.  Just to test if that error happens to everybody, I
> installed btop-1.2.12 here.  Actually, it's kinda neat looking. 
> Anyway,
> it installed fine here on my 8 core machine with normal -j settings,
> -j9
> I think.  It could help using -j1 tho.  Still, it installed here
> without
> any problems. 
>
> If -j1 doesn't work, maybe sync the tree again to see if maybe some
> typo
> got fixed or something else was wrong during last sync.  That is rare
> nowadays but when grasping at straws, grab what you can. 
>
> Oh, my google search earlier didn't yield anything either.  This seems
> to be a odd failure.
>
> Dale
>
> :-)  :-) 

Thank you both :)

-j1 did it :)

this is my make.conf: (its a web - and mail server)

COMMON_FLAGS="-O2 -march=znver2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

MAKEOPTS="-j17 -l17"
PORTAGE_NICENESS="1"
EMERGE_DEFAULT_OPTS="--jobs=17 --load-average=17 --with-bdeps y
--complete-graph y"
FEATURES="candy fixlafiles unmerge-orphans parallel-install split-elog"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE"
GENTOO_MIRRORS="https://ftp.tu-ilmenau.de/mirror/gentoo/
https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/
https://mirror.leaseweb.com/gentoo/
https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/
https://ftp.fau.de/gentoo https://ftp.halifax.rwth-aachen.de/gentoo/"

USE="-bindist -systemd acpi avif berkdb branding brotli cgi clamav crypt
cryptsetup dbus \
device-mapper elogind exif fastcgi ftp gd geoip geoip2 gif git
gmp gpg hddtemp heif hwloc \
icu idn imagemagick imap inotify jpeg jpeg2k llvm llvm-libunwind
lm-sensors maildir memcached \
mmap mysql mysqli offensive php png samba sasl smp soap sockets
subversion tidy \
truetype udev udisks verify-sig vhosts vim-syntax webp xml
xmlrpc zip zstd"

NGINX_MODULES_HTTP="access addition auth_basic autoindex brotli browser
charset dav dav_ext echo \
empty_gif fancyindex fastcgi geo geoip geoip2 grpc gunzip gzip
headers_more limit_conn \
limit_req map memcached metrics mirror mp4 proxy realip referer
rewrite scgi security \
split_clients ssi stub_status upstream_hash upstream_ip_hash
upstream_keepalive \
upstream_least_conn upstream_zone userid uwsgi
vhost_traffic_status xslt"
NGINX_MODULES_MAIL="imap smtp"
NGINX_MODULES_STREAM="geo geoip geoip2 realip upstream_hash
upstream_least_conn upstream_zone"
PHP_TARGETS="php8-0"

GRUB_PLATFORMS="pc"

--
Mit freundlichen Grüßen,
Jochen Kirchner

eMail: jk@jk-foto.design
Web: https://jk-foto.design

Public Key: B67B 24AA CB0F E646 8E35 CF12 7FC8 C135 CEEB C714
Re: Re: btop fails to compile [ In reply to ]
On Wed, Nov 30, 2022 at 01:50:02PM +0100, Jochen Kirchner wrote

> this is my make.conf: (its a web - and mail server)
>
> MAKEOPTS="-j17 -l17"

Ouch!!! How much ram do you have on that machine? The Gentoo install
handbook has a dire warning at...

https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#MAKEOPTS

...that you need approx 2 gigabytes free ram for each increment in
"MAKEOPTS".

> * Warning
> Using a large number of jobs can significantly impact memory
> consumption. A good recommendation is to have at least 2 GiB of RAM
> for every job specified (so, e.g. -j6 requires at least 12 GiB). To
> avoid running out of memory, lower the number of jobs to fit the
> available memory.

If you have a fancy-schmancy "desktop environment" allow another 3 or
4 Gigs, especially if you're simultaneously running Chrome or
calculating large spreadsheets or processing large documents. For
"MAKEOPTS=-j17" you'll need at least 36-to-40 gigabytes.

--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Re: Re: btop fails to compile [ In reply to ]
On Monday, 5 December 2022 06:30:22 GMT Walter Dnes wrote:
> On Wed, Nov 30, 2022 at 01:50:02PM +0100, Jochen Kirchner wrote
>
> > this is my make.conf: (its a web - and mail server)
> >
> > MAKEOPTS="-j17 -l17"
>
> Ouch!!! How much ram do you have on that machine? The Gentoo install
> handbook has a dire warning at...
>
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#MAKEOPTS
>
> ...that you need approx 2 gigabytes free ram for each increment in
> "MAKEOPTS".
>
> > * Warning
> > Using a large number of jobs can significantly impact memory
> > consumption. A good recommendation is to have at least 2 GiB of RAM
> > for every job specified (so, e.g. -j6 requires at least 12 GiB). To
> > avoid running out of memory, lower the number of jobs to fit the
> > available memory.
>
> If you have a fancy-schmancy "desktop environment" allow another 3 or
> 4 Gigs, especially if you're simultaneously running Chrome or
> calculating large spreadsheets or processing large documents. For
> "MAKEOPTS=-j17" you'll need at least 36-to-40 gigabytes.

Well, I've seen that warning, and I run a plasma desktop, but I set -j48 --
jobs=48 --load-average=72 without noticeable swapping in this 64GB, 24-core
Ryzen 9 5900X machine. The one exception is qtwebengine, which wants 48GB
for itself.

--
Regards,
Peter.
Re: Re: btop fails to compile [ In reply to ]
Am 2022-12-05 07:30, schrieb Walter Dnes:
> On Wed, Nov 30, 2022 at 01:50:02PM +0100, Jochen Kirchner wrote
>
>> this is my make.conf: (its a web - and mail server)
>>
>> MAKEOPTS="-j17 -l17"
>
> Ouch!!! How much ram do you have on that machine? The Gentoo
> install
> handbook has a dire warning at...
>
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#MAKEOPTS
>
> ...that you need approx 2 gigabytes free ram for each increment in
> "MAKEOPTS".
>
>> * Warning
>> Using a large number of jobs can significantly impact memory
>> consumption. A good recommendation is to have at least 2 GiB of RAM
>> for every job specified (so, e.g. -j6 requires at least 12 GiB). To
>> avoid running out of memory, lower the number of jobs to fit the
>> available memory.
>
> If you have a fancy-schmancy "desktop environment" allow another 3 or
> 4 Gigs, especially if you're simultaneously running Chrome or
> calculating large spreadsheets or processing large documents. For
> "MAKEOPTS=-j17" you'll need at least 36-to-40 gigabytes.

Hi,

it's a Hetzner dedicated Server with 64GB of ram :)
But now I switched to Netcup.de kvm server.

---
Mit freundlichen Grüßen,
Jochen Kirchner

eMail: jk@jk-foto.design
Web: https://www.jk-foto.design