Answer the question
In order to leave comments, you need to log in
How to fix compilation error on MSYS with CMake?
When compiling a project on Windows using MSYS2, after checking all the dependencies, the compilation fails, how can I fix this problem? Do I understand correctly that some libraries are missing?
$ make release-static
mkdir -p build/release
cd build/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release ../.. && make
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 6.1.7601.
-- The C compiler identification is MSVC 19.16.27027.1
-- The CXX compiler identification is MSVC 19.16.27027.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could not find DEVELOPER_LOCAL_TOOLS in env (not required)
-- BOOST_IGNORE_SYSTEM_PATHS defaults to OFF
-- Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)
-- Building for a 64-bit system
-- Building internal libraries as static
-- Could not find DATABASE in env (not required unless you want to change database type from default: lmdb)
-- Using LMDB as default DB type
-- looking for liblzma
-- Could not find libunwind (missing: LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)
-- Stack trace on exception disabled
-- Found OpenSSL: C:/msys64/mingw64/lib/libcrypto.dll.a (found version "1.1.1b")
-- Using OpenSSL include dir at C:/msys64/mingw64/include
-- Could not find miniupnp
-- Using miniupnpc from local source tree for static build
-- Looking for libunbound
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - not found
-- Looking for endian.h
-- Looking for endian.h - not found
-- Looking for dlfcn.h
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for iphlpapi.h
-- Looking for iphlpapi.h - not found
-- Looking for login_cap.h
-- Looking for login_cap.h - not found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for netdb.h
-- Looking for netdb.h - not found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Looking for pwd.h
-- Looking for pwd.h - not found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/sha2.h
-- Looking for sys/sha2.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/sysctl.h
-- Looking for sys/sysctl.h - not found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for winsock2.h
-- Looking for winsock2.h - found
-- Looking for ws2tcpip.h
-- Looking for ws2tcpip.h - found
-- Looking for _beginthreadex
-- Looking for _beginthreadex - found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for arc4random_uniform
-- Looking for arc4random_uniform - not found
-- Looking for random
-- Looking for random - not found
-- Looking for reallocarray
-- Looking for reallocarray - not found
-- Looking for recvmsg
-- Looking for recvmsg - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for sendmsg
-- Looking for sendmsg - not found
-- Looking for setregid
-- Looking for setregid - not found
-- Looking for setresgid
-- Looking for setresgid - not found
-- Looking for setresuid
-- Looking for setresuid - not found
-- Looking for setreuid
-- Looking for setreuid - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for setsid
-- Looking for setsid - not found
-- Looking for setusercontent
-- Looking for setusercontent - not found
-- Looking for sigprocmask
-- Looking for sigprocmask - not found
-- Looking for sleep
-- Looking for sleep - not found
-- Looking for snprintf
-- Looking for snprintf - not found
-- Looking for socketpair
-- Looking for socketpair - not found
-- Looking for srandom
-- Looking for srandom - not found
-- Looking for strsep
-- Looking for strsep - not found
-- Looking for strftime
-- Looking for strftime - found
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strptime
-- Looking for strptime - not found
-- Looking for tzset
-- Looking for tzset - found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for writev
-- Looking for writev - not found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for stddef.h
CMake Warning (dev) at C:/msys64/mingw64/share/cmake-3.13/Modules/CheckIncludeFile.cmake:70 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
iphlpapi;ws2_32
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
C:/msys64/mingw64/share/cmake-3.13/Modules/CheckTypeSize.cmake:227 (check_include_file)
external/unbound/configure_checks.cmake:138 (check_type_size)
external/unbound/CMakeLists.txt:35 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Check size of gid_t
-- Check size of gid_t - failed
-- Check size of in_addr_t
-- Check size of in_addr_t - failed
-- Check size of in_port_t
-- Check size of in_port_t - failed
-- Check size of int16_t
-- Check size of int16_t - done
-- Check size of int32_t
-- Check size of int32_t - done
-- Check size of int64_t
-- Check size of int64_t - done
-- Check size of int8_t
-- Check size of int8_t - done
-- Check size of pid_t
-- Check size of pid_t - failed
-- Check size of rlim_t
-- Check size of rlim_t - failed
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Check size of uid_t
-- Check size of uid_t - failed
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Looking for PTHREAD_PRIO_INHERIT
-- Looking for PTHREAD_PRIO_INHERIT - not found
-- Looking for pthread_rwlock_t
-- Looking for pthread_rwlock_t - not found
-- Looking for pthread_spinlock_t
-- Looking for pthread_spinlock_t - not found
-- Looking for openssl/conf.h
-- Looking for openssl/conf.h - found
-- Looking for openssl/engine.h
-- Looking for openssl/engine.h - found
-- Looking for openssl/err.h
-- Looking for openssl/err.h - found
-- Looking for openssl/rand.h
-- Looking for openssl/rand.h - found
-- Looking for openssl/ssl.h
-- Looking for openssl/ssl.h - found
-- Looking for NID_secp384r1
-- Looking for NID_secp384r1 - found
-- Looking for NID_X9_62_prime256v1
-- Looking for NID_X9_62_prime256v1 - found
-- Looking for sk_SSL_COMP_pop_free
-- Looking for sk_SSL_COMP_pop_free - not found
-- Looking for SSL_COMP_get_compression_methods
-- Looking for SSL_COMP_get_compression_methods - not found
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - not found
-- Looking for EVP_sha1
-- Looking for EVP_sha1 - not found
-- Looking for EVP_sha256
-- Looking for EVP_sha256 - not found
-- Looking for EVP_sha512
-- Looking for EVP_sha512 - not found
-- Looking for FIPS_mode
-- Looking for FIPS_mode - not found
-- Looking for HMAC_Update
-- Looking for HMAC_Update - not found
-- Looking for OPENSSL_config
-- Looking for OPENSSL_config - not found
-- Looking for SHA512_Update
-- Looking for SHA512_Update - not found
-- Looking for LIBRESSL_VERSION_TEXT
-- Looking for LIBRESSL_VERSION_TEXT - not found
-- Using 64-bit LMDB from source tree
-- Found Boost Version: 106900
-- Found Git: C:/msys64/usr/bin/git.exe
Doxygen: graphviz not found - graphs disabled
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/User/Desktop/koson/build/release
make[1]: вход в каталог «/c/Users/User/Desktop/koson/build/release»
make[1]: *** Не заданы цели и не найден make-файл. Останов.
make[1]: выход из каталога «/c/Users/User/Desktop/koson/build/release»
make: *** [Makefile:81: release-static-64] Ошибка 2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question