Closed minger0 closed 10 months ago
after
sudo apt install libasound2-dev libudev-dev
the opencascade libs,
sudo apt install -y xfonts-scalable libocct-data-exchange-dev libocct-draw-dev libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev
were needed to be installed
$ rustup run stable cargo build
Compiling zstd-sys v2.0.8+zstd.1.5.5
Compiling zstd-safe v5.0.2+zstd.1.5.2
Compiling opencascade-sys v0.2.0 (https://github.com/bschwind/opencascade-rs?rev=d9391e43bffca1356c1cf74cd15837f2ceb6286e#d9391e43)
error: failed to run custom build command for `opencascade-sys v0.2.0 (https://github.com/bschwind/opencascade-rs?rev=d9391e43bffca1356c1cf74cd15837f2ceb6286e#d9391e43)`
Caused by:
process didn't exit successfully: `/home/testuser/my/code/dslcad/target/debug/build/opencascade-sys-50caed4f7197da8d/build-script-build` (exit status: 101)
--- stdout
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/testuser/my/code/dslcad/target/debug/build/opencascade-sys-54e19048fb829fa7/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/testuser/.cargo/git/checkouts/opencascade-rs-56632466c8b8dee3/d9391e4/crates/opencascade-sys/OCCT" "-DCMAKE_INSTALL_PREFIX=/home/testuser/my/code/dslcad/target/debug/build/opencascade-sys-54e19048fb829fa7/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"
-- Configuring incomplete, errors occurred!
See also "/home/testuser/my/code/dslcad/target/debug/build/opencascade-sys-54e19048fb829fa7/out/build/CMakeFiles/CMakeOutput.log".
--- stderr
CMake Error at CMakeLists.txt:3 (find_package):
By not providing "FindOpenCASCADE.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"OpenCASCADE", but CMake did not find one.
Could not find a package configuration file provided by "OpenCASCADE" with
any of the following names:
OpenCASCADEConfig.cmake
opencascade-config.cmake
Add the installation prefix of "OpenCASCADE" to CMAKE_PREFIX_PATH or set
"OpenCASCADE_DIR" to a directory containing one of the above files. If
"OpenCASCADE" provides a separate development package or SDK, be sure it
has been installed.
thread 'main' panicked at /home/testuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.49/src/lib.rs:1104: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
thread 'main' panicked at /home/testuser/.cargo/git/checkouts/opencascade-rs-56632466c8b8dee3/d9391e4/crates/opencascade-sys/build.rs:92:23:
Pre-installed OpenCASCADE library not found. You can use `builtin` feature if you do not want to install OCCT libraries system-wide.: Any { .. }
warning: build failed, waiting for other jobs to finish...
pls help me to get the build running
Hey. Sorry about the late reply. Try compiling with -F builtin-occt
its a flag that should build opencascade with the application. If not you need to clone the OCCT repo and manually build and install it with the following CMAKE config:
cmake \
-DBUILD_LIBRARY_TYPE=Static \
-DBUILD_MODULE_ApplicationFramework=FALSE \
-DBUILD_MODULE_Draw=FALSE \
-DUSE_D3D=FALSE \
-DUSE_DRACO=FALSE \
-DUSE_EIGEN=FALSE \
-DUSE_FFMPEG=FALSE \
-DUSE_FREEIMAGE=FALSE \
-DUSE_FREETYPE=FALSE \
-DUSE_GLES2=FALSE \
-DUSE_OPENGL=FALSE \
-DUSE_OPENVR=FALSE \
-DUSE_RAPIDJSON=FALSE \
-DUSE_TBB=FALSE \
-DUSE_TCL=FALSE \
-DUSE_TK=FALSE \
-DUSE_VTK=FALSE \
-DUSE_XLIB=FALSE \
-DBUILD_MODULE_DETools=FALSE
Its not a very smooth setup right now.
I have improved the build process. There is now a justfile that acts as a build script to setup OCCT. Full build should work by running:
just build
It takes care of pre-building OCCT the first time and uses the correct env variables.
any suggestion on how to proceed?