build with MinGW-W64 ?

545 views
Skip to first unread message

Stephanus Victor

unread,
Sep 2, 2015, 4:35:28 AM9/2/15
to actor-f...@googlegroups.com

Hi,

I have little experience with building systems and normally only follow the recipes.

 

I am trying to build the CAF library under Windows 7 using MinGW-w64.

MinGW Versions tried:

4.9.2 Posix SEH

4.9.3 Posix SEH

5.1.0 Posix SEH     (lots of deprecated warnings)

5.2.1 Posix SEH     (gcc-5-win64_5.2.1-20150831)

 

I tried from MSYS2 and command prompt with similar results.

 

From MSYS2:

 

CXXFLAGS=”-std=c++11”

../configure --build-type=Release --build-static --no-curl-examples --no-unit-tests --no-opencl --no-nexus --no-benchmarks --no-riac --no-protobuf-examples --no-qt-examples --no-examples --no-compiler-check --generator="Unix Makefiles" --with-gcc=H:/mingw-w64/mingw64-493-posix-seh/bin/g++.exe --lib-dir=h:/dev/libs/caf/build/lib

 

$ ../configure --build-type=Release --build-static --no-curl-examples --no-unit-tests --no-opencl --no-nexus --no-benchmarks --no-riac --no-protobuf-examples --no-qt-exampxamples --no-compiler-check --generator="Unix Makefiles" --with-gcc=H:/mingw-w64/mingw64-493-posix-seh/bin/g++.exe --lib-dir=h:/dev/libs/caf/build/lib

-- The C compiler identification is GNU 5.2.0

-- The CXX compiler identification is GNU 4.9.3

-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe

-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.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: H:/mingw-w64/mingw64-493-posix-seh/bin/g++.exe

-- Check for working CXX compiler: H:/mingw-w64/mingw64-493-posix-seh/bin/g++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found Doxygen: C:/msys64/usr/bin/doxygen.exe (found version "1.8.10")

--

====================|  Build Summary  |====================

 

Libcaf version:    0.14.1

 

Build type:        Release

Build static:      yes

Build static only: no

Runtime checks:    no

Log level:         none

With mem. mgmt.:   yes

 

Build examples:    no

Build unit tests:  no

Build riac:        no

Build nexus:       no

Build cash:        no

Build benchmarks:  no

Build opencl:      no

 

CXX:               H:/mingw-w64/mingw64-493-posix-seh/bin/g++.exe

CXXFLAGS:          -std=c++11 -Wextra -Wall -pedantic  -static -O3 -DNDEBUG

LIBRARIES:         ws2_32 -liphlpapi;ws2_32;iphlpapi

 

Source directory:  H:/dev/libs/caf

Build directory:   H:/dev/libs/caf/build

Executable path:   H:/dev/libs/caf/build/bin

Library path:      h:/dev/libs/caf/build/lib

Install prefix:    C:/msys64/usr/local

Generator:         Unix Makefiles

 

===========================================================

 

-- Configuring done

-- Generating done

CMake Warning:

  Manually-specified variables were not used by the project:

 

    CAF_NO_CURL_EXAMPLES

    CAF_NO_PROTOBUF_EXAMPLES

    CAF_NO_QT_EXAMPLES

 

 

-- Build files have been written to: H:/dev/libs/caf/build


make



H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp: In lambda function:

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:98:5: error: 'STARTUPINFO' was not declared in this scope

     STARTUPINFO si;

     ^

H:/ dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:99:5: error: 'PROCESS_INFORMATION' was not declared in this scope

     PROCESS_INFORMATION pi;

     ^

H:/ dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:100:17: error: 'si' was not declared in this scope

     ZeroMemory(&si, sizeof(si));

                 ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:100:31: error: 'ZeroMemory' was not declared in this scope

     ZeroMemory(&si, sizeof(si));

                               ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:102:17: error: 'pi' was not declared in this scope

     ZeroMemory(&pi, sizeof(pi));

                 ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:112:10: error: 'CreateProcess' was not declared in this scope

       &pi);

          ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:114:38: error: 'INFINITE' was not declared in this scope

     WaitForSingleObject(pi.hProcess, INFINITE);

                                      ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:114:46: error: 'WaitForSingleObject' was not declared in this scope

     WaitForSingleObject(pi.hProcess, INFINITE);

                                              ^

H:/dev/libs/caf/libcaf_core/src/run_sub_unit_test.cpp:115:28: error: 'CloseHandle' was not declared in this scope

     CloseHandle(pi.hProcess);

                            ^

