Getting error while building android.mk via ndk-build - compilation

I am building some native code in my Android project using ndk-build.
This is my android.mk content:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := julius_arm
LOCAL_SRC_FILES := interface.c
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := julius sent
LOCAL_CFLAGS := -DANDROID_DEBUG
LOCAL_LDLIBS := -lc -lz -lgcc -llog -L$(LOCAL_PATH)/lib -llibjulius-llibsent
include $(BUILD_SHARED_LIBRARY)
android.mk file is in the same directory as the include folder and lib folder in the jni directory.
The include folder contains julius and sent folders.
The lib folder contains libjulius.a and libsent.a.
When i try to build it using ndk-build. I get the following error:
00af158\Desktop\microsoft\JuliusForAndroid\app\src\main\jni\lib>ndk-build
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
: current module
Compile : julius_arm <= interface.c
SharedLibrary : libjulius_arm.so
ndk-r13b/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -llibjulius
ndk-r13b/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -llibsent
: error: linker command failed with exit code 1 (use -v to see invocation)
C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/obj/local/arm64-v8a/libjulius_arm.so] Error 1
I am stuck at this point. Please Help.

Related

Can’t build pytorch from source on macOS 10.14 for CUDA support: “no member named ‘out_of_range’ in namespace ‘std’”

