Unability to compile metis library with mingw

Hi everybody,

I not able to compile metis library with minGW with the following error message.

The C compiler identification is GNU 4.4.3
The CXX compiler identification is GNU 4.4.3
Check for working C compiler: C:/strawberry/c/bin/gcc.exe
Check for working C compiler: C:/strawberry/c/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/strawberry/c/bin/g++.exe
Check for working CXX compiler: C:/strawberry/c/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for execinfo.h
Looking for execinfo.h - not found
Looking for getline
Looking for getline - not found
CMake Error at CMakeLists.txt:9 (ADD_EXECUTABLE):
Cannot find source file:

GKlib/conf/check_thread_storage.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx

CMake Error: Internal CMake error, TryCompile generation of cmake failed
checking for thread-local storage - not found
Configuring incomplete, errors occurred!

It would be great if somebody could help me finding a solution.
Thanks in advance,

RE: Re: Unability to compile metis library with mingw

Hi,

This problem should be corrected if you modify the top-level CMakeLists.txt file:

replace line 4:
set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib")

by
set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib")

RE: You can deal this by manually

You can deal this by manually defining the file path, i.e.
cmake -G "MinGW Makefiles" -DCMAKE_CONFIGURATION-TYPES="Release" -DGKLIB_PATH="..\..\GKlib" ..\..

This would create the project makefile.

However, there is an issue with MinGW. When you try to build the code, say using mingw32-make, it points out an error: the file sys/resources.h is missing.
Indeed, MinGW does not have this file. if anyone, knows the best fix, please comment.