libcaf_core/CMakeFiles/libcaf_core_shared.dir/build.make:1438: recipe for target 'libcaf_core/CMakeFiles/libcaf_core_shared.dir/src/run_sub_unit_test.cpp.obj' failed

make[2]: *** [libcaf_core/CMakeFiles/libcaf_core_shared.dir/src/run_sub_unit_test.cpp.obj] Error 1

 

 

I forced the include of  “windows.h” in run_sub_unit_test.cpp and then the build progressed but got stuck with the following errors:

 

[ 87%] Building CXX object libcaf_io/CMakeFiles/libcaf_io_shared.dir/src/multiplexer.cpp.obj

In file included from H:/dev/libs/caf/libcaf_io/src/multiplexer.cpp:21:0:

H:/dev/libs/caf/libcaf_io/caf/io/network/default_multiplexer.hpp:49:0: warning: "NOMINMAX" redefined

 # define NOMINMAX

 ^

In file included from H:/mingw-w64/mingw64-493-posix-seh/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/c++config.h:430:0,

                 from H:/mingw-w64/mingw64-493-posix-seh/x86_64-w64-mingw32/include/c++/string:38,

                 from H:/dev/libs/caf/libcaf_io/caf/io/network/multiplexer.hpp:23,

                 from H:/dev/libs/caf/libcaf_io/src/multiplexer.cpp:20:

H:/mingw-w64/mingw64-493-posix-seh/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the location of the previous definition

 #define NOMINMAX 1

 ^

[ 87%] Linking CXX shared library ../lib/libcaf_io.dll

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3\libgcc_eh.a(unwind-seh.o): In function `_Unwind_Resume':

C:\mingw493\x86_64-493-posix-seh-rt_v4-rev0\build\gcc-4.9.3\x86_64-w64-mingw32\libgcc/../../../../../src/gcc-4.9.3/libgcc/unwind-seh.c:347: multiple definition of `_Unwind

../lib/libcaf_core.dll.a(d000089.o):(.text+0x0): first defined here

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/lib/../lib\libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+tiple definition of `pthread_mutex_lock'

../lib/libcaf_core.dll.a(d001918.o):(.text+0x0): first defined here

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/lib/../lib\libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+ltiple definition of `pthread_mutex_unlock'

../lib/libcaf_core.dll.a(d001921.o):(.text+0x0): first defined here

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/lib/../lib\libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+ltiple definition of `pthread_mutex_destroy'

../lib/libcaf_core.dll.a(d001916.o):(.text+0x0): first defined here

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/lib/../lib\libpthread.a(libwinpthread_la-thread.o):thread.c:(.tex multiple definition of `pthread_equal'

../lib/libcaf_core.dll.a(d001902.o):(.text+0x0): first defined here

H:/mingw-w64/mingw64-493-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/lib/../lib\libpthread.a(libwinpthread_la-thread.o):thread.c:(.tex multiple definition of `pthread_self'

../lib/libcaf_core.dll.a(d001947.o):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

libcaf_io/CMakeFiles/libcaf_io_shared.dir/build.make:664: recipe for target 'lib/libcaf_io.dll' failed

make[2]: *** [lib/libcaf_io.dll] Error 1

CMakeFiles/Makefile2:344: recipe for target 'libcaf_io/CMakeFiles/libcaf_io_shared.dir/all' failed

make[1]: *** [libcaf_io/CMakeFiles/libcaf_io_shared.dir/all] Error 2

Makefile:127: recipe for target 'all' failed

make: *** [all] Error 2

 

I tried with both CAF master and development.


Kind Regards
Stephanus Victor

 

Dominik Charousset

unread,
Sep 2, 2015, 7:57:56 AM9/2/15
to actor-f...@googlegroups.com
Hi,

the file "run_sub_unit_test.cpp" has a different coding path on Windows, because "popen" is not natively available. However, since MinGW emulates POSIX, this function should exist in your case. Try replacing "#ifndef CAF_WINDOWS" with "#ifndef CAF_MSVC" (line 36 in current `develop`).

Btw, our test setup on Windows currently only includes MSVC. If you don't mind trying Visual Studio instead: CAF runs with some restrictions on the latest release (some features of our pattern matching do not work properly).

Hope that helps.

    Dominik


--
You received this message because you are subscribed to the Google Groups "actor-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actor-framewo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages