WebAssembly demo guide fails due missing files - c++

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

Related

Failure to compile for arm64 devices

Hello i am quite new to linux and i am trying to do some cross-compilation to run a flutter app on an external device.
Setup :
VM under virtual box : Ubuntu 22.04 LTS
External device : (imx8) with arm64
So i need to compile my app to match the arm64 architecture but i am having many errors that i have no idea how to fix and no idea where they come from :
Failed to cmake:
-- The CXX compiler identification is Clang 14.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ - broken
-- Configuring incomplete, errors occurred!
See also "/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeOutput.log".
See also "/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeError.log".
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_46f48/fast && /usr/bin/gmake -f CMakeFiles/cmTC_46f48.dir/build.make CMakeFiles/cmTC_46f48.dir/build
gmake[1]: Entering directory '/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o
/usr/bin/clang++ --target=aarch64-linux-gnu --sysroot=/opt/arm64-sysroot -MD -MT CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -MF
CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -c
/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_46f48
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_46f48.dir/link.txt --verbose=1
/usr/bin/clang++ --target=aarch64-linux-gnu --sysroot=/opt/arm64-sysroot CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -o cmTC_46f48
/usr/bin/aarch64-linux-gnu-ld: cannot find Scrt1.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtbeginS.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lstdc++: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lm: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtendS.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtn.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_46f48.dir/build.make:100: cmTC_46f48] Error 1
gmake[1]: Leaving directory '/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_46f48/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
For more specification, i am using the flutter-elinux package to cross-compile and i have raised an issue there, but i am not sure the issue comes from the package as i don't know anything about linux compilation.
I have installed manually the following packages :
sudo apt install cpp-aarch64-linux-gnu
sudo apt install binutils-aarch64-linux-gnu
Thanks in advance for any help i really need to get this working...
EDIT : i have tried another solution using a docker container and the image arm64v8/ubuntu:18.04.
I have created a systroot ubuntu18-arm64-sysroot on my host and i use it to compile my app in arm64 arch. I am having the following error only :
Failed to cmake:
-- The CXX compiler identification is unknown
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++
-- Check for working CXX compiler: /home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++ - broken
-- Configuring incomplete, errors occurred!
See also "/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeOutput.log".
See also "/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeError.log".
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_848af/fast && /usr/bin/gmake -f
CMakeFiles/cmTC_848af.dir/build.make CMakeFiles/cmTC_848af.dir/build
gmake[1]: Entering directory '/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o
/home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++ -o CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o -c
/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
aarch64-binfmt-P: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory
gmake[1]: *** [CMakeFiles/cmTC_848af.dir/build.make:78: CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o] Error 255
gmake[1]: Leaving directory '/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_848af/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)

I have error in cmake make make install fmm

I want to install fast map matching fmm on windows (win7)
and cmake has an error: after command "cmake .."
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /cygdrive/c/MinGW/bin/c++.exe
-- Check for working CXX compiler: /cygdrive/c/MinGW/bin/c++.exe - broken
CMake Error at /usr/share/cmake-3.20.0/Modules/CMakeTestCXXCompiler.cmake:59 (message):
The C++ compiler
"/cygdrive/c/MinGW/bin/c++.exe"
It's not able to compile a simple test program.
It fails with the following output:
Change Dir: /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make.exe -f Makefile cmTC_c3891/fast && /usr/bin/make -f CMakeFiles/cmTC_c3891.dir/build.make CMakeFiles/cmTC_c3891.dir/build
make[1]: Entering directory `/cygdrive/e/fmm/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o
/cygdrive/c/MinGW/bin/c++.exe -O3 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -o CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o -c /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++.exe: error: /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx: No such file or directory
c++.exe: fatal error: no input files
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o] Error 1
make[1]: Leaving directory `/cygdrive/e/fmm/build/CMakeFiles/CMakeTmp'
make: *** [cmTC_c3891/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (project)
and because cmake not success, make -j8 has error
make -j8
make: *** No targets specified and no makefile found. Stop.
update:cmake has successed,the error is that i don't install enough librarys.
but i have error in make and make install
E:/anaconda/include/pyport.h:726:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
726 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
In file included from /usr/include/cpl_progress.h:33,
from /usr/include/ogrsf_frmts.h:34,
from /cygdrive/e/fmm/src/core/geometry.hpp:14,
from /cygdrive/e/fmm/build/python/CMakeFiles/pyfmm.dir/fmmPYTHON_wrap.cxx:3392:
/usr/include/cpl_port.h:156:12: fatal error: direct.h: No such file or directory
156 | # include <direct.h>
i have tried to switch anaconda to the 64 bit ,it has the same error

MinGw can't compile test file from cmake

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.

Failing to compile a c++ application under MacOS Catalina 10.15

Note: For how I solved the problem, please look at the end of the post.
Yesterday, I have updated to MacOS Catalina 10.15 and since then I am trying to compile this c++ application (a fork of the nori educational ray tracer), but for some reason CMake fails to find the pthread library. Here is the output after running CMake:
$ cmake ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Performing Test HAVE_GCC_INLINE_ASM_AVX
-- Performing Test HAVE_GCC_INLINE_ASM_AVX - Failed
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN - Failed
-- TBB: NOT using libc++.
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake.app/Contents/share/cmake-3.15/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
ext/nanogui/ext/glfw/CMakeLists.txt:60 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/harry/dev/nori/build/CMakeFiles/CMakeOutput.log".
See also "/Users/harry/dev/nori/build/CMakeFiles/CMakeError.log".
And following is the CMakeError.log:
Performing C++ SOURCE FILE Test HAVE_GCC_INLINE_ASM_AVX failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_1e411/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_1e411.dir/build.make CMakeFiles/cmTC_1e411.dir/build
Building CXX object CMakeFiles/cmTC_1e411.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -fvisibility=hidden -Wno-switch -Wno-tautological-compare -Wno-deprecated-register -DHAVE_GCC_INLINE_ASM_AVX -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -o CMakeFiles/cmTC_1e411.dir/src.cxx.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/src.cxx
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: warning: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_1e411.dir/src.cxx.o] Error 1
make: *** [cmTC_1e411/fast] Error 2
Source file was:
int main()
{
#if defined(__GNUC__) && defined(__SSE2__)
int n = 0;
int eax = 0;
int edx = 0;
__asm__(
"xgetbv ;"
"vzeroupper "
: "=a"(eax), "=d"(edx) : "c"(n) : );
#else
#error No GCC style inline asm supported for AVX instructions
#endif
}
Performing C++ SOURCE FILE Test HAVE_SYSCONF_NPROCESSORS_ONLN failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_db06f/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_db06f.dir/build.make CMakeFiles/cmTC_db06f.dir/build
Building CXX object CMakeFiles/cmTC_db06f.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -fvisibility=hidden -Wno-switch -Wno-tautological-compare -Wno-deprecated-register -DHAVE_SYSCONF_NPROCESSORS_ONLN -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -o CMakeFiles/cmTC_db06f.dir/src.cxx.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/src.cxx
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: warning: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_db06f.dir/src.cxx.o] Error 1
make: *** [cmTC_db06f/fast] Error 2
Source file was:
#include <unistd.h>
int main()
{
sysconf(_SC_NPROCESSORS_ONLN);
}
Performing C++ SOURCE FILE Test HAS_LIBCPP failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_4098b/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_4098b.dir/build.make CMakeFiles/cmTC_4098b.dir/build
Building CXX object CMakeFiles/cmTC_4098b.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -fvisibility=hidden -DHAS_LIBCPP -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -o CMakeFiles/cmTC_4098b.dir/src.cxx.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/src.cxx
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: warning: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Wincompatible-sysroot]
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
make[1]: *** [CMakeFiles/cmTC_4098b.dir/src.cxx.o] Error 1
make: *** [cmTC_4098b/fast] Error 2
...and run output:
Return value: 1
Source file was:
#include <iostream>
int main(int argc, char **argv) { std::cout << "test"; return 0; }
Performing C++ SOURCE FILE Test SUPPORTS_STDCXX11 failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_74f47/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_74f47.dir/build.make CMakeFiles/cmTC_74f47.dir/build
Building CXX object CMakeFiles/cmTC_74f47.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -fvisibility=hidden -DSUPPORTS_STDCXX11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -std=c++11 -o CMakeFiles/cmTC_74f47.dir/src.cxx.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/src.cxx
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: warning: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_74f47.dir/src.cxx.o] Error 1
make: *** [cmTC_74f47/fast] Error 2
Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test SUPPORTS_MRTM failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_60b35/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_60b35.dir/build.make CMakeFiles/cmTC_60b35.dir/build
Building CXX object CMakeFiles/cmTC_60b35.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -fvisibility=hidden -DSUPPORTS_MRTM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mrtm -Werror -o CMakeFiles/cmTC_60b35.dir/src.cxx.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/src.cxx
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: error: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Werror,-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_60b35.dir/src.cxx.o] Error 1
make: *** [cmTC_60b35/fast] Error 2
Source file was:
int main() { return 0; }
Determining if the include file pthread.h exists failed with the following output:
Change Dir: /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_b4d5d/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_b4d5d.dir/build.make CMakeFiles/cmTC_b4d5d.dir/build
Building C object CMakeFiles/cmTC_b4d5d.dir/CheckIncludeFile.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-deprecated-declarations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk -o CMakeFiles/cmTC_b4d5d.dir/CheckIncludeFile.c.o -c /Users/harry/dev/nori/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
clang: warning: using sysroot for 'DriverKit' but targeting 'MacOSX' [-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_b4d5d.dir/CheckIncludeFile.c.o] Error 1
make: *** [cmTC_b4d5d/fast] Error 2
The nori ray tracer expects XCode along with the command line tools installed on a MacOS machine. I have Xcode version 11.1 and the corresponding command line tools.
As far as I can see from the CMakeError.log file, clang produces an error, because of an invalid version number of mmacosx-version-min.
clang: error: invalid version number in '-mmacosx-version-min=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk'
I have researched a while trying to find clues on the topic, but failed to find something that solves my problem. The version of clang I have, is the one installed with Xcode: Apple clang version 11.0.0.
I am open to hear any suggestion and provide any additional information on my configuration you may find useful to pinpoint the issue.
P.S.: I forgot to mention, that back when I first started working on this project, I had a similar issue on MacOS Mojave here. And I was able to fix it by installing the SDK headers as noted in this post:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Working solution: Installing an older version of XCode (10.2.1 works well for me) and redirecting to it (making it the active developer directory with xcode-select -s [path-to-old-xcode]) turns out to solve my problem. The solution was proposed by Aaron19960821 from GitHub. See here.

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.