I am following the instructions of the get started page of Pytorch site to build pytorch with CUDA support on mac OS 10.14 (Mojave) but I am getting an error:
[ 80%] Building CXX object
caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/alias_analysis.cpp.o
In file included from /Users/adriantineo/dev/python/pytorch/torch/csrc/jit/passes/alias_analysis.cpp:1:
In file included from /Users/adriantineo/dev/python/pytorch/torch/csrc/jit/passes/alias_analysis.h:3:
/Users/adriantineo/dev/python/pytorch/c10/util/flat_hash_map.h:1367:24: error: no
member named 'out_of_range' in namespace 'std'
throw std::out_of_range("Argument passed to at() was not in the map.");
~~~~~^
/Users/adriantineo/dev/python/pytorch/c10/util/flat_hash_map.h:1374:24: error: no
member named 'out_of_range' in namespace 'std'
throw std::out_of_range("Argument passed to at() was not in the map.");
~~~~~^
[ 80%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/batch_mm.cpp.o
[ 80%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/bailout_graph.cpp.o
[ 80%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/canonicalize.cpp.o
[ 80%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/constant_propagation.cpp.o
[ 80%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/constant_pooling.cpp.o
[ 81%] Building CXX object caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/common_subexpression_elimination.cpp.o
2 errors generated.
make[2]: *** [caffe2/CMakeFiles/torch.dir/__/torch/csrc/jit/passes/alias_analysis.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [caffe2/CMakeFiles/torch.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 749, in <module>
build_deps()
File "setup.py", line 323, in build_deps
cmake=cmake)
File "/Users/adriantineo/dev/python/pytorch/tools/build_pytorch_libs.py", line 64, in build_caffe2
cmake.build(my_env)
File "/Users/adriantineo/dev/python/pytorch/tools/setup_helpers/cmake.py", line 340, in build
self.run(build_args, my_env)
File "/Users/adriantineo/dev/python/pytorch/tools/setup_helpers/cmake.py", line 93, in run
check_call(command, cwd=self.build_dir, env=env)
File "/Users/adriantineo/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 2.
I have followed the steps for the prerequisites as stated in the documentation. I am using Anaconda 4.7.5, Python 3.7.3, and CUDA Toolkit 10.1.
On top of that, I am using Xcode command line tools for Xcode 8.2, since the ones for Xcode 10 were giving trouble with the error message fatal error: 'string.h' file not found. I found the tip to use an older version of Xcode command line tools here.
More info about the build:
-- ******** Summary ********
-- CMake version : 3.14.5
-- CMake command : /Users/adriantineo/anaconda3/bin/cmake
-- System : Darwin
-- C++ compiler : /Library/Developer/CommandLineTools/usr/bin/clang++
-- C++ compiler version : 8.0.0.8000042
-- CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions : TH_BLAS_MKL;ONNX_ML=1
-- CMAKE_PREFIX_PATH : /Users/adriantineo/anaconda3/lib/python3.7/site-packages
-- CMAKE_INSTALL_PREFIX : /Users/adriantineo/dev/python/pytorch/torch
-- CMAKE_MODULE_PATH : /Users/adriantineo/dev/python/pytorch/cmake/Modules;/Users/adriantineo/dev/python/pytorch/cmake/public/../Modules_CUDA_fix
--
-- ONNX version : 1.5.0
-- ONNX NAMESPACE : onnx_torch
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNX_USE_LITE_PROTO : OFF
-- ONNXIFI_DUMMY_BACKEND : OFF
-- ONNXIFI_ENABLE_EXT : OFF
--
-- Protobuf compiler :
-- Protobuf includes :
-- Protobuf libraries :
-- BUILD_ONNX_PYTHON : OFF
--
[...]
-- USE_CUDA : True
-- CUDA static link : OFF
-- USE_CUDNN : OFF
-- CUDA version : 10.1
-- CUDA root directory : /usr/local/cuda
-- CUDA library : /usr/local/cuda/lib/libcuda.dylib
-- cudart library : /usr/local/cuda/lib/libcudart.dylib
-- cublas library : /usr/local/cuda/lib/libcublas.dylib
-- cufft library : /usr/local/cuda/lib/libcufft.dylib
-- curand library : /usr/local/cuda/lib/libcurand.dylib
-- nvrtc : /usr/local/cuda/lib/libnvrtc.dylib
-- CUDA include path : /usr/local/cuda/include
-- NVCC executable : /usr/local/cuda/bin/nvcc
-- CUDA host compiler : /Library/Developer/CommandLineTools/usr/bin/clang
Any tips to troubleshoot the build?
Cuda drivers don't workwith Mojave.
https://devtalk.nvidia.com/default/topic/1042279/cuda-setup-and-installation/cuda-10-and-macos-10-14/

cannot find -lopencv_imgcodecs and -lopencv_videoio when installing caffe

I got the problem when installing Caffe with opencv3.0+ and CUDA on Ubuntu 16.04
I also added opencv_imgcodescs and opencv_videoio to my Makefile, but that's not solving the issue.
I have checked several answers on the Caffe user group, but no answers solve my problem.
My error message:
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lopencv_imgcodecs
/usr/bin/ld: cannot find -lopencv_videoio
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
My setting in Makefile
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5 opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio
My imgcodecs and videoio is under ~/miniconda2/envs/frcnn/include/opencv2/
(fastrcnn) pohsuan#pohsuan-Predator-G9-592:~/miniconda2/envs/fastrcnn/include/opencv2$ ls
aruco dnn.hpp imgcodecs photo structured_light videostab
aruco.hpp dpm.hpp imgcodecs.hpp photo.hpp structured_light.hpp videostab.hpp
bgsegm.hpp face imgproc plot.hpp superres xfeatures2d
bioinspired face.hpp imgproc.hpp reg superres.hpp xfeatures2d.hpp
bioinspired.hpp features2d line_descriptor rgbd surface_matching ximgproc
calib3d features2d.hpp line_descriptor.hpp rgbd.hpp surface_matching.hpp ximgproc.hpp
calib3d.hpp flann ml saliency text xobjdetect.hpp
ccalib flann.hpp ml.hpp saliency.hpp text.hpp xphoto
ccalib.hpp fuzzy objdetect shape tracking xphoto.hpp
core fuzzy.hpp objdetect.hpp shape.hpp tracking.hpp
core.hpp hdf opencv.hpp stereo video
cvconfig.h hdf.hpp opencv_modules.hpp stereo.hpp video.hpp
datasets highgui optflow stitching videoio
dnn highgui.hpp optflow.hpp stitching.hpp videoio.hpp
Where I modified my Makfile.config regarding my Miniconda virtual environment :
ANACONDA_HOME := $(HOME)/miniconda2
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial /home/pohsuan/miniconda2/envs/fastrcnn/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial /home/pohsuan/miniconda2/fastrcnn/lib
Maybe uncomment
OPENCV_VERSION := 3
on line 21, if you haven't already.
Worse case, uninstall OpenCV, and install a version less than 3.
I struggled a lot with this, finally decided to use OpenCV 2.4.9.1, and it worked.

Cross-compilation (ARM) 'VFP register arguments' error

I want to build a DDS 'perftest' application to do some tests between a x64 Kubuntu 15.10 and RaspberryPi 1 B, but in /rtiperftest.5.2.4/perftest_cpp directory there isn't a makefile for armv6 architecture.
I have installed crosstool-ng 1.22 to build application for target armv6 architecture following this HOWTO (Section 4 and 5) but I didn't know how to write the makefile for build 'perftest_cpp' using crosscompiler to run it on RaspberryPi.
Now I have got a makefile (attached) for build 'perftest_cpp' but I get 'uses VFP register arguments' error (with hundred of files) that I can't understand (I only paste one error for make it readable)
/home/ampu/x-tools/armv6-rpi-linux-gnueabi/lib/gcc/armv6-rpi-linux-gnueabi/5.2.0/../../../../armv6-rpi-linux-gnueabi/bin/ld.bfd: error: /opt/rti_connext_dds-5.2.3//lib/armv6vfphLinux3.xgcc4.7.2/libnddscorez.a(SkiplistInfo.o) uses VFP register arguments, ../bin/armv6vfphLinux3.xgcc4.7.2/Release/perftest_cpp does not
/home/ampu/x-tools/armv6-rpi-linux-gnueabi/lib/gcc/armv6-rpi-linux-gnueabi/5.2.0/../../../../armv6-rpi-linux-gnueabi/bin/ld.bfd: failed to merge target specific data of file /opt/rti_connext_dds-5.2.3//lib/armv6vfphLinux3.xgcc4.7.2/libnddscorez.a(SkiplistInfo.o)
collect2: error: ld returned 1 exit status
common2.mk:86: recipe for target '../bin/armv6vfphLinux3.xgcc4.7.2/Release/perftest_cpp' failed
make: *** [../bin/armv6vfphLinux3.xgcc4.7.2/Release/perftest_cpp] Error 1
Here is my Makefile.RPi
ARCH := armv6vfphLinux3.xgcc4.7.2
DEBUG_FLAG := -O4
#DEBUG_FLAG := -g
#DEFINES_ARCH_SPECIFIC := -DRTI_LINUX
cxx_cc := armv6-rpi-linux-gnueabi-g++
cxx_ld := armv6-rpi-linux-gnueabi-g++
cxx_ld_flags := -static-libgcc -ldl -lnsl -lm -L/usr/lib/nptl -lpthread -lrt
include common2.mk
Any idea?
Thank you.
Attached files:
Makefile.RPi
common2.mk

Undefined reference to '_Unwind_GetIP'

I'm having a bit of trouble getting a rustc compiled staticlib for triple, arm-linux-androideabi, to link up nicely within Android Studio.
Steps taken...
Install Rust via multirust
Build a rustc for Android API v14
Build lib with --target=arm-linux-androideabi
Add to jniLibs/ within Android Studio
Create a little C++ shim for hooks to/from JNI
Build and link (almost)
When building my crate, I get the following output:
note: link against the following native artifacts when linking
against this static library
note: the order and any duplication can be significant on some platforms,
and so may need to be preserved
note: library: c
note: library: m
note: library: dl
note: library: log
note: library: gcc
note: library: c
note: library: m
So naturally, my Android.mk includes these libs when using the staticlib.
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hydrogen
LOCAL_SRC_FILES := ../jniLibs/$(TARGET_ARCH_ABI)/libhydrogen.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := hydrogen-android
LOCAL_SRC_FILES := shim.cpp
LOCAL_STATIC_LIBRARIES := hydrogen
LOCAL_LDLIBS := -lc -lm -ldl -llog -lgcc -lc -lm
include $(BUILD_SHARED_LIBRARY)
Building in Android Studio gives me the following output:
:app:buildCppShim
Android NDK: WARNING:/Android.mk:hydrogen: non-system libraries in linker flags: -lgcc -lgccunwind
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] Compile++ thumb: hydrogen-android <= shim.cpp
[armeabi] SharedLibrary : libhydrogen-android.so
[snipped]function sync::rwlock::StaticRwLock::read::ha5ec9717ccd1ed83Lxp: error: undefined reference to 'pthread_rwlock_rdlock'
[snipped]function sys_common::rwlock::RWLock::read::h7f3d472c79e2e1e2Z1q: error: undefined reference to 'pthread_rwlock_rdlock'
[snipped]function sys_common::rwlock::RWLock::read_unlock::hd7d67e9c5c47b9f5B2q: error: undefined reference to 'pthread_rwlock_unlock'
[snipped]function sync::rwlock::StaticRwLock::try_read::hddd396186cced62f8xp: error: undefined reference to 'pthread_rwlock_tryrdlock'
[snipped]function sys_common::rwlock::RWLock::try_read::ha5aede723e91a3c881q: error: undefined reference to 'pthread_rwlock_tryrdlock'
[snipped]function sync::rwlock::StaticRwLock::write::h787666bb30e75d28Ryp: error: undefined reference to 'pthread_rwlock_wrlock'
[snipped]function sys_common::rwlock::RWLock::write::h0273da9a7ade68c0i2q: error: undefined reference to 'pthread_rwlock_wrlock'
[snipped]function sync..rwlock..RwLockWriteGuard$LT$$LP$$RP$$GT$::drop.34348::h4c8fbe45843b9a01: error: undefined reference to 'pthread_rwlock_unlock'
[snipped]function sync::rwlock::StaticRwLock::try_write::h5d30a7fdd53c86b4ezp: error: undefined reference to 'pthread_rwlock_trywrlock'
[snipped]function sys_common::rwlock::RWLock::try_write::h0ec4bcc0cb460718r2q: error: undefined reference to 'pthread_rwlock_trywrlock'
[snipped]function sync::rwlock::StaticRwLock::destroy::ha1e9f51e62905aedXzp: error: undefined reference to 'pthread_rwlock_destroy'
[snipped]function sys_common::rwlock::RWLock::destroy::h602ce773ff2356e6T2q: error: undefined reference to 'pthread_rwlock_destroy'
[snipped]function sys::rwlock::RWLock::read::h241f5fdff06a76ab00u: error: undefined reference to 'pthread_rwlock_rdlock'
[snipped]function sys::rwlock::RWLock::write::h48034b52e6491ea4h3u: error: undefined reference to 'pthread_rwlock_wrlock'
~/bin/rust/src/compiler-rt/lib/builtins/gcc_personality_v0.c
Error:(206) undefined reference to '_Unwind_GetIP'
Error:(273) undefined reference to '_Unwind_SetGR'
Error:(274) undefined reference to '_Unwind_SetGR'
Error:(275) undefined reference to '_Unwind_SetIP'
pthread errors
I'm not sure why I received the errors about pthread, because I have #include <pthread.h> in my shim, and these functions are defined in Android's pthread.
unwind errors
For this, I've tried including unwind.h in the shim and libgccunwind.a in the Android.mk, but still throws the same errors. I found this thread where a hack-solution was to just declare the prototypes in the shim, but when I do this, I receive the following errors about unwind.h
Error:(231, 3) error: previous declaration 'void _Unwind_SetGR(_Unwind_Context*, int, _Unwind_Word)' here
So, it is able to find their declarations when I declare them, because they conflict, but has no idea where they are if I do not? I'm assuming it has to be something wrong with my linking order, but unsure of how to solve it, because the required libs are linked against after pulling in the rust created lib.
Any help would be greatly appreciated!
Edit 1
Adjusted makefile to link during Shared Library creation.
LOCAL_LDLIBS is meaningless for a static library (static libraries don't get linked). You need to add those libraries whenever you use that library in a real binary (like a shared library or executable).
The solution happened to be building unwind and including some portability headers. See module example here

Clion with MinGW not compiling simple Hello World app

I have trouble in compiling a simple hello world application with CLion and MinGW. The buttons for Run and Debug are grayd out.
I have installed MinGW with mingw32-gcc-g++ and mingw32-make packages.
After that I have install CLion which detected automatically the right folder for MinGW. However make, c compiler and c++ compiler will not get the checkmark.
Also in CMakeError.log file found the following:
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: D:/Users/Tau/.clion10/system/cmake/generated/94853116/94853116/__default__0/CMakeFiles/CMakeTmp
Run Build Command:C:/MinGW/bin/mingw32-make.exe "cmTryCompileExec3424130643/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec3424130643.dir\build.make CMakeFiles/cmTryCompileExec3424130643.dir/build
mingw32-make.exe[1]: Entering directory 'D:/Users/Tau/.clion10/system/cmake/generated/94853116/94853116/__default__0/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 138.2344.17\bin\cmake\bin\cmake.exe" -E cmake_progress_report D:\Users\Tau\.clion10\system\cmake\generated\94853116\94853116\__default__0\CMakeFiles\CMakeTmp\CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3424130643.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec3424130643.dir\testCCompiler.c.obj -c D:\Users\Tau\.clion10\system\cmake\generated\94853116\94853116\__default__0\CMakeFiles\CMakeTmp\testCCompiler.c
CMakeFiles\cmTryCompileExec3424130643.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec3424130643.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: Leaving directory 'D:/Users/Tau/.clion10/system/cmake/generated/94853116/94853116/__default__0/CMakeFiles/CMakeTmp'
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec3424130643.dir/testCCompiler.c.obj] Error 1
Makefile:113: recipe for target 'cmTryCompileExec3424130643/fast' failed
mingw32-make.exe: *** [cmTryCompileExec3424130643/fast] Error 2
I am unable to figure out. I have tried also with cygwin x64 and the same issue occurs. What is wrong?
After so much time spent without any clue, I found that actually the crashing softwares were cc1.exe and cc1plus.exe. After using Dependency Waker tool which led mo to manually adding the zlib1.dll file near these two crashing exe, I found that the real reason was that package mingw32-libz was not installed.
I have installed mingw32-libz package in MinGW and removed manually added dlls and I get all checkmarks in settings.

Resources