mytonctrl icon indicating copy to clipboard operation
mytonctrl copied to clipboard

Upgrade the build tool to Ninja, fix some bugs

Open awesome-doge opened this issue 3 years ago • 0 comments

Switching to the ninja compiler can reduce compilation time by up to 40%.

related issue : https://github.com/ton-blockchain/mytonctrl/issues/99 @neodiX42 Please help me test if you have time

Global:

  • Replace all make compilation methods with ninja
  • remove all make methods
  • Install ninja method
  • Fix the original precompile method, add the -GNinja flag
  • Corrected the detection method of the system, and listed the Red Hat system as unsupported

yum

  • In the centos system, cmake is updated to the latest version or 2.x, and ton cannot be compiled
  • cmake version lower than 3.9 cannot compile rocksdb
  • Download, compile, install version cmake 3.24.2
  • Add install switch method - need to recognize environment variables
  • Fix the method of not recognizing yum system
  • Remove invalid command dnf config-manager --set-enabled PowerTools
  • Install devtoolset-10 and activate it. Make the system support the new make and gcc methods.

pacman

  • Add --noconfirm method during installation, automatic installation

Test run toninstaller.sh

  • Except macos is a physical machine test, others are docker images.
  • I built the test script here and it has been tested https://github.com/TonX-Studio/test-mytonctrl-tools-docker
system environment Test Results
ubuntu:18.04 Test passed ✅
ubuntu:20.04 Test passed ✅
ubuntu:22.04 Test passed ✅
debian:10 Test passed ✅
debian:11 Test passed ✅
archlinux:base Test passed ✅
centos: centos7.9.2009 Test passed ✅
mac os 13.0 Beta Apple M1 Max Test passed ✅

debian:8 / debian:9 / ubuntu:16.04

  • It looks like the system version is too old. I feel no need to maintain all three versions.
  • To solve this problem we need to recompile the new version of cmake.
Add rocksdb
CMake Error at third-party/rocksdb/CMakeLists.txt:35 (cmake_minimum_required):
  CMake 3.10 or higher is required.  You are running version 3.7.2

awesome-doge avatar Oct 07 '22 09:10 awesome-doge