In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I want to introduce you to how Linux system realizes distributed compilation. The content of the article Xiaobian think good, now to share with you, think there is a need for friends can understand, hope to help everyone, the following with the idea of Xiaobian to read together.
Distributed compilation of Linux kernel Distributed compilation generally distributes the compilation task to different computers in the network through protocols such as TCP or SSH, so that these computers cooperate to complete the compilation work. The Linux kernel can be compiled distributively using distcc[1].
distcc is a program that compiles C, C++, Objective C, or Objective C++ code distributively across multiple computers in a network. distcc is a fast, easy-to-install distributed compiler that produces results consistent with native compilations. The theoretical maximum speedup of distributed compilation using distcc over native compilation is 3.0x, but in practice the speedup is lower than this theoretical value.
distcc does not require that all machines share a file system or have synchronized clocks, nor do they require that they have the same library or header files. When cross-compilers are installed, distcc doesn't even require that these machines have the same processor or operating system.
To build distcc based Linux kernel distributed compilation environment, we first download distcc v3.3.3 under Ubuntu 18.04 environment using the command:
wget -O distcc-3.3.3.tar.gz https://codeload.github.com/distcc/distcc/tar.gz/v3.3.3 Then extract the source package:
tar -xvf distcc-3.3.3.tar.gz After entering distcc-3.3.3 directory, there is an INSTALL file. Open INSTALL file, which records distcc-3.3.3 installation and configuration process.
Before installing distcc-3.3.3, we first need to install some dependencies:
sudo apt-get install gcc make python3 python3-dev libiberty-dev sudo apt-get install autoconf Then configure:
./ autogen.sh ./ configure then compiles:
make make check Use the make check command to see which features are compiled and which are not:
Installing the relevant software can change the option related to the relevant function from NOTRUN to OK. For example, if the Gdb_Case option is found to be NOTRUN because GDB is not installed, you can install GDB and then run make check again to change the option to OK.
Then you can install:
sudo make install make installcheck sudo update-distcc-symlinks The last command needs to be run again when installing or uninstalling the compiler.
The above is the Linux system how to achieve distributed compilation of the entire content, more and Linux system how to achieve distributed compilation related content can be searched before the article or browse the following article to learn Ha! I believe that Xiaobian will add more knowledge to everyone, I hope you can support it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.