emscripten fails to build hugin package - wxwidgets

I'm trying to build the "hugin" package (https://launchpad.net/hugin) with emscripten.
The cmake command runs fine in native Linux, but the equivalent emscripten command returns errors.
With g++ the following command finishes successfully (and following that I can build the executables with "make all")
cmake ../
With emscripten, the following command:
cmake -DCMAKE_TOOLCHAIN_FILE=~/emscripten/emsdk-portable/emscripten/1.37.28/cmake/Modules/Platform/Emscripten.cmake ../
gives an error:
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS)
What am I missing?
Thanks,
Avner

Related

Use CMake binares to build cpp projects without installing CMake

I want to use specific version of CMake 3.19.0 for Ubuntu 14.04 (32-bits) without installing CMake (use only binaries).
I tried to build CMake 3.19.0 on my test machine. It builded and installed successfully. In install_manifest.txt I see lot of files that were installed on my test system.
So, I tried to copy only installed binaries from /usr/local/bin/ (this is default path where CMake binaries were installed) and paste it to another machine that doesn't know about CMake. I paste 3 binaries: cmake, ctest, cpack to /usr/local/bin/.
If I run which cmake it shows path:
/usr/local/bin/cmake
If I run cmake --verison it shows:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
cmake version 3.19.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
It looks like CMake needs some modules that I haven't copied yet. I tried to build my cpp project and it shows me:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
CMake Error: Error executing cmake::LoadCache(). Aborting.
What are the minimum required modules needed for stable building? And where I should copy it?
Just copied builded Modules and Templates directories from cmake-3.19.0 build directory to /usr/local/share/cmake-3.19

CMake Error at CMakeLists.txt:96 (install): install TARGETS given unknown argument "NAMELINK_COMPONENT"

I am writing a CMakeLists.txt to compile and install my programs. I have following error with the below install() command. I need to install a symbolic link (additionally to the library so file) for the created library.
CMake Error at CMakeLists.txt:96 (install): install TARGETS given
unknown argument "NAMELINK_COMPONENT".
install(TARGETS my-library
LIBRARY
DESTINATION /usr/lib/
COMPONENT Libraries
NAMELINK_COMPONENT Development
)
I am following the instructions given in the CMake documentation (https://cmake.org/cmake/help/v3.13/command/install.html#). is this because of cmake version in my PC or syntax error ?
please help.
You need to have same version of CMake (v3.13) or newer.

"Could not find triehash executable" error

I was trying to build the apt repository, but ran into the following error when running cmake ..:
CMake Error at CMakeLists.txt:44 (message):
Could not find triehash executable
How do I fix this?
This cmake tries to find triehash utility in your system. Is it installed? If no use sudo apt install triehash

pip3 gives CMake Error in CMakeLists.txt

I am trying to run pip3 install face_recognition. But it gives below problem for cmake.
Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
pip3 version is 9.03, Python 3.7 and cmake 3.12.0-rc3. I don't have Visual studio. I don't have admin rights on my PC. Hence I downloaded the all the above packages, extracted and added their bin dir in path. Similar way I have installed MinGW and added its bin directory in path. Nothing is working. Couple of forums talk about removing CMakeCache.txt. I am struggling to find CMakeCache.txt. I think pip command is downloading the package, extracting in temp directory and compiling it. When compilation fails it delete the extracted content. Not sure. Please help
After carefully studying a logs, I realized it's Dlib installation a giving problem. After lots of search, I got the url https://www.learnopencv.com/install-opencv-3-and-dlib-on-windows-python-only. It suggest to use Anaconda. I installed the Anaconda and followed the instruction from article and discussions. It worked perfectly for me.

clang++ cant find file <iterator>

I am trying to compile my c++ project (working with g++ with boost) with clang. I have successfully compile boost-libraries (1.53) with clang tool-chain. I am using CMake to compile my project, compilation is failing with following error.
In file included from /home/dilawar/Works/hpc21/bliff/BlifParserAndPartitioner/src/expression_graph.h:21:
/usr/local/include/boost/graph/graph_traits.hpp:14:10: fatal error: 'iterator' file not found
#include <iterator>
^
1 error generated.
I am passing -stdlib=libc++ to compiler. I am not sure which package I should install (ubuntu) to install libc++. I have clang and llvm installed on my machine.
Do I have to download and compile libc++ or it is installed automatically when one install clang?
When you pass -stdlib=libc++ the clang driver looks for header files in a different
directory w.r.t. when you don't pass the flag. You have to install libc++ separately. The libc++ webpage (http://libcxx.llvm.org/) has some details on how to install libc++ using CMake.
This webpage might also be useful:
http://marshall.calepin.co/llvmclang-and-standard-libraries-on-mac-os-x.html