You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to compile OpenFaceCpp on Linux virtual machine (No CUDA support). Problem is that after compilation I do not have any OpenFaceCpp binary in build directory but on Windows I have OpenFaceCpp.exe
My configuration:
OS: Ubuntu 18.04.1 LTS
G++: 7.3.0-16ubuntu3
Here are steps I've done to compile, basically everything worked according to README.md but I have to change -std=gnu++11 to -std=gnu++14 and fix one typo (sed commands):
marek@lubuntu18-64:~$ git clone https://github.com/aybassiouny/OpenFaceCpp.git
marek@lubuntu18-64:~$ cd OpenFaceCpp
marek@lubuntu18-64:~/OpenFaceCpp$ git submodule update --init
Submodule 'Lib/dlib-18.18' (https://github.com/davisking/dlib.git) registered for path 'Lib/dlib-18.18'
Submodule 'Lib/tinyxml2' (https://github.com/leethomason/tinyxml2) registered for path 'Lib/tinyxml2'
Cloning into '/home/marek/OpenFaceCpp/Lib/dlib-18.18'...
Cloning into '/home/marek/OpenFaceCpp/Lib/tinyxml2'...
Submodule path 'Lib/dlib-18.18': checked out '021cbbb1c2ddec39d8dd4cb6abfbbafdf1cf4482'
Submodule path 'Lib/tinyxml2': checked out '584af570860b8d7aa0a8105fb79ef9e8492b8aaa'
marek@lubuntu18-64:~/OpenFaceCpp$ git log -1
commit 9f0048906e6c1984c1bef5e0addbb9a0898f3cbd (HEAD -> master, origin/master, origin/HEAD)
Author: Ahmed Bassiouny <aybassiouny@aucegypt.edu>
Date: Mon Aug 6 09:41:19 2018 -0700
Add torch installation Readme
Add details how I got torch to work on my machine, should work everywhere. Next steps should be to have a docker.
marek@lubuntu18-64:~/OpenFaceCpp$ mkdir build
marek@lubuntu18-64:~/OpenFaceCpp$ cd build
marek@lubuntu18-64:~/OpenFaceCpp/build$ cmake ..
-- Configuring done
CMake Warning (dev) at Lib/tinyxml2/CMakeLists.txt:106 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "xmltest" of type "EXECUTABLE" has the following visibility
properties set for CXX:
CXX_VISIBILITY_PRESET
VISIBILITY_INLINES_HIDDEN
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /home/marek/OpenFaceCpp/build
marek@lubuntu18-64:~/OpenFaceCpp/build$ cmake --build .
[ 87%] Building CXX object CMakeFiles/OpenFaceCpp.dir/src/TorchWrap.cpp.o
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:47:1: error: ‘tempalte’ does not name a type; did you mean ‘tempnam’?
tempalte<typename Child>
^~~~~~~~
marek@lubuntu18-64:~/OpenFaceCpp/build$ sed -i 's/tempalte/template/' ../src/TorchWrap.cpp
marek@lubuntu18-64:~/OpenFaceCpp/build$ cmake --build .
[ 87%] Building CXX object CMakeFiles/OpenFaceCpp.dir/src/TorchWrap.cpp.o
/home/marek/OpenFaceCpp/src/TorchWrap.cpp: In constructor ‘OpenFaceCpp::TorchWrap::Executer::Executer(const string&, int)’:
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:88:17: error: ‘make_unique’ is not a member of ‘std’
m_child = std::make_unique<boost::process::child>(
marek@lubuntu18-64:~/OpenFaceCpp/build$ sed -i 's/gnu++11/gnu++14/' dlib_build/CMakeFiles/dlib.dir/flags.make
marek@lubuntu18-64:~/OpenFaceCpp/build$ sed -i 's/gnu++11/gnu++14/' CMakeFiles/OpenFaceCpp.dir/flags.make
marek@lubuntu18-64:~/OpenFaceCpp/build$ cmake --build .
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/marek/.hunter
-- [hunter] [ Hunter-ID: 4c50cfb | Toolchain-ID: 5930f74 | Config-ID: d35ceea ]
-- [hunter] OPENCV_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 3.4.1-p1)
-- [hunter] BOOST_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 1.67.0-p1)
-- [hunter] BOOST_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 1.67.0-p1)
-- [hunter] BOOST_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 1.67.0-p1)
-- [hunter] BOOSTPROCESS_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 0.5)
-- [hunter] PNG_ROOT: /home/marek/.hunter/_Base/4c50cfb/5930f74/d35ceea/Install (ver.: 1.6.26-p3)
Boost found.
Found Boost components:
system;regex
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- iostreams
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/CheckSymbolExists.cmake:57 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "x" will no longer be dereferenced when the policy is
set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/CheckSymbolExists.cmake:48 (__CHECK_SYMBOL_EXISTS_IMPL)
/usr/share/cmake-3.10/Modules/FindThreads.cmake:134 (CHECK_SYMBOL_EXISTS)
Lib/dlib-18.18/dlib/CMakeLists.txt:262 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Checking for module 'lapack'
-- No package 'lapack' found
-- Found LAPACK library
-- Found BLAS library
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/CheckFunctionExists.cmake:42 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "x" will no longer be dereferenced when the policy is
set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
Lib/dlib-18.18/dlib/cmake_utils/find_blas.cmake:357 (check_function_exists)
Lib/dlib-18.18/dlib/CMakeLists.txt:515 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- C++11 activated.
-- Configuring done
CMake Warning (dev) at Lib/tinyxml2/CMakeLists.txt:106 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "xmltest" of type "EXECUTABLE" has the following visibility
properties set for CXX:
CXX_VISIBILITY_PRESET
VISIBILITY_INLINES_HIDDEN
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /home/marek/OpenFaceCpp/build
marek@lubuntu18-64:~/OpenFaceCpp/build$ ls -la
total 88
drwxrwxr-x 6 marek marek 4096 sep 11 01:14 .
drwxrwxr-x 8 marek marek 4096 sep 11 01:01 ..
drwxrwxr-x 3 marek marek 4096 sep 11 01:14 _3rdParty
-rw-rw-r-- 1 marek marek 46758 sep 11 01:14 CMakeCache.txt
drwxrwxr-x 7 marek marek 4096 sep 11 01:42 CMakeFiles
-rw-rw-r-- 1 marek marek 1752 sep 11 01:14 cmake_install.cmake
drwxrwxr-x 3 marek marek 4096 sep 11 01:46 dlib_build
drwxrwxr-x 3 marek marek 4096 sep 11 01:14 Lib
-rw-rw-r-- 1 marek marek 10713 sep 11 01:14 Makefile
I do not know if this matters bit when I try to run make (instead of cmake -build .) inside build dir I get those errors:
marek@lubuntu18-64:~/OpenFaceCpp/build$ make
[ 2%] Built target tinyxml2
[ 85%] Built target dlib
[ 87%] Building CXX object CMakeFiles/OpenFaceCpp.dir/src/TorchWrap.cpp.o
/home/marek/OpenFaceCpp/src/TorchWrap.cpp: In constructor ‘OpenFaceCpp::TorchWrap::Executer::Executer(const string&, int)’:
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:91:18: error: ‘on_CreateProcess_setup’ is not a member of ‘boost::process::initializers’
initializers::on_CreateProcess_setup([this](executor &e)
^~~~~~~~~~~~~~~~~~~~~~
/home/marek/OpenFaceCpp/src/TorchWrap.cpp: In lambda function:
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:94:42: error: ‘class boost::process::posix::initializers::bind_stdout’ has no member named ‘on_CreateProcess_setup’; did you mean ‘on_exec_setup’?
initializers::bind_stdout(m_childSink).on_CreateProcess_setup(e);
^~~~~~~~~~~~~~~~~~~~~~
on_exec_setup
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:95:43: error: ‘class boost::process::posix::initializers::bind_stdin’ has no member named ‘on_CreateProcess_setup’; did you mean on_exec_setup’?
initializers::bind_stdin(m_childSource).on_CreateProcess_setup(e);
^~~~~~~~~~~~~~~~~~~~~~
on_exec_setup
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:96:17: error: ‘show_window’ is not a member of ‘boost::process::initializers’
initializers::show_window(SW_NORMAL).on_CreateProcess_setup(e);
^~~~~~~~~~~
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:96:29: error: ‘SW_NORMAL’ was not declared in this scope
initializers::show_window(SW_NORMAL).on_CreateProcess_setup(e);
^~~~~~~~~
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:96:29: note: suggested alternative: ‘FP_NORMAL’
initializers::show_window(SW_NORMAL).on_CreateProcess_setup(e);
^~~~~~~~~
FP_NORMAL
/home/marek/OpenFaceCpp/src/TorchWrap.cpp: In constructor ‘OpenFaceCpp::TorchWrap::Executer::Executer(const string&, int)’:
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:98:18: error: ‘on_CreateProcess_error’ is not a member of ‘boost::process::initializers’
initializers::on_CreateProcess_error([](executor&)
^~~~~~~~~~~~~~~~~~~~~~
/home/marek/OpenFaceCpp/src/TorchWrap.cpp: In lambda function:
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:100:16: error: ‘GetLastError’ was not declared in this scope
std::cout << GetLastError() << std::endl; })
^~~~~~~~~~~~
/home/marek/OpenFaceCpp/src/TorchWrap.cpp:100:16: note: suggested alternative: ‘CV_StsError’
std::cout << GetLastError() << std::endl; })
^~~~~~~~~~~~
CV_StsError
CMakeFiles/OpenFaceCpp.dir/build.make:110: recipe for target 'CMakeFiles/OpenFaceCpp.dir/src/TorchWrap.cpp.o' failed
make[2]: *** [CMakeFiles/OpenFaceCpp.dir/src/TorchWrap.cpp.o] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/OpenFaceCpp.dir/all' failed
make[1]: *** [CMakeFiles/OpenFaceCpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Thanks
The text was updated successfully, but these errors were encountered:
Hey, I indeed have been lately developing for windows instead of linux. I can't promise how soon I can provide such support. Would be nice if you can try and resolve the compile errors and make a pull request if you have the time.
I got similar errors when running "cmake -build ." on Raspbian. After changing on_createProcess_setup to on_exec_setup, GetLastError() to some temporary string "Error" and commenting out initializers::show_window(SW_NORMAL).on_CreateProcess_setup(e), the code somehow compiles, but this is temporary and unprofessional. I don't know what "show_window" does, but I couldn't find any replacement for Linux. Error handling is to be corrected as well.
Thing is, the code compiles, but does it compile correctly? I got no run_tests.cpp but I don't know whether it is somehow connected.
Should I run install.sh at all? When I try to, I got another errors connected with "make_unique", but adding -std=gnu++14 flag to the file won't work.
I'm trying to compile OpenFaceCpp on Linux virtual machine (No CUDA support). Problem is that after compilation I do not have any OpenFaceCpp binary in build directory but on Windows I have OpenFaceCpp.exe
My configuration:
OS: Ubuntu 18.04.1 LTS
G++: 7.3.0-16ubuntu3
Here are steps I've done to compile, basically everything worked according to README.md but I have to change -std=gnu++11 to -std=gnu++14 and fix one typo (sed commands):
I do not know if this matters bit when I try to run make (instead of cmake -build .) inside build dir I get those errors:
Thanks
The text was updated successfully, but these errors were encountered: