i get this error using cmake Version 3.11.2 on Windows 10 with visual Studio 14 2015 created Project. I already used cmake on the same Project on Windows 7 but in Windows 10 it doesnt seem to work.
Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error at C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/Compiler/._ADSP-DetermineCompiler.cmake:1:
Parse error. Expected a command name, got bad character with text "".
Call Stack (most recent call first):
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeCompilerIdDetection.cmake:6 (include)
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeCompilerIdDetection.cmake:32 (_readFile)
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:128 (compiler_id_detection)
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:147 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt
Configuring incomplete, errors occurred!
See also "C:/Users/Ali/Desktop/Projekt1/build/CMakeFiles/CMakeOutput.log".
In the logfile there is nothing useful.Just :The system is: Windows - 10.0.17134 - AMD64
I already checked all other threads on stackoverflow but couldnt find a solution.
Does anyone had the same error or does know what to do to fix it ?
Under Modules/Compiler/ there shouldn't be files started with ._. Probably, you got them when copy CMake from external drive, which has such files as hidden ones. E.g. from MacOS.
Either remove files started with ._, or repeat copying of CMake without them.
Thanks to #Tsyvarev's answer! I had never heard of macOS filesystem metadata causing problems.
If you take cmake files on macOS and tar it you'll get this. One solution is to use --disable-copyfile when you compress it to avoid these files:
tar --disable-copyfile -czf cmake-3.19.6-rh6.tgz ./cmake-3.19.6-rh6/
Related
I am relatively new to coding in C++ and using CMake. I have been writing code using CLion IDE on ubuntu 16.04. I had written a library, with an older version of CMake (I believe it was version 3.4) which came bundled with CLion and for an unrelated reason needed to update to version 3.15. Which I assume I must have done incorrectly.
When reloading Cmake projects that previously ran fine, I get the following error message:
Found Qt4: /usr/bin/qmake (found version "4.8.7")
CMake Error at cmake-build-debug/_deps/eigen-src/cmake/language_support.cmake:33 (file):
file failed to open for writing (Permission denied):
/home/majed/CLionProjects/TwoLink_manip/cmake-build-debug/language_tests/Fortran/CMakeLists.txt
Call Stack (most recent call first):
cmake-build-debug/_deps/eigen-src/test/CMakeLists.txt:19 (workaround_9220)
I have looked through a numeber of Cmake questions which I thought could be related to my issue but none of them seemed to address this specific issue. I am not very familiar with the Cmake installation and setup and simply followed a youtube tutorial to install the latest release(cmake-3.15.5-Linux-x86_64.sh)from the cmake.org site.
I should point out that CMake does work when I run ROS packages from the terminal which is why I am apprehensive about re-installing everything. I am assuming the issue is related to where the cmake file is installed but not sure how to fix this issue with CLion. I would appreciate any and all suggestions.
I have also tried to export CMAKE_ROOT to the locaton of the new cmake folder but it doesn't really have any effect.
I'm trying to run this code:
https://github.com/snukky/news-translit-nmt
I've installed boost and got the following messages:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\Program Files\boost\boost_1_67_0
The following directory should be added to linker library paths:
C:\Program Files\boost\boost_1_67_0\stage\lib
By the comment of #kenba I've added the following environment variables:
Try 1
When I try to run the following cmd:
cmake .. -DCMAKE_BUILD_TYPE=Release
I get:
-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
Cannot find Boost libraries. Terminating.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".
Try 2
When I try to give a custom boost by this ref
https://marian-nmt.github.io/docs/#custom-boost:
I run the following cmd:
cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"
I get the same error.
I've also tried working with Linux WSL (But problems with CUDA installation overthere, their team is working on it), Linux VirtualBox (Not enough resources), and Ubuntu 17.10 I have installed (But Cuda requires Ubuntu 16.04 / 18.04)
What am I missing here? I'm trying any suggestion, stuck on it for a few days. Thanks!
Edit:
I reinstalled Ubuntu 16.04 and the problem was solved. Still don't know how to solve it in windows, but i'll continue use Ubuntu 16.04.
I had this problem earlier while trying to build the Windows version of Marian NMT (the same component that you're having trouble with). I can't remember the exact steps to solve the problem, but the root cause is that the Marian NMT build for Windows does not work with newer versions of Boost, since the source code uses some deprecated calling conventions for timer and chrono libraries (maybe some others as well).
The error message kind of confirms this: it can't find Boost, but on the other hand it says it finds your version 1.67.0. The solution is to use an older version of boost, I've confirmed that it works with 1.60.0.
If you just require a Marian NMT decoder that works in Windows, a project I work on has released a plugin for the Trados Studio translation tool, which contains a compiled marian-decoder executable for Windows: https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin. You can access the executable by unzipping the sdlplugin file, the StartMtPipe.bat shows how to use the decoder.
I'm currently struggling to build OpenCV for the UWP.
I already googled quite a lot and found Microsoft's OpenCV Github Repo which tecnically should do the magic. However, this repo and pretty much everything else I found in this regard are outdated (Visual Studio 2015, old OpenCV versions etc.). I need to use OpenCV 3.3 because it's a cross platform project and I don't want to recompile everything else solely because of an outdated git repo.
Can anyone explain the process of building OpenCV using CMake from the official repo for the UWP?
My first attempt was to simply use the Windows Dlls, however my application than shouts "Failed to load module" at me. Then, I tried to build OpenCV the Visual Studio Project files as stated here and here. However, this doesn't do it for me as it throws the following error:
CMake Error at cmake/OpenCVUtils.cmake:440 (if):
if given arguments:
"(" "OR" "OFF" ")"
Unknown arguments specified
Call Stack (most recent call first):
CMakeLists.txt:317 (OCV_OPTION)
It also tells me to check the CMakeOutput.log but there it's 0 errors everywhere.
If someone could tell me either how to get rid of this error or what to change in the CMake GUI to build OpenCV for UWP, that'd be great!
Edit:
I also tried to compile OpenCV with a platform specific toolchain for WinRT as found in platforms/winrt. It doesn't really change anything though (I'm not even sure if it should), I still get "Unable to load Dll: The specified module could not be found". Maybe GPPK is right in his assumption that it's more an UWP problem than an OpenCV one. Anyways, if anyone knows anything about this, I'd really love to get some help!
Ok, I didn't get an answer yet, so I managed to do it myself (more or less).
Here's how I did it:
Prerequisites
Visual Studio (2017)
UWP SDK
CMake
OpenCV from official repo
Steps
Create a build folder which you want the UWP libraries to built in.
Start PowerShell in this folder and execute the following command (exchange C:\OpenCV with your local OpenCV path): cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERS
ION="10.0" -DCMAKE_VS_EFFECTIVE_PLATFORMS=x86 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF C:\OpenCV
If you get the same error message as I did (see question for more details), go to the root CMakeLists.txt in the OpenCV folder and add a # in front of line 317 (OCV_OPTION(ENABLE_PYLINT)). This should fix it, to check, execute the command from above once more.
Ensure that the output claims "Windows RT support YES" and "Building for Microsoft platform: Windows".
Open OpenCV.sln in the build folder. Ensure that all projects are either of type "Windows Store" or "Universal Windows" and build the ALL_BUILD Project twice: Once in Release configuration, and once in Debug. Then build the INSTALL Project.
That's it, you should find the built Dlls in the install folder. Step 3 is probably a bug in OpenCV and will hopefully be fixed in upcoming versions.
I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?
i am trying to build aam-opencv following the brief tutorial from the sources website here . I keep recieveing the error:
-- Configuring incomplete, errors occurred!
C:\aam-opencv\build>cmake ..
-- The C compiler identification is MSVC 17.0.61030.0
-- The CXX compiler identification is MSVC 17.0.61030.0
CMake Error at cmake/modules/FindOpenCV.cmake:239 (MESSAGE):
OpenCV required but some headers or libs not found. Please specify it's
location with OpenCV_ROOT_DIR env. variable.
Call Stack (most recent call first):
CMakeLists.txt:48 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
I have tried using the variable OpenCV_ROOT_DIR="c:\opencv-2.4.9\opencv\build, but that also produced the same error.
Any help would be much appreciated!
I hope someone else will find my answer helpful. After about a week of searching I came across a brief tutorial online. Doing this made it possible. (Although getting the application to run, requires some debugging to let it work with windows)
If you want to without cygwin but with Visual C++, you need following:
1) CMake 2.6 or later
2) OpenCV Ver 1.0 <- The OpenCV Version is Crucial in this tutorial
3) Qt 2.6.1 or later
1) CMake
download cmake from http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe
install with default option
2) OpenCV ver. 1.0
download from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/1.0/OpenCV_1.0.exe/download
install with default option.
3) Qt 4.6.3
download Qt for Open Source C++ development on Windows (VS2008) from http://qt.nokia.com/downloads/windows-cpp-vs2008
Build:
set System Environment variable OpenCV_ROOT_DIR to C:\Program Files\OpenCV
Download aam-opencv.rar from attached to this article.
Extract aam-opencv.rar to somewhere you want (e.g. D:\Project \aam)
Open D:\Project\aam\aam-opencv\src\opencvWebcam.cpp
modify line 51
If you want to use movie file, specify your movie file path.
Note that you have to specify path using \ as path separator.
If you want to use webcam, comment line 51 and uncomment line 52.
run CMake gui
Select for "D:\Project\aam\aam-opencv" as "Where is the source folder" option
Select for "D:\Project\aam\aam-opencv\build" as "Where to build the binaries" option
Click "Configure" button
Then, You will see generator option.
Select "Visual Studio 9 2008"
if needed,select C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe as c compiler and cxx compiler.
Click "Generate" button.
Then, You can see D:\Project\aam\aam-opencv\build\AAM.sln
Open D:\Project\aam\aam-opencv\build\AAM.sln with your Visual C++
Build Solution.
Congratulations!
Now you can run q-aamtrainer.exe from VC ++ menu, select Debug -> Start Debugging by selecting D:\Project\aam\aam-opencv\build\Debug\qt-aamtrainer.exe
NOTE: After I complete debugging and get this application working i will link or update to my answer, keep posted!
UPDATE I was not able to get it to run on windows, if anyone has a solution, comment or link to the answer.