View previous topic :: View next topic |
Author |
Message |
juliedeville n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2024 Posts: 26
|
Posted: Fri Oct 25, 2024 3:45 pm Post subject: Trying to get distcc to work for cross-compiling |
|
|
Hello,
I followed these instructions https://forums.gentoo.org/viewtopic-p-8844162.html#8844162 to setup distcc on two machines. I am not getting any useful errors or logs, and it does not appear to be compiling on both. Networking is setup, and I am able to ssh into the helper machine. I believe I had it working earlier, because I saw messages when merging a package, but it might have been when I was merging distcc itself.
I am not sure where I went wrong, any assistance is appreciated. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pingtoo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_storm_trooper.gif)
Joined: 10 Sep 2021 Posts: 1211 Location: Richmond Hill, Canada
|
Posted: Fri Oct 25, 2024 4:14 pm Post subject: |
|
|
If you wish help from other, don't let other guessing You have yet sharing anything for us to start understand what is the problem. All we know is from your statement distcc is not working.
Please use the terminology in the linked post, show us what does it mean Quote: | it does not appear to be compiling on both |
What kind of machines both are?
What is cross compile target?
How cross compile tool chain setup?
Using your posted link as example, tell us the setup so we can have place to start. Don't expect everybody read through the link content. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
juliedeville n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2024 Posts: 26
|
Posted: Fri Oct 25, 2024 4:24 pm Post subject: |
|
|
Sorry, haha
One is a thinkpad t450s with an Intel i7-5600u, and one is an asus prebuilt desktop with an intel i7-7700
The target is the thinkpad
The profile on both machines is default/linux/amd64/23.0/hardened
I am still learning about tool chains |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
juliedeville n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2024 Posts: 26
|
Posted: Fri Oct 25, 2024 4:34 pm Post subject: |
|
|
Okay, I added the line CC="distcc" to make.conf on the target, and before that, I tested to make sure distcc itself was working by writing a c program and compiling using distcc, and it worked, so it seems the issue is was just getting it to work with portage. Now, I get this error when running emerge
Code: | compiling source in /var/tmp/portage/app-text/tree-2.1.1-r1/work/unix-tree-2.1.1 ...
make -j9 -l5 CC=distcc 'CFLAGS=-O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE' 'LDFLAGS=-Wl,-O1
-Wl,--as-needed -Wl,-z,pack-relative-relocs'
distcc -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -o tree.o tree.c
distcc -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -o list.o list.c
distcc -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -o hash.o hash.c
distcc[27] (dcc_talk_to_include_server) Warning: INCLUDE_SERVER_PORT not set - did you forget to run under 'pump'?
distcc[27] (dcc_build_somewhere) Warning: failed to get includes from include server, preprocessing locally
distcc -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -o color.o color.c
distcc[28] (dcc_talk_to_include_server) Warning: INCLUDE_SERVER_PORT not set - did you forget to run under 'pump'?
distcc[28] (dcc_build_somewhere) Warning: failed to get includes from include server, preprocessing locally |
I am not sure where to set "INCLUDE_SERVER_PORT" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
juliedeville n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2024 Posts: 26
|
Posted: Fri Oct 25, 2024 4:52 pm Post subject: |
|
|
I think I have got it now. I had the hosts file on the target set to "192.166.7.79,cpp, lzo." I removed "cpp," and I am no longer getting the error. I was under the impression that portage would return messages specifically for distcc at the beginning of an emerge process, and when I run "sudo distccmon-text 1" on the helper, it wasn't displaying anything in the output.
I think I have got it working now, because I can hear it compiling! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Fri Oct 25, 2024 6:17 pm Post subject: |
|
|
distccmon is run on the system needing help, not the helper.
distcc-pump has been broken for years. It needs the same (identical) include files on the helpers as the system needing help.
That allows the helpers local files to be used which saves network bandwidth.
Portage no longer supports pump mode.
Your topic title is misleading as you are not cross compiling.
Cross compiling would be using your i7 to build arm code for say, a raspberry pi.
That works too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
juliedeville n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2024 Posts: 26
|
Posted: Sat Oct 26, 2024 3:46 pm Post subject: |
|
|
Oh I see. I misunderstood the term. Also sorry, I meant to type 'target' and not 'helper' regarding distccmon. Currently I am having an issue where the helper machine will randomly stop compiling.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Sat Oct 26, 2024 4:06 pm Post subject: |
|
|
You need distcc installed on both systems as it's in two part.
distccd, which runs on the helpers and listens for cries for help
By default it will start one distccd process for each logical core on the helper.
distccd need not be run on the system needing help.
local compilation will be used anyway when there are problems.
Hence, localhost need not be included in the list of helpers. If it's there at all, it should be last.
When you do not give a maximum nuber of concurrent jobs to distribute to helpers, the default is 4, as if you had used /4
If a helper can do more than that, by all means increase it.
But! MAKEOPS on the weaker system may need to pe increased too.
This is a double edged sword as not everything can be distributed and you don't want to swamp the weaker sysem when it has to do all the work.
You say that the helper randomly stops helping.
Does that mean what it says or does distribution stop?
There should be error messages.
Only C and C++ compile jobs can be distributed.
Preprocessing and linking will still be carried out locally.
All other code will still be built locallaly to ... e.g. rust. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|