Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net-im/fractal: fails to build on aarch64 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
vimja
n00b
n00b


Joined: 26 Mar 2022
Posts: 21
Location: Bern, Switzerland

PostPosted: Mon Feb 05, 2024 10:29 am    Post subject: net-im/fractal: fails to build on aarch64 [SOLVED] Reply with quote

Hi

I'm trying to build net-im/fractal on aarch64. It works just fine on my x86_64 desktop, so I was hoping I could use it on my ARM laptop, too.

The laptop itself has a Cortex-A53, but I'm building binary packages for it on a VM powered by Ampere CPUs.

Unfortunately, the build fails quite far in.

Here is my emerge --info '=net-im/fractal-6_rc::gentoo' output: https://pastebin.com/ikRxGdBZ

Also the output for emerge -pqv '=net-im/fractal-6_rc::gentoo': :
Code:
[ebuild  N    ] net-im/fractal-6_rc  USE="-debug"


The buidl log can be found here: https://vimja.website/build.log

Any help would be much appreciated.


Last edited by vimja on Tue Feb 06, 2024 10:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31288
Location: here

PostPosted: Mon Feb 05, 2024 12:08 pm    Post subject: Reply with quote

Code:
 (signal: 9, SIGKILL: kill)

Usually this is an out of memory error.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31288
Location: here

PostPosted: Mon Feb 05, 2024 12:08 pm    Post subject: Reply with quote

Moved from Portage & Programming to Gentoo on ARM.
_________________
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: 54594
Location: 56N 3W

PostPosted: Mon Feb 05, 2024 12:51 pm    Post subject: Reply with quote

KiB Mem: 15969104 total, 13912944 free
KiB Swap: 0 total, 0 free
MAKEOPTS="-j9"

That's a bit aggressive.

Allow 2G RAM for every parallel make, so the build system may want 18G RAM.
You need some, the kernel needs some. For big packages MAKEOPTS="-j5" would be safer.
Set MAKEOPTS on a per package basis if you wish.

I'm testing an aarch64 build for Pi4 as I write. Its currently building with.
Code:
COMMON_FLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto"


I can test on Pi5 too but that's -mcpu=cortex-a76.

I'll post back when I know the outcome
_________________
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
vimja
n00b
n00b


Joined: 26 Mar 2022
Posts: 21
Location: Bern, Switzerland

PostPosted: Mon Feb 05, 2024 1:14 pm    Post subject: Reply with quote

Man, you guys are probably right! Usually I manage to figure this out on my own. Even have package.env for a number of ebuilds to lower to core count on them. Must have had a brain fart this time around :oops: dmesg even shows the OOM message :x Started a new try with -j5 and will let you know how it went.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 05, 2024 3:40 pm    Post subject: Reply with quote

vimja,

The Pi5 ran out of RAM.

My Pi4 build system ended up with
Code:
error: linking with `aarch64-unknown-linux-gnu-gcc` failed: exit status: 1


-- edit --

It builds for Pi4 but not with my default linker.
Code:
CFLAGS="${CFLAGS} -fuse-ld=lld" CXXFLAGS="${CXXFLAGS} -fuse-ld=lld" emerge net-im/fractal -av
worked here.
_________________
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
vimja
n00b
n00b


Joined: 26 Mar 2022
Posts: 21
Location: Bern, Switzerland

PostPosted: Mon Feb 05, 2024 8:31 pm    Post subject: Reply with quote

I'm still going OOM even if I compile on only a single core.

