Open mateolafalce opened 9 months ago
In addition, once CMake is installed, when I compile the documentation, zlib1g-dev
is also required.
error: failed to run custom build command for `tonlib-sys v2023.6.4`
Caused by:
process didn't exit successfully: `/home/mateo/dev/tonlib-rs/target/debug/build/tonlib-sys-e961b2405d8ca1b3/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=ton/CMakeLists.txt
cargo:rerun-if-changed=build.rs
CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-unknown-linux-gnu = None
CMAKE_x86_64_unknown_linux_gnu = None
HOST_CMAKE = None
CMAKE = None
running: cd "/home/mateo/dev/tonlib-rs/target/debug/build/tonlib-sys-43a71e42855d7956/out/build" && CMAKE_PREFIX_PATH="" "cmake" "-Wdev" "--debug-output" "/home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton" "-DTON_ONLY_TONLIB=ON" "-DBUILD_SHARED_LIBS=OFF" "-DCMAKE_JOB_POOLS=compile_threads=1" "-DCMAKE_INSTALL_PREFIX=/home/mateo/dev/tonlib-rs/target/debug/build/tonlib-sys-43a71e42855d7956/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" "-DTON_ONLY_TONLIB=true" "-DBUILD_SHARED_LIBS=false" "-Wno-dev"
Running with debug output on.
-- Could NOT find ccache
Called from: [1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/home/mateo/dev/tonlib-rs/target/debug/build/tonlib-sys-43a71e42855d7956/out/build/CMakeFiles/CMakeOutput.log".
See also "/home/mateo/dev/tonlib-rs/target/debug/build/tonlib-sys-43a71e42855d7956/out/build/CMakeFiles/CMakeError.log".
--- stderr
Add crc32c
Called from: [1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
Entering /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/third-party/crc32c
Called from: [1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
Returning to /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton
Called from: [1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
Add ton
Called from: [1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.25/Modules/FindZLIB.cmake:166 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:212 (find_package)
Called from: [4] /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake
[3] /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake
[2] /usr/share/cmake-3.25/Modules/FindZLIB.cmake
[1] /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonlib-sys-2023.6.4/ton/CMakeLists.txt
thread 'main' panicked at /home/mateo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:
command did not execute successfully, got: exit status: 1
build script failed, must exit now
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
@mateolafalce Did you find any solution for this problem?
@Aero25x No
When encountering the error "failed to run custom build command for tonlib-sys v2023.6.4", it typically indicates an issue with building a Rust crate that depends on TonLib.
Ensure you have all necessary dependencies installed:
rustup component add rust-src
rustc --version
cargo install cargo-update
cargo update
sudo apt-get install build-essential
echo $RUSTC
cargo clean
cargo build
[dependencies]
tonlib = "0.1.0"
cargo tree -u
rustup show
when I
cargo doc --open
Is it a good idea to specify in the README any comment for developers to install CMake?