Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
idle pc. make it compile for rpi. but how? [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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Mon Mar 16, 2020 9:17 pm    Post subject: idle pc. make it compile for rpi. but how? [solved] Reply with quote

Hello gentoo rpi people. very rare people in deed ;)

I have not turned on my pc in a month now...?
Builds on genpi64 are few, thanks to binaries, but still kind of long.
I remembered a mention, that pc could do the heavy work of compiling

I have read Sakakis instructions here:
https://github.com/sakaki-/gentoo-on-rpi-64bit/wiki/Set-Up-Your-Gentoo-PC-for-Cross-Compilation-with-crossdev
and first question is how do I check if my main Portage tree does not use checksummed manifests? (As, is it safe to skip the step mentioned in upper link)

And then there is this link for compiling rpi's kernel:
https://github.com/sakaki-/gentoo-on-rpi-64bit/wiki/Build-an-RPi4-64bit-Kernel-on-your-crossdev-PC
so this I can skip too, right?

And this is enabling service:
https://github.com/sakaki-/gentoo-on-rpi-64bit/wiki/Set-Up-Your-crossdev-PC-for-Distributed-Compilation-with-distcc
ok, but which ip should i use in /etc/conf.d/distccd, pc's or rpi's? I presume rpi's?
and can I skip this service? I need this just for me.

let say on my pc I make a toolchain, and configure and start distcc server, how now the whole thing works?
I am missing something, do I compile on my pc's terminal and than transfere those files over to rpi?
Do i run in rpi's terminal only, and what do I run?

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass


Last edited by while true on Thu Mar 26, 2020 9:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Mar 16, 2020 10:10 pm    Post subject: Reply with quote

while true,

Compiling on the Pi is called native compiling. We are all familiar with that.

Compiling binaries on the PC to run on the Pi is cross compiling.
Its success depends on build system support, which is variable.

Compiling on the Pi with a PC helping is called cross distcc.
The Pi does the configure, preprocess and link steps. The PC does the compiling.

All three methods have their advantages and disadvantages.

For completeness, its possible to use QEMU to execute arm64 code in an arm64 chroot on a PC.
QEMU emulates the arm CPU in software, so its slow.

When you install the arm64 cross toolchain with crossdev, you will get an 'empty' arm64 root filesystem too.
Fix the profile, and you can try cross compiling. glibc is a good test.

On the Pi, /etc/distcc/hosts contains a list of helpers. The Pi will be used as a fallback anyway, so should be listed last or not at all.
Set up the PC to listen for cries for help.
On the Pi, run FEATURES=distcc emerge ... and the PC will help with C and C++ bun not rust etc.

Preprocessed sources are sent over the network from the Pi to the PC.
The PC returns compiled binaries ready to be linked on the Pi

Run the distcc monitor on the PI.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 17, 2020 8:12 am    Post subject: Reply with quote

Hello NeaddySeagoon,

I read your prompt response yesterday, and now again.

aha, 3 ways, sounds like cross distcc is the one i am after.
So lan is a must. Is wifi connection ok or does it have to be wired?
from here on I am a bit free falling...

that qemu thing will just skip over,
i appretiate the volume of knowleadge torrenting from you,
but my input bandwidth is small.

i need some clarifications please, when you say
"install the arm64 cross toolchain with crossdev,"
that is first and third link from my first post, but not 2nd?
From here, for me, is quite a jump to understand
how to fix the profile or how to test to cross compile glibc on pc

on rpi i found /etc/distcc/hosts , so i guess pc lan ip with some commands, i can do that.
and from there on, on rpi instead of usual
# genup
I go
# FEATURES=distcc genup
? This also i can do.

$ distcc monitor
distcc[9109] (dcc_parse_hosts) Warning: /etc/distcc/hosts contained no hosts; can't distribute work
distcc[9113] (dcc_execvp) ERROR: failed to exec monitor: No such file or directory
distcc[9109] ERROR: compile (null) on localhost failed with exit code 110

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Mar 17, 2020 6:49 pm    Post subject: Reply with quote

