Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
标准树莓派环境下编译codon

标准树莓派环境下编译codon

https://docs.exaloop.io/codon/advanced/build

http://cloud.buryin.com/wp-content/uploads/2022/12/codon-develop-2.zip

编译需要大量的交换空间,否则容易出错,因此先增加交换空间

sudo dd if=/dev/zero of=/swapfile bs=1G count=6
#count的大小就是增加的swap空间的大小,1G是块大小为1G,所以空间大小是bs*count=6G
sudo mkswap /swapfile  #把刚才空间格式化成swap格式
su
chmod 0600 /swapfile  
sudo swapon /swapfile  #使用刚才创建的swap空间
sudo pip install Ninja --break-system-packages
sudo apt install cmake
git clone --depth 1 -b codon https://github.com/exaloop/llvm-project
cmake -S llvm-project/llvm -B llvm-project/build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_INCLUDE_TESTS=OFF \
    -DLLVM_ENABLE_RTTI=ON \
    -DLLVM_ENABLE_ZLIB=OFF \
    -DLLVM_ENABLE_TERMINFO=OFF \
    -DLLVM_TARGETS_TO_BUILD=all
cmake --build llvm-project/build -j4
cmake --install llvm-project/build
sudo apt-get install clang
cd llvm-project
cd llvm
sudo su
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DIR=$(llvm-config --cmakedir) \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++
cmake --build build --config Release
cmake --install build --prefix=install

编译完成,释放临时增加的交换空间

swapoff -a