The memory overhead on the system is less than 300 MiB, so I would really think that there would be plenty of RAM available for this :(

Code:

error: could not compile `fractal` (bin "fractal")

Caused by:
  process didn't exit successfully: `rustc --crate-name fractal --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto=thin -C codegen-units=1 -C debuginfo=2 -C metadata=34feb6291d2c67c6 -C extra-filename=-34feb6291d2c67c6 --out-dir /var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps -L dependency=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps --extern ashpd=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libashpd-8a873c86486a1797.rlib --extern djb_hash=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libdjb_hash-b39c139d0dca9c21.rlib --extern eyeball_im=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libeyeball_im-2456271c4b9a4828.rlib --extern futures_channel=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libfutures_channel-f3dc00ab021514f3.rlib --extern futures_util=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libfutures_util-0ba4455b4f483998.rlib --extern geo_uri=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgeo_uri-673c44de3c37a398.rlib --extern gettextrs=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgettextrs-59a5742fb1fdc46b.rlib --extern gst_gtk=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstgtk4-e707980b64a22828.rlib --extern gst=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstreamer-c89b05d93765e451.rlib --extern gst_base=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstreamer_base-2cef36bc5cb62946.rlib --extern gst_pbutils=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstreamer_pbutils-cb38e929a3593a98.rlib --extern gst_play=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstreamer_play-499fba0c83b05c99.rlib --extern gst_video=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgstreamer_video-ccdbf0f140eac2db.rlib --extern gtk=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libgtk4-6d0248e12f3a9154.rlib --extern html_escape=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libhtml_escape-fa78698a46a24c2d.rlib --extern html2pango=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libhtml2pango-9e02dab052df66ea.rlib --extern html5gum=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libhtml5gum-2f929bf2736ac50b.rlib --extern image=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libimage-e8e7cc3e418e4353.rlib --extern indexmap=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libindexmap-5af432acd5a1d4ee.rlib --extern adw=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/liblibadwaita-169224cebe4580f0.rlib --extern shumate=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/liblibshumate-6c6ff1d92cc19275.rlib --extern matrix_sdk=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libmatrix_sdk-eda22207aea06d4f.rlib --extern matrix_sdk_ui=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libmatrix_sdk_ui-738434acaa4412df.rlib --extern mime=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libmime-7a8ba327e1cdb462.rlib --extern mime_guess=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libmime_guess-54c54898ef9266cf.rlib --extern once_cell=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libonce_cell-51784eb644589e9e.rlib --extern oo7=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/liboo7-d4c3d480a4f4637b.rlib --extern pulldown_cmark=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libpulldown_cmark-5a7ea36043ca1a16.rlib --extern qrcode=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libqrcode-e62efc7e8ee76c2d.rlib --extern rand=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/librand-c0d343139a4be6a9.rlib --extern regex=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libregex-6193bee2c0b6bd4f.rlib --extern rmp_serde=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/librmp_serde-2fa05e1cd9d799c1.rlib --extern rqrr=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/librqrr-36cd7950249a8bb5.rlib --extern ruma=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libruma-3270c81b1a835425.rlib --extern secular=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libsecular-42f96384afed00a7.rlib --extern serde=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libserde-b3120b7b905c080a.rlib --extern serde_json=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libserde_json-e78f4b47b41c5c09.rlib --extern sourceview=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libsourceview5-64f5a2c95c90a89d.rlib --extern strum=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libstrum-5f6ae88a0d9b91cc.rlib --extern thiserror=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libthiserror-90eaf72d04bd75cd.rlib --extern tokio=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libtokio-cf2712845228402d.rlib --extern tracing=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libtracing-5b77a3a60298a238.rlib --extern tracing_subscriber=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/libtracing_subscriber-b22e8d0d7c71bc25.rlib --extern url=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/deps/liburl-26f7b397bc566313.rlib -L native=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/build/libspa-a73b8d14af3480a2/out -L native=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/build/libspa-sys-4ece5b1178901e5b/out -L native=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/build/ring-32860a13f8a75f21/out -L native=/var/tmp/portage/net-im/fractal-6_rc/work/fractal-6_rc-build/src/release/build/blake3-4086add9c33d571f/out` (signal: 9, SIGKILL: kill)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 05, 2024 8:59 pm    Post subject: Reply with quote

vimja,

The Pi5, with 8G RAM and 8G swap is really struggling. Both are full, so its thrashing.
It took about 15 min to open htop in an already running ssh session.

See [Solved] Emerge ignores makeopt for particular package
It looks like we need to set NINJAOPTS=

-- edit --

My Pi4 binary package is on my binhost
_________________
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
vimja
n00b
n00b


Joined: 26 Mar 2022
Posts: 21
Location: Bern, Switzerland

PostPosted: Tue Feb 06, 2024 10:10 pm    Post subject: Reply with quote

It was definitely the RAM. Building with -j1 did not solve the issue, but adding 16 GiB SWAP on top the 16 GiB RAM solved the issue, even with -j5.

Thank you for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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