while true,

Step 1
Sakaki goes into more detail, like not using the default overlay for the ebuilds that crossdev needs.
Sakaki also suggests using the stable tool chain. That's the -S in
Code:
crossdev -S


Its essential that the versions of gcc on the Pi and the cross gcc you will use are identical, so you way want to force a crossdev gcc version.
gcc can be cross compiled but its not one of the easiest to do, so that's something for another day.

When crossdev completes, think of /usr/aarch64-unknown-linux-gnu/ as if it was a complete Gentoo install far an arm64 system.
It has its own /etc/portage and so on. When you tell emerge to build for arm64, the arm64 binaries are installed here but the cross toolchain on the host, outside of /usr/aarch64-unknown-linux-gnu/ is used for the compiling.
The /etc/portage inside of /usr/aarch64-unknown-linux-gnu/ is used for the build, so

'Fixing your profile' refers to Sakakis
Code:
gentoo_pc ~ # cd /usr/aarch64-unknown-linux-gnu/etc/portage
gentoo_pc portage # rm -f make.profile
gentoo_pc portage # ln -s /usr/portage/profiles/default/linux/arm64/17.0/desktop make.profile

That is only required for pure cross compiling with emerge.

-- edit --

genup will not use distcc as it installs binary packages.
distcc will onlf be used for the compile phase of C and C++ programs.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 17, 2020 7:32 pm    Post subject: Reply with quote

Hello NeaddySeagoon,

Mister, thank you, but we will have to pull a handbreak on this one. For now.
So this morning I decided to clean up my pc from dust,
I opened sides and blow away dust. Like every several months.
But pc wont bring it self up. Fans start for a second and everything stops.
So i made me quite a dish that i have to eat...
I wll come back to this as soon as I figure out what is wrong with my pc.

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 24, 2020 8:27 am    Post subject: Reply with quote

Hello NeddySeagoon

