googletest: Can't compile with MinGW (Win8 x64)
Hi, I’m having trouble building GTest with MinGW, I used bisect to find the commit that broke the build:
a6340420b9cee27f77c5b91bea807121914a5831 is the first bad commit commit a6340420b9cee27f77c5b91bea807121914a5831 Author: kosak kosak@google.com Date: Mon Mar 24 21:58:25 2014 +0000
Implement threading support for gtest on Windows.
Also, stop using localtime(). Instead, use localtime_r() on most systems, localtime_s() on Windows.
The build step output:
$ cmake --build .
[ 25%] Building CXX object CMakeFiles/gtest.dir/src/gtest-all.cc.obj
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1704:3: error: ‘AutoHandle’ does not name a type
AutoHandle thread_;
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:43:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:626:3: error: ‘AutoHandle’ does not name a type
AutoHandle write_handle_;
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:628:3: error: ‘AutoHandle’ does not name a type
AutoHandle child_handle_;
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:633:3: error: ‘AutoHandle’ does not name a type
AutoHandle event_handle_;
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc: In member function ‘virtual int testing::internal::WindowsDeathTest::Wait()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:645:36: error: ‘child_handle_’ was not declared in this scope
const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:645:57: error: ‘event_handle_’ was not declared in this scope
const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:659:3: error: ‘write_handle_’ was not declared in this scope
write_handle_.Reset();
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc: In member function ‘virtual testing::internal::DeathTest::TestRole testing::internal::WindowsDeathTest::AssumeRole()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:709:3: error: ‘write_handle_’ was not declared in this scope
write_handle_.Reset(write_handle);
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:710:3: error: ‘event_handle_’ was not declared in this scope
event_handle_.Reset(::CreateEvent(
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:766:3: error: ‘child_handle_’ was not declared in this scope
child_handle_.Reset(process_info.hProcess);
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc: In function ‘int testing::internal::GetStatusFileDescriptor(unsigned int, size_t, size_t)’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:1232:3: error: ‘AutoHandle’ was not declared in this scope
AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:1235:7: error: ‘parent_process_handle’ was not declared in this scope
if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:1251:26: error: ‘parent_process_handle’ was not declared in this scope
if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:1266:26: error: ‘parent_process_handle’ was not declared in this scope
if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In function ‘void testing::internal::SleepMilliseconds(int)’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:139:6: error: redefinition of ‘void testing::internal::SleepMilliseconds(int)’
void SleepMilliseconds(int n) {
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1377:13: note: ‘void testing::internal::SleepMilliseconds(int)’ previously defined here
inline void SleepMilliseconds(int n) {
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: At global scope:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:143:1: error: ‘AutoHandle’ does not name a type
AutoHandle::AutoHandle()
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:146:1: error: ‘AutoHandle’ does not name a type
AutoHandle::AutoHandle(Handle handle)
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:149:1: error: ‘AutoHandle’ does not name a type
AutoHandle::~AutoHandle() {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:153:1: error: ‘AutoHandle’ does not name a type
AutoHandle::Handle AutoHandle::Get() const {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:157:6: error: ‘AutoHandle’ has not been declared
void AutoHandle::Reset() {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In function ‘void testing::internal::Reset()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:158:29: error: too many arguments to function ‘void testing::internal::Reset()’
Reset(INVALID_HANDLE_VALUE);
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:157:6: note: declared here
void AutoHandle::Reset() {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: At global scope:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:161:6: error: ‘AutoHandle’ has not been declared
void AutoHandle::Reset(HANDLE handle) {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In function ‘void testing::internal::Reset(HANDLE)’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:163:7: error: ‘handle_’ was not declared in this scope
if (handle_ != handle) {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:164:21: error: ‘IsCloseable’ was not declared in this scope
if (IsCloseable()) {
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:169:31: error: ‘IsCloseable’ was not declared in this scope
GTEST_CHECK_(!IsCloseable())
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1250:37: note: in definition of macro ‘GTEST_CHECK_’
if (::testing::internal::IsTrue(condition))
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: At global scope:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:175:6: error: ‘AutoHandle’ has not been declared
bool AutoHandle::IsCloseable() const {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:175:32: error: non-member function ‘bool testing::internal::IsCloseable()’ cannot have cv-qualifier
bool AutoHandle::IsCloseable() const {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In function ‘bool testing::internal::IsCloseable()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:178:10: error: ‘handle_’ was not declared in this scope
return handle_ != NULL && handle_ != INVALID_HANDLE_VALUE;
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: At global scope:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:181:1: error: redefinition of ‘testing::internal::Notification::Notification()’
Notification::Notification()
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1396:3: note: ‘testing::internal::Notification::Notification()’ previously defined here
Notification() : notified_(false) {
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:189:6: error: redefinition of ‘void testing::internal::Notification::Notify()’
void Notification::Notify() {
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1405:8: note: ‘void testing::internal::Notification::Notify()’ previously defined here
void Notify() {
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:193:6: error: redefinition of ‘void testing::internal::Notification::WaitForNotification()’
void Notification::WaitForNotification() {
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1413:8: note: ‘void testing::internal::Notification::WaitForNotification()’ previously defined here
void WaitForNotification() {
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h: In constructor ‘testing::internal::Mutex::Mutex()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1616:13: warning: ‘testing::internal::Mutex::type_’ will be initialized after [-Wreorder]
MutexType type_;
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1612:16: warning: ‘unsigned int testing::internal::Mutex::owner_thread_id_’ [-Wreorder]
unsigned int owner_thread_id_;
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:198:1: warning: when initialized here [-Wreorder]
Mutex::Mutex()
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In constructor ‘testing::internal::ThreadWithParamBase::ThreadWithParamBase(testing::internal::ThreadWithParamBase::Runnable, testing::internal::Notification)’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:337:9: error: class ‘testing::internal::ThreadWithParamBase’ does not have any field named ‘thread_’
: thread_(ThreadWithParamSupport::CreateThread(runnable,
^
In file included from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/gtest.h:58,
from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:39:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In member function ‘void testing::internal::ThreadWithParamBase::Join()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:346:38: error: ‘thread_’ was not declared in this scope
GTEST_CHECK_(::WaitForSingleObject(thread_.Get(), INFINITE) == WAIT_OBJECT_0)
^
C:/Users/wprudencio/gtest-1.7.0-hunter-11/include/gtest/internal/gtest-port.h:1250:37: note: in definition of macro ‘GTEST_CHECK_’
if (::testing::internal::IsTrue(condition))
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:45:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc: In function ‘bool testing::internal::IsCloseable()’:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-port.cc:179:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from C:\Users\wprudencio\gtest-1.7.0-hunter-11\src\gtest-all.cc:43:0:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc: At global scope:
C:/Users/wprudencio/gtest-1.7.0-hunter-11/src/gtest-death-test.cc:123:13: warning: ‘testing::internal::g_in_fast_death_test_child’ defined but not used [-Wunused-variable]
static bool g_in_fast_death_test_child = false;
^
CMakeFiles\gtest.dir\build.make:62: recipe for target ‘CMakeFiles/gtest.dir/src/gtest-all.cc.obj’ failed
mingw32-make.exe[2]: *** [CMakeFiles/gtest.dir/src/gtest-all.cc.obj] Error 1
CMakeFiles\Makefile2:66: recipe for target ‘CMakeFiles/gtest.dir/all’ failed
mingw32-make.exe[1]: *** [CMakeFiles/gtest.dir/all] Error 2
makefile:126: recipe for target ‘all’ failed
mingw32-make.exe: *** [all] Error 2
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 4
- Comments: 20 (6 by maintainers)
Commits related to this issue
- Add CMake variable SHADERC_SKIP_TESTS. Configuring with -DSHADERC_SKIP_TESTS=ON will prevent building any tests based on gtest or gmock. Required for cross compiling from Linux to Windows with MinGW... — committed to dneto0/shaderc by dneto0 8 years ago
- Add CMake variable SHADERC_SKIP_TESTS. Configuring with -DSHADERC_SKIP_TESTS=ON will prevent building any tests based on gtest or gmock. Required for cross compiling from Linux to Windows with MinGW... — committed to dneto0/shaderc by dneto0 8 years ago
- Support Linux-to-Windows cross compile via MinGW Add a toolchain file for Linux MinGW build for Windows. Add CMake variable SHADERC_SKIP_TESTS. Configuring with -DSHADERC_SKIP_TESTS=ON will prevent... — committed to dneto0/shaderc by dneto0 8 years ago
- Add CMake variable SHADERC_SKIP_TESTS. Configuring with -DSHADERC_SKIP_TESTS=ON will prevent building any tests based on gtest or gmock. Required for cross compiling from Linux to Windows with MinGW... — committed to dneto0/shaderc by dneto0 8 years ago
- Update README for MinGW compile A bad interaction between CMake, MinGW, and Googletest prevents MinGW from compiling Googletest with threads. https://github.com/google/googletest/issues/606 So we mu... — committed to dneto0/shaderc by dneto0 8 years ago
- Update README for MinGW compile A bad interaction between CMake, MinGW, and Googletest prevents MinGW from compiling Googletest with threads. https://github.com/google/googletest/issues/606 So we mu... — committed to dneto0/shaderc by dneto0 8 years ago
- Update README for MinGW compile A bad interaction between CMake, MinGW, and Googletest prevents MinGW from compiling Googletest with threads. https://github.com/google/googletest/issues/606 So we mu... — committed to dneto0/shaderc by dneto0 8 years ago
- Added a note about failing cross compile of Google Test. This is a known bug in Google Test: https://github.com/google/googletest/issues/606 modified: README.md — committed to nrz/ylikuutio by nrz 6 years ago
- Applying patch for MINGW thread issue prescribed at https://github.com/google/googletest/issues/606#issuecomment-197933754 and discussed in https://github.com/bincrafters/community/issues/166 — committed to kheaactua/conan-gtest by deleted user 6 years ago
- Made gtest work on MINGW with solution from https://github.com/google/googletest/issues/606 — committed to YosysHQ/nextpnr by mmicko 6 years ago
I found a solution for this. In those lines of gtest-port.h checking for the definition of GTEST_HAS_PTHREAD, you must include “and not GTEST_OS_WINDOWS_MINGW”:
Line 607: #if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW Line 1444: #if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW Line 1461: #if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW Line 1559: #if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW Line 1921: # elif GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
I think it is a mistake because gtest creators do not use mingw.
With this changes you’ll maintain threading support in windows.
@dvdjg Do you mind making a pull request to fix this bug? Thanks!
I’m also having trouble building using CMake and MinGW32, building on a Linux host. Cross-compiling for Windows 32-bit. My versions are:
$ /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake --version cmake version 3.6.1
$ /usr/bin/i686-w64-mingw32-g++ --version i686-w64-mingw32-g++ (GCC) 5.3.1 20160211
$ uname -a Linux lenny 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
And here’s my build output: /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake --build /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug --target runLDAPAuthenticator_Tests – -j 4 /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake -H/home/mellertson/Documents/Development_Projects/calatl_arealdap -B/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/make -f CMakeFiles/Makefile2 runLDAPAuthenticator_Tests make[1]: Entering directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake -H/home/mellertson/Documents/Development_Projects/calatl_arealdap -B/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug --check-build-system CMakeFiles/Makefile.cmake 0 /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake -E cmake_progress_start /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug/CMakeFiles 9 /usr/bin/make -f CMakeFiles/Makefile2 tests/CMakeFiles/runLDAPAuthenticator_Tests.dir/all make[2]: Entering directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ /usr/bin/make -f tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/build.make tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/depend make[3]: Entering directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ cd /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug && /home/mellertson/Downloads/clion-2016.2.2/bin/cmake/bin/cmake -E cmake_depends “Unix Makefiles” /home/mellertson/Documents/Development_Projects/calatl_arealdap /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug/tests/gunit/googlemock/gtest /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug/tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/DependInfo.cmake --color= Scanning dependencies of target gtest make[3]: Leaving directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ /usr/bin/make -f tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/build.make tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/build make[3]: Entering directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ [ 11%] Building CXX object tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o cd /home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug/tests/gunit/googlemock/gtest && /usr/bin/i686-w64-mingw32-g++ -I/home/mellertson/Documents/Development_Projects/calatl_arealdap/./includes -I/home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest -I/home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest -I/home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include -std=gnu++11 -m32 -g -std=gnu++11 -m32 -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1792:3: error: ‘AutoHandle’ does not name a type AutoHandle thread_; ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:43:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:637:3: error: ‘AutoHandle’ does not name a type AutoHandle write_handle_; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:639:3: error: ‘AutoHandle’ does not name a type AutoHandle child_handle_; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:644:3: error: ‘AutoHandle’ does not name a type AutoHandle event_handle_; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc: In member function ‘virtual int testing::internal::WindowsDeathTest::Wait()’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:656:36: error: ‘child_handle_’ was not declared in this scope const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:656:57: error: ‘event_handle_’ was not declared in this scope const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:670:3: error: ‘write_handle_’ was not declared in this scope write_handle_.Reset(); ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc: In member function ‘virtual testing::internal::DeathTest::TestRole testing::internal::WindowsDeathTest::AssumeRole()’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:720:3: error: ‘write_handle_’ was not declared in this scope write_handle_.Reset(write_handle); ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:721:3: error: ‘event_handle_’ was not declared in this scope event_handle_.Reset(::CreateEvent( ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:777:3: error: ‘child_handle_’ was not declared in this scope child_handle_.Reset(process_info.hProcess); ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc: In function ‘int testing::internal::GetStatusFileDescriptor(unsigned int, size_t, size_t)’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:1230:3: error: ‘AutoHandle’ was not declared in this scope AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE, ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:1233:7: error: ‘parent_process_handle’ was not declared in this scope if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:1249:26: error: ‘parent_process_handle’ was not declared in this scope if (!::DuplicateHandle(parent_process_handle.Get(), write_handle, ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-death-test.cc:1264:26: error: ‘parent_process_handle’ was not declared in this scope if (!::DuplicateHandle(parent_process_handle.Get(), event_handle, ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In function ‘void testing::internal::SleepMilliseconds(int)’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:179:6: error: redefinition of ‘void testing::internal::SleepMilliseconds(int)’ void SleepMilliseconds(int n) { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1458:13: note: ‘void testing::internal::SleepMilliseconds(int)’ previously defined here inline void SleepMilliseconds(int n) { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: At global scope: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:183:1: error: ‘AutoHandle’ does not name a type AutoHandle::AutoHandle() ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:186:1: error: ‘AutoHandle’ does not name a type AutoHandle::AutoHandle(Handle handle) ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:189:1: error: ‘AutoHandle’ does not name a type AutoHandle::~AutoHandle() { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:193:1: error: ‘AutoHandle’ does not name a type AutoHandle::Handle AutoHandle::Get() const { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:197:6: error: ‘AutoHandle’ has not been declared void AutoHandle::Reset() { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In function ‘void testing::internal::Reset()’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:198:29: error: too many arguments to function ‘void testing::internal::Reset()’ Reset(INVALID_HANDLE_VALUE); ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:197:6: note: declared here void AutoHandle::Reset() { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: At global scope: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:201:6: error: ‘AutoHandle’ has not been declared void AutoHandle::Reset(HANDLE handle) { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In function ‘void testing::internal::Reset(HANDLE)’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:203:7: error: ‘handle_’ was not declared in this scope if (handle_ != handle) { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:204:21: error: ‘IsCloseable’ was not declared in this scope if (IsCloseable()) { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:209:31: error: ‘IsCloseable’ was not declared in this scope GTEST_CHECK_(!IsCloseable()) ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1307:37: note: in definition of macro ‘GTEST_CHECK_’ if (::testing::internal::IsTrue(condition))
^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: At global scope: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:215:6: error: ‘AutoHandle’ has not been declared bool AutoHandle::IsCloseable() const { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:215:32: error: non-member function ‘bool testing::internal::IsCloseable()’ cannot have cv-qualifier bool AutoHandle::IsCloseable() const { ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In function ‘bool testing::internal::IsCloseable()’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:218:10: error: ‘handle_’ was not declared in this scope return handle_ != NULL && handle_ != INVALID_HANDLE_VALUE; ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: At global scope: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:221:1: error: redefinition of ‘testing::internal::Notification::Notification()’ Notification::Notification() ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1480:3: note: ‘testing::internal::Notification::Notification()’ previously defined here Notification() : notified_(false) { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:229:6: error: redefinition of ‘void testing::internal::Notification::Notify()’ void Notification::Notify() { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1489:8: note: ‘void testing::internal::Notification::Notify()’ previously defined here void Notify() { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:233:6: error: redefinition of ‘void testing::internal::Notification::WaitForNotification()’ void Notification::WaitForNotification() { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1497:8: note: ‘void testing::internal::Notification::WaitForNotification()’ previously defined here void WaitForNotification() { ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:45:0: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In constructor ‘testing::internal::ThreadWithParamBase::ThreadWithParamBase(testing::internal::ThreadWithParamBase::Runnable_, testing::internal::Notification_)’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:377:9: error: class ‘testing::internal::ThreadWithParamBase’ does not have any field named ‘thread_’ : thread_(ThreadWithParamSupport::CreateThread(runnable, ^ In file included from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-internal.h:40:0, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/gtest.h:58, from /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-all.cc:39: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc: In member function ‘void testing::internal::ThreadWithParamBase::Join()’: /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/src/gtest-port.cc:386:38: error: ‘thread_’ was not declared in this scope GTEST_CHECK_(::WaitForSingleObject(thread_.Get(), INFINITE) == WAIT_OBJECT_0) ^ /home/mellertson/Documents/Development_Projects/calatl_arealdap/tests/gunit/googletest/include/gtest/internal/gtest-port.h:1307:37: note: in definition of macro ‘GTEST_CHECK_’ if (::testing::internal::IsTrue(condition))
^ tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/build.make:65: recipe for target ‘tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o’ failed make[3]: *** [tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[3]: Leaving directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ CMakeFiles/Makefile2:376: recipe for target ‘tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/all’ failed make[2]: *** [tests/gunit/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2 make[2]: Leaving directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ CMakeFiles/Makefile2:142: recipe for target ‘tests/CMakeFiles/runLDAPAuthenticator_Tests.dir/rule’ failed make[1]: *** [tests/CMakeFiles/runLDAPAuthenticator_Tests.dir/rule] Error 2 make[1]: Leaving directory ‘/home/mellertson/.CLion2016.2/system/cmake/generated/calatl_arealdap-66314019/66314019/Debug’ Makefile:167: recipe for target ‘runLDAPAuthenticator_Tests’ failed make: *** [runLDAPAuthenticator_Tests] Error 2