-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello, I want to try learning from this project and running the example, but I encountered a few issues. I have ensured that I have installed CMake, g++, and c++, and my versions are as follows. The build process of dlib should be without any issues, but I don't know why the wrapper.rs file is unable to link with the header files referenced from the target build folder. Could you please give me some tips or ideas on how to solve these issues?
cmake --version
$ cmake --version
cmake version 3.22.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).c++ --version
$ c++ --version
c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.g++ --version
$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Cargo build errors
$ sudo cargo build
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /tester/dlib-face-recognition/sys/Cargo.toml
workspace: /tester/dlib-face-recognition/Cargo.toml
Compiling dlib-face-recognition v0.3.2 (/tester/dlib-face-recognition)
The following warnings were emitted during compilation:
warning: src/wrapper.rs:2:14: fatal error: dlib/dnn.h: No such file or directory
warning: 2 | #include <dlib/dnn.h>
warning: | ^~~~~~~~~~~~
warning: compilation terminated.
error: failed to run custom build command for `dlib-face-recognition v0.3.2 (/tester/dlib-face-recognition)`
Caused by:
process didn't exit successfully: `/tester/dlib-face-recognition/target/debug/build/dlib-face-recognition-605abc5d9bdaa42a/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=./files
cargo:rustc-link-lib=blas
cargo:rustc-link-lib=dlib
cargo:rustc-link-lib=lapack
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
CXX_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
CXX_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
CXXFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
CXXFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/tester/dlib-face-recognition" "-Wall" "-Wextra" "-std=c++14" "-o" "/tester/dlib-face-recognition/target/debug/build/dlib-face-recognition-d626b80a744e4d5a/out/1050f4fc78588567-cpp_closures.o" "-c" "/tester/dlib-face-recognition/target/debug/build/dlib-face-recognition-d626b80a744e4d5a/out/rust_cpp/cpp_closures.cpp"
cargo:warning=src/wrapper.rs:2:14: fatal error: dlib/dnn.h: No such file or directory
cargo:warning= 2 | #include <dlib/dnn.h>
cargo:warning= | ^~~~~~~~~~~~
cargo:warning=compilation terminated.
exit status: 1
--- stderr
error occurred: ToolExecError: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/tester/dlib-face-recognition" "-Wall" "-Wextra" "-std=c++14" "-o" "/tester/dlib-face-recognition/target/debug/build/dlib-face-recognition-d626b80a744e4d5a/out/1050f4fc78588567-cpp_closures.o" "-c" "/tester/dlib-face-recognition/target/debug/build/dlib-face-recognition-d626b80a744e4d5a/out/rust_cpp/cpp_closures.cpp" with args "c++" did not execute successfully (status code exit status: 1).
Metadata
Metadata
Assignees
Labels
No labels