(ok, i got new psu for my pc, system is updated)...aaaand:
Code:
~/# aarch64-unknown-linux-gnu-gcc --version
aarch64-unknown-linux-gnu-gcc (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/# aarch64-unknown-linux-gnu-c++ --version
aarch64-unknown-linux-gnu-c++ (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/# aarch64-unknown-linux-gnu-g++ --version
aarch64-unknown-linux-gnu-g++ (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/# cd /etc/conf.d/
|--------------->
/etc/conf.d/# ls distccd
ls: cannot access 'distccd': No such file or directory
|--------------->
/etc/conf.d/#


so on pc i do not have /etc/conf.d/distccd file to edit,
should i touch it and paste in it:
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
but which ip do I put here, pc or raspberry's? (and do I leave /24 at the end?)

on raspberry, i uncommented line in file /etc/distcc/hosts, that looks like this: 192.168.1.106/10,lzo,cpp, with PC's ip
Code:
$ distcc monitor
distcc[3362] (dcc_execvp) ERROR: failed to exec monitor: No such file or directory
distcc[3361] ERROR: compile (null) on localhost failed with exit code 110


squeek, squeek..

Thank you ;)
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Mar 24, 2020 10:39 am    Post subject: Reply with quote

while true,

Did you install distcc on both systems?

Its both a client and a server. Its the same package but it has two different configurations.
One on the Pi, the other on the PC.

For completeness, distcc can be configured as both a client an a server at the same time.
You would normally only do that in a "compile farm" where any system needs to be able to use all the resources of the compile farm.

On the PC install distcc.
Configure /etc/conf.d/distccd and start the service. Its now listening for distcc jobs.
Code:
$ ps -Alf | grep distcc
4 S distcc    1780     1  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1786  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1896  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1928  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1929  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1930  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1931  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1932  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15
1 S distcc    1933  1780  0  95  15 -   749 -      Mar02 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-file /var/log/distccd --log-level debug --allow 192.168.100.0/24 --allow 127.0.0.0/8 -N 15


That's the PC end.

On the Pi, configure the other bit of distcc.
That's /etc/distcc/hosts. Put the IP address of your helpers there. Optionally followed by the number of jobs to send to that helper
Code:
192.168.100.20/8,cpp,lzo


192.168.100.20/8 allows distcc to send 8 jobs to 192.168.100.20. cpp says to use pump mode. Don't use that, its bpoken and no longer supported by portage. lzo says to use compression over the network.
Compression is not always faster.

Edit make.conf to add distcc to your FEATURES, so portage uses distcc.

Build glibc on the Pi to test.

Big WARNING
The native compiler on the Pi and all the cross compilers on helpers must be identical versions or you risk building broken code.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 24, 2020 11:41 am    Post subject: Reply with quote

Hello NeddySeagoon

No i have not emerged distcc on both systems, only on pc,
so let me do it now on rpi too, and by magic of editing
it is compiled without complaining for keywords ;)

This completeness, configuring as client and server, I presume rpi is client and pc is server?

On pc, I do not have /etc/conf.d/distccd file, I touched it and in it put just one line: DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.100/24", that is pc's ip.
Code:
"distccd" [New] 12L, 67C written
|--------------->
/etc/conf.d/# rc-update add distccd default
 * rc-update: service `distccd' does not exist
|--------------->
/etc/conf.d/#

on RPi's side, in /etc/distcc/hosts I put just: 192.168.1.100/8
so no compression and no pump mode, just 8 jobs.
in make.conf i uncommented existing line so it says: FEATURES="${FEATURES} distcc distcc-pump"
but should I remove distcc-pump part, since I put 192.168.1.100/8 in /etc/distcc/hosts?
Code:
mali@pali ~ $ sudo rc-update add distccd default
 * service distccd added to runlevel default
mali@pali ~ $ sudo rc-config start distccd
Starting init script
 * Starting distccd ...                                                   [ ok ]
mali@pali ~ $ ps -Alf | grep distcc
4 S distcc   17877     1  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17882 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17935 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17936 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17974 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17975 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   18013 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
0 S mali     21613  4128  0  80   0 -  2561 pipe_w 12:21 pts/8    00:00:00 grep --color=auto distcc
mali@pali ~ $

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Mar 24, 2020 12:54 pm    Post subject: Reply with quote

while true,

The easy bit first.

distcc-pump is ignored by portage and you don't have pump mode enabled in /etc/distcc/hosts either.

FEATURES is additive, like USE.
So FEATURES="dstcc" adds distcc to whatever FEATURES are already set.
The ${FEATURES} is harmless but not required.

On your PC
Code:
emerge distcc
provides /etc/conf.d/distccd.
Either the emerge failed because of file collisions or portage treated the /etc/conf.d/distccd file as an update, so you need to run etc-update to overwrite the file you created.
Then you can edit /etc/conf.d/distccd in the normal way.

The Pi will have a default /etc/conf.d/distccd if you want to look at it.
Its not used there as the Pi is not a helper.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 24, 2020 1:56 pm    Post subject: Reply with quote

Hello NeddySeagoon

on pc:
for some reason emerge distcc did emerge 2 packages,
(i swear i emerged it yesterday, it was fast, I am sorry)

So per instructions I commented in (as it will NOT be read) all lines that have DISTCCD_OPTS entry, and left just two:
DISTCCD_OPTS=""
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.100/24"

Code:
/etc/conf.d/# rc-update add distccd default
 * service distccd added to runlevel default
|--------------->
/etc/conf.d/# rc-config start distccd
Starting init script
 * Caching service dependencies ...                                       [ ok ]
 * Starting distccd ...                                                   [ ok ]
|--------------->
/etc/conf.d/# ps -Alf | grep distcc
4 S distcc   27587     1  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27589 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27595 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27596 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27597 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27598 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27599 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27600 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27601 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27602 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
1 S distcc   27603 27587  0  85   5 -   780 -      14:16 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --allow 192.168.1.100/24
0 S root     27643 27629  0  80   0 -  3224 -      14:39 pts/2    00:00:00 grep --colour=auto distcc
|--------------->
~/# aarch64-unknown-linux-gnu-gcc --version
aarch64-unknown-linux-gnu-gcc (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/# aarch64-unknown-linux-gnu-c++ --version
aarch64-unknown-linux-gnu-c++ (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/# aarch64-unknown-linux-gnu-g++ --version
aarch64-unknown-linux-gnu-g++ (Gentoo 9.2.0-r2 p3) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

|--------------->
~/#

right, it pc serving now?

over on RPi, I just emerged distccd, and enabled deamon, i did not go with all the steps i went with pc, or should I?

Code:
mali@pali ~ $ aarch64-unknown-linux-gnu-gcc --version
aarch64-unknown-linux-gnu-gcc (Gentoo 9.2.0-r4 p5) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mali@pali ~ $ aarch64-unknown-linux-gnu-c++ --version
aarch64-unknown-linux-gnu-c++ (Gentoo 9.2.0-r4 p5) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mali@pali ~ $ aarch64-unknown-linux-gnu-g++ --version
aarch64-unknown-linux-gnu-g++ (Gentoo 9.2.0-r4 p5) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mali@pali ~ $ ps -Alf | grep distcc
0 S mali     11351 29098  0  80   0 -  2561 pipe_w 14:48 pts/5    00:00:00 grep --color=auto distcc
4 S distcc   17877     1  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17882 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17935 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17936 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17974 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   17975 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
1 S distcc   18013 17877  0  95  15 -   755 -      12:18 ?        00:00:00 /usr/bin/distccd --user distcc --daemon --no-detach --port 3632 --log-level critical --allow 192.168.0.0/24 -N 15
mali@pali ~ $

glibc is binary, so this will be done on RPi?
Code:
mali@pali ~ $ sudo emerge glibc

Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.
Calculating dependencies... done!
>>> Running pre-merge checks for sys-libs/glibc-2.30-r4
 * Checking general environment sanity.
aarch64-unknown-linux-gnu-gcc  -march=armv8-a+crc -mtune=cortex-a72 -pipe -O2   -Wl,-O1 -Wl,--as-needed  glibc-test.c   -o glibc-test
 * Checking gcc for __thread support ...                                 [ ok ]
 * Checking running kernel version (4.19.106-v8-742cb761fa7f-p4-bis+ >= 3.2.0) ...                                                                       [ ok ]
 * Checking linux-headers version (4.19.0 >= 3.2.0) ...                  [ ok ]
>>> Emerging binary (1 of 1) sys-libs/glibc-2.30-r4::gentoo
>>> Installing (1 of 1) sys-libs/glibc-2.30-r4::gentoo
>>> Recording sys-libs/glibc in "world" favorites file...
>>> Jobs: 1 of 1 complete                           Load avg: 1.63, 0.85, 1.05

 * Messages for package sys-libs/glibc-2.30-r4:

 * You have the distcc FEATURE set, glibc may not build correctly
 * Consider restricting via /etc/portage/{env,package.env}
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
mali@pali ~ $


I need to test this with some build, right? hoe to tel emerge to build it?

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Mar 24, 2020 6:52 pm    Post subject: Reply with quote

while true,

On the Pi
while true wrote:
emerged distccd, and enabled deamon

Emerging distcc is required. Enabling the deamon is not. The deamon is only for helpers.

On the Pi you set /etc/distcc/hosts to point to your helpers and add distcc to FEATURES

Code:
 * You have the distcc FEATURE set, glibc may not build correctly
 * Consider restricting via /etc/portage/{env,package.env}
is a new warning to me.
You are going to need to set up /etc/portage/{env,package.env} to not use distcc on some packages.
Maybe glibc was a bad package for testing with.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Tue Mar 24, 2020 8:23 pm    Post subject: Reply with quote

Hey NeaddySeagoon,

on pi:
Code:
mali@pali ~ $ sudo /etc/init.d/distccd status
 * status: stopped
mali@pali ~ $ cat /etc/distcc/hosts | grep "1.100"
#192.168.1.100/10,lzo,cpp
192.168.1.100/8
mali@pali ~ $ sudo cat /etc/portage/make.conf | grep FEATURES
FEATURES="${FEATURES} buildpkg"
#FEATURES="${FEATURES} distcc distcc-pump"
FEATURES="${FEATURES} distcc"
FEATURES="${FEATURES} getbinpkg"
mali@pali ~ $


I will look for some build package to compile and report back.

EDIT:
Code:
mali@pali ~ $ sudo emerge dillo

Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 3) net-libs/mbedtls-2.19.1-r2::gentoo
>>> Emerging binary (2 of 3) x11-libs/fltk-1.3.5-r4::gentoo
>>> Installing (2 of 3) x11-libs/fltk-1.3.5-r4::gentoo
>>> Installing (1 of 3) net-libs/mbedtls-2.19.1-r2::gentoo
>>> Emerging (3 of 3) www-client/dillo-3.1_p20181005::gentoo
>>> Installing (3 of 3) www-client/dillo-3.1_p20181005::gentoo
>>> Recording www-client/dillo in "world" favorites file...
>>> Jobs: 3 of 3 complete                           Load avg: 1.62, 1.60, 1.50
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
mali@pali ~ $


This does not look like it used pc...?
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Mar 24, 2020 9:27 pm    Post subject: Reply with quote

while true,

Try something you don't already have installed.

What does
Code:
emerge --info
show on the Pi?
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Wed Mar 25, 2020 6:31 am    Post subject: Reply with quote

mali@pali ~ $ emerge --info | wgetpaste
Your paste can be seen here: http://dpaste.com/1AW1G4Q
mali@pali ~ $
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Mar 26, 2020 12:04 am    Post subject: Reply with quote

while true,

Code:
distcc 3.3.3 aarch64-unknown-linux-gnu [enabled]
That's good.

Try
Code:
emerge -1av bash
on the Pi.
That should produce something like
Code:
Calculating dependencies... done!
[ebuild   R    ] app-shells/bash-5.0_p16::gentoo  USE="net nls (readline) -afs -bashlogger -examples -mem-scramble -plugins" 0 KiB
in the output.

Once its past configure, you should see jobs being distributed if you run
Code:
DISTCC_DIR="/var/tmp/portage/.distcc" distccmon-text 5
in another terminal window on the Pi.

Your
Code:
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=4"
does not include anything that says to use binaries, or to be quiet, so emerge should build what you tell it to.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Thu Mar 26, 2020 8:01 am    Post subject: Reply with quote

good morning NeddySeagoon,

on pi, i did ebuild tor, (but i needed to change use -bindist for openssl, openssh, qtnetwork and wpa_supplicant, but that is beside the point, the point is that) it compiled tor and recompiled in brackets mentioned packages, but it looked normal RPi side compilation, no messages of being sent over to pc.
and yesterday i did genup, also without pc's help, but to be fer, i noticed only binery, no ebuilds (i was not looking all the time).

on pi, i have ssh connection to pc, and glances is showing no distcc or any activity, cpus on 0%.

so today:
Code:
mali@pali ~ $ sudo emerge -1av  bash

Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
[binary   R    ] app-shells/bash-5.0_p16::gentoo  USE="net nls (readline) (-afs) -bashlogger -examples -mem-scramble -plugins" 0 KiB

Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Emerging binary (1 of 1) app-shells/bash-5.0_p16::gentoo
>>> Installing (1 of 1) app-shells/bash-5.0_p16::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 0.41, 0.30, 0.50
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * Regenerating GNU info directory index...
 * Processed 114 info files.
mali@pali ~ $

and on other terminal in that time:
Code:
mali@pali ~ $ DISTCC_DIR="/var/tmp/portage/.distcc" distccmon-text 5

^C
mali@pali ~ $

Mister Neddy, I am so sorry and grateful in same breath,
i do not want to cause problems,
i believe i messed up somewhere along installation, on both arhitectures,
so i am wondering how can I check all necessary points?

thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Mar 26, 2020 6:13 pm    Post subject: Reply with quote

while true,

You can make the Pi distribute to itself. Its not very useful but its a good test.
Set up distccd to listen to the Pis network IP address, not localhost, we want traffic to go to the network port.
Start distccd on the Pi.
Edit /etc/distcc/hosts on the Pi to point to the Pis own network IP address.
Now the Pi is helping itself :)

Code:
mali@pali ~ $ DISTCC_DIR="/var/tmp/portage/.distcc" distccmon-text 5
should print a blank line every 5 seconds when there is nothing being distributed.
It will print a line for each distributed job when there are some.

That $ prompt says that you did that as a normal user.
Your normal user may not have any access to /var/tmp/portage/.distcc, that's worth a check before you do the test above.
_________________
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
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 493
Location: Ljubljana, Slovenia

PostPosted: Thu Mar 26, 2020 8:07 pm    Post subject: Reply with quote

Hello NeaddySeagoon,

(as mentioned, I have only emerged distcc on RPi, i did not take the steps in Sakaki's tutorial)
i changed /etc/dstcc/hosts file to point to itself (to RPi's ip):
Code:
mali@pali ~ $ cat /etc/distcc/hosts | grep 192.168
#192.168.1.100/10,lzo,cpp
#192.168.1.100/8
192.168.1.124/4
mali@pali ~ $ rc-config start distccd
Starting init script
 * distccd: superuser access required
mali@pali ~ $ sudo rc-config start distccd
Starting init script
 * Starting distccd ...                                                   [ ok ]
mali@pali ~ $


I found like 17 packages to compile
mali@pali ~ $ sudo emerge glances
and on the other terminal i started getting:
Code:
 21743  Compile     grammar1.c                                    localhost[0]
 21741  Compile     grammar1.c                                    localhost[1]

 22017  Compile     ast.c                                         localhost[0]
 22019  Compile     ast.c                                         localhost[1]

 22364  Compile     mystrtoul.c                                   localhost[0]
 22019  Compile     ast.c                                         localhost[1]

 22387  Compile     Python-ast.c                                  localhost[0]
 22450  Compile     Python-ast.c                                  localhost[1]

 22387  Compile     Python-ast.c                                  localhost[0]
 22450  Compile     Python-ast.c                                  localhost[1]

 23214  Compile     typed_ast.c                                   localhost[0]
 22450  Compile     Python-ast.c                                  localhost[1]


right, so this means... i do not know what it means, but i am guessing RPi's side of settings seems ok?

Thank you ;)


big EDIT!!!

on pc I went back and resteped my installation, only this time i skipped thin-manifests = true thing, and now it is working!
I mean, on RPi emerge side of terminal there is not difference,
but on other terminal there is csrolling output:
Code:
  8505  Compile                                                   localhost[0]

  8586  Compile     events.c                                  192.168.1.100[0]
  8587  Compile     feh_png.c                                 192.168.1.100[1]
  8589  Compile     filelist.c                                192.168.1.100[2]
  8656  Compile     gib_list.c                                192.168.1.100[3]
  8604  Compile     gib_imlib.c                               192.168.1.100[4]

and ssh from RPi to pc shows gcc or other, and cpu spikes.


oh mister Neddy,
I am sorry to take up so much of your time,
i am really gratefull for your input.

Thank you
_________________
Kind regards, Goran Mitic

alive
while true
kick ass


Last edited by while true on Thu Mar 26, 2020 9:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Mar 26, 2020 8:18 pm    Post subject: Reply with quote

while true,

That looks good. I was expecting to see an IP address in place of localhost but maybe the network stack cheats if it sees its own IP.
That shows that the Pi is both set up correctly to distribute and that distccd is listening to itself correctly.

On the Pi, set /etc/distcc/hosts to point to the helper.

Now do that test again. What do you get in the distccmon-text window now?
During the configure and preprocess steps there way be some localhost entres as test programs are compiled.
That's configure working things out for itself.

Once into the compile phase, the helpers IP will be listed there.

During linking, you will only get blank lines as linking cannot be distributed.

There is a helper only test we can do if we need to.
_________________
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
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