MinGw can't compile test file from cmake - c++

I installed MinGW from the official website, and I'm trying to compile a simple cmake project.
I did
cmake -G"MinGw Makefiles" .
and got:
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/MinGW/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp
Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_3eeac/fast && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_3eeac.dir\build.make CMakeFiles/cmTC_3eeac.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_3eeac.dir\testCCompiler.c.obj -c C:\Users\LZ\Desktop\roosek_ocr\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTC_3eeac.dir\build.make:81: recipe for target 'CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj' failed mingw32-make.exe[1]: *** [CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Makefile:137: recipe for target 'cmTC_3eeac/fast' failed
mingw32-make.exe: *** [cmTC_3eeac/fast] Error 2
I found https://stackoverflow.com/a/55941909/6655884 but I looked at my path and I couldn't find sh.exe. Atually I don't know if it's there. How can I check? Typing sh on powershell, it complains that it's not a command or a script or anything.
Other posts talk about MinGw installed through chocolatey, which is not my case.
UPDATE:
Here's the CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
gcc.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: -c
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --c++
The output was:
1
g++.exe: error: unrecognized command line option '--c++'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --ec++
The output was:
1
g++.exe: error: unrecognized command line option '--ec++'; did you mean '-Weffc++'?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
g++.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: -c
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --c++
The output was:
1
g++.exe: error: unrecognized command line option '--c++'
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --ec++
The output was:
1
g++.exe: error: unrecognized command line option '--ec++'; did you mean '-Weffc++'?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/MinGW/bin/g++.exe
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
g++.exe: error: unrecognized command line option '--target=arm-arm-none-eabi'
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
compilation terminated.
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
Determining if the C compiler works failed with the following output:
Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_3eeac/fast && C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_3eeac.dir\build.make CMakeFiles/cmTC_3eeac.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/LZ/Desktop/roosek_ocr/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_3eeac.dir\testCCompiler.c.obj -c C:\Users\LZ\Desktop\roosek_ocr\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTC_3eeac.dir\build.make:81: recipe for target 'CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_3eeac.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe: *** [cmTC_3eeac/fast] Error 2

I've run into this issue as well and am still looking for a solution. The only way I've been able to get around this issue is to add the CMAKE_CXX_COMPILER_WORKS=1 flag.

Related

How do I fix the "No known features for CXX compiler" while compiling with CMake (Linux Mint)

I am trying to install this plugin: https://github.com/CatxFish/obs-v4l2sink
I followed all the steps (Installed QT, got obs-studio source code and then tried to build the plugin):
sudo apt install qtbase5-dev
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
But then...
-- Configuring done
CMake Error in CMakeLists.txt:
No known features for CXX compiler
""
version .
-- Build files have been written to: /home/********/obs-v4l2sink/build
It is my first time compiling using cmake (instead of make), and I don't know much about compiling. Was there any step I missed between installing cmake and trying to compile the plugin?
From what I found online, here's what I have done:
build-essential is already installed;
c++, cc and all are installed as well;
tried to add -DCMAKE_CXX_COMPILER=/usr/bin/cc to the cmake command line (did the same with c++);
And of course, I have done the update && upgrade
Here's what's in the CMakeError.log file :
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
1
/usr/bin/ld : ne peut pas trouver Scrt1.o : Aucun fichier ou dossier de ce type
/usr/bin/ld : ne peut pas trouver crti.o : Aucun fichier ou dossier de ce type
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Determining if the C compiler works failed with the following output:
Change Dir: /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_f18b2/fast"
/usr/bin/make -f CMakeFiles/cmTC_f18b2.dir/build.make CMakeFiles/cmTC_f18b2.dir/build
make[1] : on entre dans le répertoire « /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o -c /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_f18b2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f18b2.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_f18b2.dir/testCCompiler.c.o -o cmTC_f18b2
/usr/bin/ld : ne peut pas trouver Scrt1.o : Aucun fichier ou dossier de ce type
/usr/bin/ld : ne peut pas trouver crti.o : Aucun fichier ou dossier de ce type
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_f18b2.dir/build.make:97: recipe for target 'cmTC_f18b2' failed
make[1]: *** [cmTC_f18b2] Error 1
make[1] : on quitte le répertoire « /home/***********/obs-v4l2sink/build/CMakeFiles/CMakeTmp »
Makefile:126: recipe for target 'cmTC_f18b2/fast' failed
make: *** [cmTC_f18b2/fast] Error 2
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --c++
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: --ec++
The output was:
No such file or directory
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
c++: fatal error: no input files
compilation terminated.
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
c++: fatal error: no input files
compilation terminated.
Turning my comment into an answer:
The error message is peculiar. It looks like CMake previously detected a C++ compiler, and is searching for compiler features for it. However, now it cannot find that compiler (blank compiler name and version):
CMake Error in CMakeLists.txt:
No known features for CXX compiler
""
version .
This is indicative of a stale CMake configuration, and it may be useful to clean it up. Try removing the build folder altogether, and run the CMake steps again from the tutorial (starting from creation of the build folder as shown below). This will help clear out the old/cached CMake settings:
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
I'm sharing my problem.
I got the same message as soon as I applied Quickstart: Building with CMake
.
The problem was the project command which specified LANGUAGES element.
project(my-project C)
I removed the C part and it works now.
project(my-project)
Specifying both languages seems to work.
project(my-project LANGUAGES C CXX)
Go to visual studio downloads and download tools regarding visual studio and it will works.
I spend nearly 3 days for this (I reinstall the vscode 2022 eventhough it's not worked).
My Superior suggest me to download tools for visual studio and check ,
now it's working.

New installation of cmake "is not able to compile a simple test program."

I am using Cmake 3.5.1, and need to compile some C++ codes that needs Cmake 3.7. I am using Ubuntu 16.04.
I can't uninstall Cmake 3.5.1 as it is bundled with ROS and doing so will break ROS. Hence, I installed CMake 3.12.3 using the instructions from here but in a different directory (/usr/local/cmake-3.12.3).
Running the commands in terminal to check versions:
cmake version 3.12.3
gcc version 5.4.0
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0
Next, I try to compile the C++ codes
cd /media/fastrl-master
sudo cmake .
I got an error that CMake is unable to compile a simple test program. I have tried setting the permissions of the folder containing the C++ codes (fastrl-master), and also to install build essentials (apt install --reinstall build-essential). These did not work.
This is the contents of CMakeError.log
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags:
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: -c
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --c++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --ec++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags:
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: -c
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --c++
The output was: Permission denied
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/src/cmake-3.12.3
Build flags: Id flags: --ec++
The output was: Permission denied
Checking whether the CXX compiler is IAR using "" did not match "IAR
.+ Compiler": Checking whether the CXX compiler is IAR using "" did
not match "IAR .+ Compiler": Determining if the CXX compiler works
failed with the following output: Change Dir:
/media/fastrl-master/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_662e1/fast" /usr/bin/make -f
CMakeFiles/cmTC_662e1.dir/build.make CMakeFiles/cmTC_662e1.dir/build
make1: Entering directory '/media/fastrl-master/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o
/usr/local/src/cmake-3.12.3 -o
CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o -c
/media/fastrl-master/CMakeFiles/CMakeTmp/testCXXCompiler.cxx make1:
execvp: /usr/local/src/cmake-3.12.3: Permission denied
CMakeFiles/cmTC_662e1.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o' failed make1: *
[CMakeFiles/cmTC_662e1.dir/testCXXCompiler.cxx.o] Error 127 make1:
Leaving directory '/media/fastrl-master/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_662e1/fast' failed make: *
[cmTC_662e1/fast] Error 2

WebAssembly demo guide fails due missing files

Following step by step the Developer's Guide it fails for me on MAC.
http://webassembly.org/getting-started/developers-guide/
I have a clean mac installation 10.11.6 (15G31) and here is the log.
Mac-MBP:emsdk_portable wasm$ ./emsdk activate clang-incoming-64bit emscripten-incoming-64bit sdk-incoming-64bit
Writing .emscripten configuration file to user home directory /Users/wasm/
The Emscripten configuration file /Users/wasm/.emscripten has been rewritten with the following contents:
import os
LLVM_ROOT='/Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin'
NODE_JS='/Users/wasm/repo/webassembly/emsdk_portable/node/4.1.1_64bit/bin/node'
EMSCRIPTEN_ROOT='/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming'
EMSCRIPTEN_NATIVE_OPTIMIZER='/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming_64bit_optimizer/optimizer'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = '/var/folders/wk/mngy_vmn0xs6j32tm53vvg7m0000gn/T'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
To conveniently access the selected set of tools from the command line, consider adding the following directories to PATH, or call 'source ./emsdk_env.sh' to do this for you.
/Users/wasm/repo/webassembly/emsdk_portable:/Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin:/Users/wasm/repo/webassembly/emsdk_portable/node/4.1.1_64bit/bin:/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming
Mac-MBP:emsdk_portable wasm$ source ./emsdk_env.sh
Adding directories to PATH:
PATH += /Users/wasm/repo/webassembly/emsdk_portable
PATH += /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin
PATH += /Users/wasm/repo/webassembly/emsdk_portable/node/4.1.1_64bit/bin
PATH += /Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming
Setting environment variables:
EM_CONFIG = /Users/wasm/.emscripten
EMSCRIPTEN = /Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming
Mac-MBP:emsdk_portable wasm$ cd ..
Mac-MBP:webassembly wasm$ emmc --version
-bash: emmc: command not found
Mac-MBP:webassembly wasm$ emcc --version
INFO:root:generating system asset: is_vanilla.txt... (this will be cached in "/Users/wasm/.emscripten_cache/is_vanilla.txt" for subsequent builds)
INFO:root: - ok
emcc (Emscripten gcc/clang-like replacement) 1.36.14 (commit ca2685c89546ce5f7c01e1bc769b7d2a401093dc)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Mac-MBP:webassembly wasm$
Mac-MBP:webassembly wasm$ mkdir hello
Mac-MBP:webassembly wasm$ cd hello
Mac-MBP:hello wasm$ echo '#include ' > hello.c
Mac-MBP:hello wasm$ echo 'int main(int argc, char ** argv) {' >> hello.c
Mac-MBP:hello wasm$ echo 'printf("Hello, world!\n");' >> hello.c
Mac-MBP:hello wasm$ echo '}' >> hello.c
Mac-MBP:hello wasm$ emcc hello.c -s WASM=1 -o hello.html
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:retrieving port: binaryen from https://github.com/WebAssembly/binaryen/archive/version_21.zip
WARNING:root:unpacking port: binaryen
INFO:root:generating port: binaryen_tag_version_21.txt... (this will be cached in "/Users/wasm/.emscripten_cache/asmjs/binaryen_tag_version_21.txt" for subsequent builds)
INFO:root:building port: binaryen
-- The C compiler identification is Clang 3.9.0
-- The CXX compiler identification is Clang 3.9.0
-- Check for working C compiler: /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin/clang
-- Check for working C compiler: /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin/clang++
-- Check for working CXX compiler: /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Building with -std=c++11
-- Building with -msse2
-- Building with -mfpmath=sse
-- Building with -Wall
-- Building with -Werror
-- Building with -Wextra
-- Building with -Wno-unused-parameter
-- Building with -fno-omit-frame-pointer
-- Building with -fPIC
-- Building with -O2
-- Building with -UNDEBUG
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
binaryen
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21
Scanning dependencies of target wasm
Scanning dependencies of target asmjs
Scanning dependencies of target support
Scanning dependencies of target passes
[ 1%] Building CXX object src/support/CMakeFiles/support.dir/archive.cpp.o
[ 2%] Building CXX object src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o
[ 4%] Building CXX object src/wasm/CMakeFiles/wasm.dir/wasm.cpp.o
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/support/archive.cpp:17:
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/support/archive.h:27:10: fatal error: 'cstdint' file not found
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/asmjs/asm_v_wasm.cpp:17:
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/asm_v_wasm.h:20:
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/mixed_arena.h:20:10: fatal error: 'atomic' file not found
#include
^
#include
^
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/wasm/wasm.cpp:17:
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/wasm.h:46:10: fatal error: 'cassert' file not found
#include
^
[ 5%] Building CXX object src/passes/CMakeFiles/passes.dir/pass.cpp.o
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/passes/pass.cpp:17:10: fatal error: 'chrono' file not found
#include
^
1 error generated.
1 error generated.
make[2]: *** [src/support/CMakeFiles/support.dir/archive.cpp.o] Error 1
make[1]: *** [src/support/CMakeFiles/support.dir/all] Error 2make[2]:
*** [src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [src/asmjs/CMakeFiles/asmjs.dir/all] Error 2
[ 8%] Building CXX object src/passes/CMakeFiles/passes.dir/CoalesceLocals.cpp.o
[ 8%] Building CXX object src/wasm/CMakeFiles/wasm.dir/wasm-binary.cpp.o
1 error generated.
make[2]: *** [src/wasm/CMakeFiles/wasm.dir/wasm.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/wasm/wasm-binary.cpp:17:
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/wasm-binary.h:24:10: fatal error: 'cassert' file not found
#include
^
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/passes/CoalesceLocals.cpp:25:10: fatal error: 'algorithm' file not found
#include
^
[ 10%] Building CXX object src/passes/CMakeFiles/passes.dir/CodePushing.cpp.o
1 error generated.
make[2]: *** [src/passes/CMakeFiles/passes.dir/pass.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/passes/CodePushing.cpp:22:
/Users/wasm/.emscripten_ports/binaryen/binaryen-version_21/src/wasm.h:46:10: fatal error: 'cassert' file not found
#include
^
1 error generated.
make[2]: *** [src/passes/CMakeFiles/passes.dir/CoalesceLocals.cpp.o] Error 1
1 error generated.
make[2]: *** [src/passes/CMakeFiles/passes.dir/CodePushing.cpp.o] Error 1
make[1]: *** [src/passes/CMakeFiles/passes.dir/all] Error 2
1 error generated.
make[2]: *** [src/wasm/CMakeFiles/wasm.dir/wasm-binary.cpp.o] Error 1
make[1]: *** [src/wasm/CMakeFiles/wasm.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/emcc", line 13, in
emcc.run()
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/emcc.py", line 1334, in run
compile_source_file(i, input_file)
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/emcc.py", line 1323, in compile_source_file
args = get_bitcode_args([input_file]) + ['-emit-llvm', '-c', '-o', output_file]
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/emcc.py", line 1306, in get_bitcode_args
args = system_libs.process_args(args, shared.Settings)
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/system_libs.py", line 636, in process_args
args = port.process_args(Ports, args, settings, shared)
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/ports/binaryen.py", line 34, in process_args
get(ports, settings, shared)
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/ports/binaryen.py", line 29, in get
return [shared.Cache.get('binaryen_tag_' + TAG, create, what='port', extension='.txt')]
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/cache.py", line 95, in get
temp = creator()
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/ports/binaryen.py", line 24, in create
ports.build_native(os.path.join(ports.get_dir(), 'binaryen', 'binaryen-' + TAG))
File "/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/tools/system_libs.py", line 607, in build_native
subprocess.check_call(['cmake', '--build', '.'] + make_args, env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--', '-j', '4']' returned non-zero exit status 2
Mac-MBP:hello wasm$ emcc hello.c -s WASM=1 -o hello.htmlc
Mac-MBP:hello wasm$ whi
which while
Mac-MBP:hello wasm$ whi
which while
Mac-MBP:hello wasm$ which emcc
/Users/wasm/repo/webassembly/emsdk_portable/emscripten/incoming/emcc
Mac-MBP:hello wasm$
Mac-MBP:hello wasm$ clang -v
clang version 3.9.0 (https://github.com/kripken/emscripten-fastcomp-clang/ b6ea91778b2b30e6746f2a5f2baba463948729a4) (https://github.com/kripken/emscripten-fastcomp/ dfcb07a871addf339ffac17e606e16e97e8c5f71) (emscripten 1.36.14 : 1.36.14)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/wasm/repo/webassembly/emsdk_portable/clang/fastcomp/build_incoming_64/bin
Mac-MBP:hello wasm$
Looks like you're hitting this bug.
The following was suggested to resolve the issue:
Download binaryen.
Install it using cmake . && make
Download EMCC SDK
Install platform specific requirements
Install EMCC compiler following the instructions
To verify everything installed run emcc -v

CMake compiling results in errors

The C compiler identification is unknown The CXX compiler
identification is unknown Check for working C compiler:
C:/MinGW/bin/gcc.exe Check for working C compiler:
C:/MinGW/bin/gcc.exe -- broken CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.2/Modules/CMakeTestCCompiler.cmake:61
(message): The C compiler "C:/MinGW/bin/gcc.exe" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: C:/SFML-2.2/bin/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe"
"cmTryCompileExec3616319305/fast"
C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec3616319305.dir\build.make
CMakeFiles/cmTryCompileExec3616319305.dir/build
mingw32-make.exe[1]: Entering directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E
cmake_progress_report C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o
CMakeFiles\cmTryCompileExec3616319305.dir\testCCompiler.c.obj -c
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTryCompileExec3616319305.dir\build.make:56: recipe for
target
'CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: Leaving directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
mingw32-make.exe[1]: ***
[CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj] Error
1
Makefile:116: recipe for target 'cmTryCompileExec3616319305/fast'
failed
mingw32-make.exe: *** [cmTryCompileExec3616319305/fast] Error 2
CMake will not be able to correctly generate this project. Call
Stack (most recent call first): CMakeLists.txt:16 (project)
Configuring incomplete, errors occurred! See also
"C:/SFML-2.2/bin/CMakeFiles/CMakeOutput.log". See also
"C:/SFML-2.2/bin/CMakeFiles/CMakeError.log".
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: C:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build
flags: Id flags:
The output was: 1
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build
flags: Id flags: -c
The output was: 1
Checking whether the CXX compiler is IAR using "" did not match "IAR
.+ Compiler": g++.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir: C:/SFML-2.2/bin/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe"
"cmTryCompileExec3616319305/fast" C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec3616319305.dir\build.make
CMakeFiles/cmTryCompileExec3616319305.dir/build
mingw32-make.exe[1]: Entering directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o
CMakeFiles\cmTryCompileExec3616319305.dir\testCCompiler.c.obj -c
C:\SFML-2.2\bin\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTryCompileExec3616319305.dir\build.make:56: recipe for
target 'CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj'
failed
mingw32-make.exe[1]: Leaving directory
'C:/SFML-2.2/bin/CMakeFiles/CMakeTmp'
mingw32-make.exe[1]: ***
[CMakeFiles/cmTryCompileExec3616319305.dir/testCCompiler.c.obj] Error
1
Makefile:116: recipe for target 'cmTryCompileExec3616319305/fast'
failed
mingw32-make.exe: *** [cmTryCompileExec3616319305/fast] Error 2
To answer the question you never asked ... You don't have a compiler installed that CMake is able to find and use. Install one and try again.

MinGW “The procedure entry point libintl_setlocale could not be located …”

I have problem building a project under Windows 7 64bit. I already looked similar questions on SO, but didn't found proper solution. When I run:
cmake -v -G "MSYS Makefiles" CMakeLists.txt
it gives me following output:
> -- The C compiler identification is unknown
-- Check for working C compiler: c:/MinGW/bin/gcc.exe
-- Check for working C compiler: c:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCo
mpiler.cmake:61 (message):
The C compiler "c:/MinGW/bin/gcc.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programmi
ng/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec1735268707/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1735268707.dir/build.make
CMakeFiles/cmTryCompileExec1735268707.dir/build
make[1]: Entering directory
`/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMak
eFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/testCCompiler.c
make[1]: ***
[CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1
make[1]: Leaving directory
Also I get next error message 3 times, during compilation attempt, it says "The procedure entry point libintl_setlocale could not be located in the library libintl-8.dll"
CMakeError.log:
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec2453403923/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec2453403923.dir/build.make
CMakeFiles/cmTryCompileExec2453403923.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/c/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
make[1]: *
[CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj] Error
1 make: * [cmTryCompileExec2453403923/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec78678067/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec78678067.dir/build.make
CMakeFiles/cmTryCompileExec78678067.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
* [CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj] Error 1 make: * [cmTryCompileExec78678067/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec1735268707/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec1735268707.dir/build.make
CMakeFiles/cmTryCompileExec1735268707.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: ***
[CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error
1 make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec1735268707/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Also my Path Environment Variable:
C:\Program Files (x86)\PC Connectivity Solution\;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files
(x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files
(x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS
Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files
(x86)\AMD
APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program
Files\Sony\VAIO Improvement\;C:\Program Files (x86)\Sony\VAIO Startup
Setting Tool;C:\Program Files (x86)\Windows Live\Shared;c:\Program
Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program
Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft
SQL Server\100\DTS\Binn\;C:\Program Files
(x86)\MVActiveX\;C:\Java\jdk1.7.0_09\bin;C:\Program
Files\Microsoft\Web Platform Installer\;C:\Program Files
(x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files
(x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program
Files\TortoiseHg\;C:\Program
Files\MATLAB\R2013a\runtime\win64;C:\Program
Files\MATLAB\R2013a\bin;C:\MinGW\bin;C:\Program Files (x86)\CMake\bin
I installed and reinstalled mingw and investigated my path variable, but still have no solution. Any ideas, where I am wrong?
I just found the answer to this: I had another libintl-8.dll in my path.
Do this from the command line:
where libintl-8.dll
Then rename ALL of them except the one in the MinGW tree.
If that fails, then a reinstall of your MinGW tree may be needed. Good luck.
Drop libintl-8.dll in System32/SysWOW64 and it should work fine.
This is a somewhat ignorant guess, but the problem with libintl-8.dll could arise from path issues. Somewhere in your path, you could have an older version of the lib with different entrypoints. Make sure you have the latest version of MinGW and all relevant libraries, and then try moving MinGW\bin to the top of your path variable.
For another example of what appears to be this problem in action, see: MinGW "The procedure entry point libiconv could not be located ..."
The answer in that linked question helped me resolve a similar problem I was having.