seqan / seqan

SeqAn's official repository.
https://www.seqan.de
Other
481 stars 171 forks source link

compile seqan on windows with Qt and mingw #2301

Closed dridk closed 5 years ago

dridk commented 6 years ago

Hi,

I didn't success to compile a"Qt hello word" with seqan. Here is my try : https://github.com/dridk/seqanwinqt Bellow are my compile error. If you resolve my issue, you win all my respect :D

Using mingw 5.3 32 bits :

g++ -c -fno-keep-inline-dllexport -pipe -g -std=gnu++1y -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DSEQAN_HAS_ZLIB=1 -DSEQAN_ENABLE_DEBUG=0 -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\bamviewer-poc -I. -I..\bamviewer-poc -I..\bamviewer-poc\track -ID:\Qt\5.9.1\mingw53_32\include -ID:\Qt\5.9.1\mingw53_32\include\QtWidgets -ID:\Qt\5.9.1\mingw53_32\include\QtGui -ID:\Qt\5.9.1\mingw53_32\include\QtANGLE -ID:\Qt\5.9.1\mingw53_32\include\QtCore -Idebug -I. -ID:\Qt\5.9.1\mingw53_32\mkspecs\win32-g++  -o debug\abstracttrack.o ..\bamviewer-poc\track\abstracttrack.cpp
In file included from ..\bamviewer-poc/seqan/file.h:73:0,
                 from ..\bamviewer-poc/seqan/stream.h:62,
                 from ..\bamviewer-poc/seqan/seq_io.h:45,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/system.h:57:17: fatal error: aio.h: No such file or directory
compilation terminated.
Makefile.Debug:2646: recipe for target 'debug/abstracttrack.o' failed
mingw32-make[1]: Leaving directory 'C:/Users/home/Documents/GitHub/build-bamviewer-Desktop_Qt_5_9_1_MinGW_32bit-Debug'
mingw32-make[1]: *** [debug/abstracttrack.o] Error 1
Makefile:36: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
01:52:18: The process "D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project bamviewer (kit: Desktop Qt 5.9.1 MinGW 32bit)
When executing step "Make"

Using MSVC2015 64 bits

20:55:05: The process "D:\Qt\Tools\QtCreator\bin\jom.exe" exited normally.
20:55:05: Starting: "D:\Qt\Tools\QtCreator\bin\jom.exe" 
    D:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Release
    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I..\seqanwinqt -I. -ID:\Qt\5.9.1\msvc2015_64\include -ID:\Qt\5.9.1\msvc2015_64\include\QtGui -ID:\Qt\5.9.1\msvc2015_64\include\QtANGLE -ID:\Qt\5.9.1\msvc2015_64\include\QtCore -Irelease -ID:\Qt\5.9.1\msvc2015_64\mkspecs\win32-msvc -Forelease\ @C:\Users\home\AppData\Local\Temp\main.obj.5156.15.jom
main.cpp
..\seqanwinqt\seqan/basic/debug_test_system.h(604): warning C4267: '='ÿ: conversion de 'size_t' en 'int', perte possible de donn‚es
..\seqanwinqt\seqan/basic/debug_test_system.h(677): error C2664: 'DWORD GetTempPathW(DWORD,LPWSTR)'ÿ: impossible de convertir l'argument 2 de 'char [1000]' en 'LPWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(677): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(688): error C2664: 'UINT GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR)'ÿ: impossible de convertir l'argument 1 de 'char [1000]' en 'LPCWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(688): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(696): error C2664: 'BOOL DeleteFileW(LPCWSTR)'ÿ: impossible de convertir l'argument 1 de 'char [1000]' en 'LPCWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(696): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(734): error C2589: '('ÿ: jeton non conforme … droite de '::'
..\seqanwinqt\seqan/basic/debug_test_system.h(734): error C2059: erreur de syntaxeÿ: '::'
..\seqanwinqt\seqan/basic/debug_test_system.h(735): error C2589: '('ÿ: jeton non conforme … droite de '::'
..\seqanwinqt\seqan/basic/debug_test_system.h(735): error C2059: erreur de syntaxeÿ: '::'
..\seqanwinqt\seqan/basic/debug_test_system.h(782): error C2664: 'HANDLE FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW)'ÿ: impossible de convertir l'argument 1 de 'const char *' en 'LPCWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(782): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(787): error C2678: '+' binaireÿ: aucun op‚rateur trouv‚ qui accepte un op‚rande de partie gauche de type 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' (ou il n'existe pas de conversion acceptable)
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qpoint.h(358): note: est peut-ˆtre 'const QPointF operator +(const QPointF &,const QPointF &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qpoint.h(169): note: ou       'const QPoint operator +(const QPoint &,const QPoint &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstringlist.h(231): note: ou       'QStringList operator +(const QList<QString> &,const QStringList &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1750): note: ou       'QString operator +(QChar,const QStringRef &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1748): note: ou       'QString operator +(const QStringRef &,QChar)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1746): note: ou       'QString operator +(const QStringRef &,const QStringRef &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1744): note: ou       'QString operator +(QLatin1String,const QStringRef &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1742): note: ou       'QString operator +(const QStringRef &,QLatin1String)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1740): note: ou       'QString operator +(const QStringRef &,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1738): note: ou       'QString operator +(const QString &,const QStringRef &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1313): note: ou       'const QString operator +(const QString &,const QByteArray &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1311): note: ou       'const QString operator +(const QByteArray &,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1309): note: ou       'const QString operator +(const QString &,char)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1307): note: ou       'const QString operator +(char,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1305): note: ou       'const QString operator +(const char *,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1303): note: ou       'const QString operator +(const QString &,const char *)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1300): note: ou       'const QString operator +(QChar,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1298): note: ou       'const QString operator +(const QString &,QChar)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qstring.h(1296): note: ou       'const QString operator +(const QString &,const QString &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qbytearray.h(639): note: ou       'const QByteArray operator +(char,const QByteArray &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qbytearray.h(637): note: ou       'const QByteArray operator +(const char *,const QByteArray &)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qbytearray.h(635): note: ou       'const QByteArray operator +(const QByteArray &,char)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qbytearray.h(633): note: ou       'const QByteArray operator +(const QByteArray &,const char *)'
D:\Qt\5.9.1\msvc2015_64\include\QtCore/qbytearray.h(631): note: ou       'const QByteArray operator +(const QByteArray &,const QByteArray &)'
..\seqanwinqt\seqan/basic/debug_test_system.h(787): note: lors de la tentative de mise en correspondance de la liste des arguments '(std::basic_string<char,std::char_traits<char>,std::allocator<char>>, WCHAR [260])'
..\seqanwinqt\seqan/basic/debug_test_system.h(788): error C2664: 'int strcmp(const char *,const char *)'ÿ: impossible de convertir l'argument 1 de 'WCHAR [260]' en 'const char *'
..\seqanwinqt\seqan/basic/debug_test_system.h(788): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(790): error C2664: 'BOOL DeleteFileW(LPCWSTR)'ÿ: impossible de convertir l'argument 1 de 'const char *' en 'LPCWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(790): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/debug_test_system.h(796): error C2664: 'BOOL RemoveDirectoryW(LPCWSTR)'ÿ: impossible de convertir l'argument 1 de 'const char *' en 'LPCWSTR'
..\seqanwinqt\seqan/basic/debug_test_system.h(796): note: Les types point‚s n'ont aucun rapport entre euxÿ; conversion n‚cessitant reinterpret_cast, cast de style C ou cast de style fonction
..\seqanwinqt\seqan/basic/alphabet_math.h(227): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'max'
..\seqanwinqt\seqan/basic/alphabet_math.h(235): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'max'
..\seqanwinqt\seqan/basic/alphabet_math.h(255): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'min'
..\seqanwinqt\seqan/basic/alphabet_math.h(263): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'min'
..\seqanwinqt\seqan/basic/alphabet_adapt_builtins.h(178): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'max'
..\seqanwinqt\seqan/basic/alphabet_adapt_builtins.h(215): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'min'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(292): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'min'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(297): warning C4003: nombre de paramŠtres r‚els insuffisants pour la macro 'max'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(292): error C2059: erreur de syntaxeÿ: ')'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(311): note: voir la r‚f‚rence … l'instanciation de la classe modŠle 'std::numeric_limits<seqan::SimpleType<TValue,TSpec>>' en cours de compilation
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(292): error C2334: jetons inattendus avant ':'ÿ; corps apparent de la fonction ignor‚
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(311): error C2143: erreur de syntaxeÿ: absence de ')' avant ';'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(311): error C2059: erreur de syntaxeÿ: ')'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(311): error C2238: jetons inattendus avant ';'
..\seqanwinqt\seqan/basic/alphabet_simple_type.h(311): fatal error C1201: impossible de continuer aprŠs une erreur de syntaxe dans la d‚finition du modŠle de classe
jom: C:\Users\home\Documents\build-seqanwinqt-Desktop_Qt_5_9_1_MSVC2015_64bit-Release\Makefile.Release [release\main.obj] Error 2
jom: C:\Users\home\Documents\build-seqanwinqt-Desktop_Qt_5_9_1_MSVC2015_64bit-Release\Makefile [release] Error 2
20:55:07: The process "D:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project seqanwinqt (kit: Desktop Qt 5.9.1 MSVC2015 64bit)
The kit Desktop Qt 5.9.1 MSVC2015 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
dridk commented 6 years ago

After setting :

    DEFINES += "SEQAN_ASYNC_IO=0"

I pass the aio.h error and get a new one :

    error: sys/mman.h: No such file or directory
dridk commented 6 years ago

After removing :

    // #include <sys/mman.h> 

I get lot a new error :

D:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/home/Documents/GitHub/build-bamviewer-Desktop_Qt_5_9_1_MinGW_32bit-Debug'
g++ -c -fno-keep-inline-dllexport -pipe -W -Wall -Wno-long-long -pedantic -Wno-variadic-macros -g -std=gnu++1y -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DSEQAN_HAS_ZLIB=1 -DSEQAN_ENABLE_DEBUG=1 -DDSEQAN_ENABLE_TESTING=1 -DSEQAN_ASYNC_IO=0 -DNDEBUG -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\bamviewer-poc -I. -I..\bamviewer-poc -I..\bamviewer-poc\track -ID:\Qt\5.9.1\mingw53_32\include -ID:\Qt\5.9.1\mingw53_32\include\QtWidgets -ID:\Qt\5.9.1\mingw53_32\include\QtGui -ID:\Qt\5.9.1\mingw53_32\include\QtANGLE -ID:\Qt\5.9.1\mingw53_32\include\QtCore -Idebug -I. -ID:\Qt\5.9.1\mingw53_32\mkspecs\win32-g++  -o debug\abstracttrack.o ..\bamviewer-poc\track\abstracttrack.cpp
In file included from D:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/crtdefs.h:10:0,
                 from D:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/stddef.h:7,
                 from D:/Qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include/stddef.h:1,
                 from D:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/c++/cstddef:45,
                 from D:\Qt\5.9.1\mingw53_32\include\QtCore/qglobal.h:46,
                 from D:\Qt\5.9.1\mingw53_32\include\QtCore/QtCore:4,
                 from ..\bamviewer-poc\track\abstracttrack.h:3,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/platform.h:290:17: error: declaration does not declare anything [-fpermissive]
 typedef int64_t __int64;   // nolint
                 ^
..\bamviewer-poc/seqan/platform.h:292:17: error: multiple types in one declaration
 typedef int32_t __int32;   // nolint
                 ^
..\bamviewer-poc/seqan/platform.h:292:17: error: declaration does not declare anything [-fpermissive]
..\bamviewer-poc/seqan/platform.h:294:17: error: declaration does not declare anything [-fpermissive]
 typedef int16_t __int16;   // nolint
                 ^
..\bamviewer-poc/seqan/platform.h:296:16: error: multiple types in one declaration
 typedef int8_t __int8;     // nolint
                ^
..\bamviewer-poc/seqan/platform.h:296:16: error: declaration does not declare anything [-fpermissive]
In file included from ..\bamviewer-poc/seqan/basic/basic_debug.h:52:0,
                 from ..\bamviewer-poc/seqan/basic.h:49,
                 from ..\bamviewer-poc/seqan/seq_io.h:44,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/basic/debug_test_system.h: In function 'const char* seqan::ClassTest::tempFileName()':
..\bamviewer-poc/seqan/basic/debug_test_system.h:709:31: error: too many arguments to function 'int mkdir(const char*)'
     mkdir(fileNameBuffer, 0777);
                               ^
In file included from D:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/unistd.h:10:0,
                 from ..\bamviewer-poc/seqan/basic/debug_test_system.h:165,
                 from ..\bamviewer-poc/seqan/basic/basic_debug.h:52,
                 from ..\bamviewer-poc/seqan/basic.h:49,
                 from ..\bamviewer-poc/seqan/seq_io.h:44,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
D:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/io.h:271:15: note: declared here
   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^
In file included from ..\bamviewer-poc/seqan/system.h:84:0,
                 from ..\bamviewer-poc/seqan/file.h:73,
                 from ..\bamviewer-poc/seqan/stream.h:62,
                 from ..\bamviewer-poc/seqan/seq_io.h:45,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/system/file_sync.h: In member function 'bool seqan::File<seqan::Sync<TSpec> >::openTemp(int)':
..\bamviewer-poc/seqan/system/file_sync.h:322:21: error: there are no arguments to 'getuid' that depend on a template parameter, so a declaration of 'getuid' must be available [-fpermissive]
         if ((getuid() == geteuid()) && (getgid() == getegid()))
                     ^
..\bamviewer-poc/seqan/system/file_sync.h:322:21: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
..\bamviewer-poc/seqan/system/file_sync.h:322:34: error: there are no arguments to 'geteuid' that depend on a template parameter, so a declaration of 'geteuid' must be available [-fpermissive]
         if ((getuid() == geteuid()) && (getgid() == getegid()))
                                  ^
..\bamviewer-poc/seqan/system/file_sync.h:322:48: error: there are no arguments to 'getgid' that depend on a template parameter, so a declaration of 'getgid' must be available [-fpermissive]
         if ((getuid() == geteuid()) && (getgid() == getegid()))
                                                ^
..\bamviewer-poc/seqan/system/file_sync.h:322:61: error: there are no arguments to 'getegid' that depend on a template parameter, so a declaration of 'getegid' must be available [-fpermissive]
         if ((getuid() == geteuid()) && (getgid() == getegid()))
                                                             ^
In file included from ..\bamviewer-poc/seqan/file.h:83:0,
                 from ..\bamviewer-poc/seqan/stream.h:62,
                 from ..\bamviewer-poc/seqan/seq_io.h:45,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/file/file_page.h: In function 'bool seqan::mapReadPage(seqan::Buffer<TValue, seqan::PageFrame<TFile, TSpec> >&, TFile&, TSize)':
..\bamviewer-poc/seqan/file/file_page.h:698:63: error: 'PROT_READ' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_PRIVATE, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                               ^
..\bamviewer-poc/seqan/file/file_page.h:698:75: error: 'PROT_WRITE' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_PRIVATE, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                                           ^
..\bamviewer-poc/seqan/file/file_page.h:698:87: error: 'MAP_PRIVATE' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_PRIVATE, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                                                       ^
..\bamviewer-poc/seqan/file/file_page.h:700:25: error: 'MAP_FAILED' was not declared in this scope
         if (pf.begin == MAP_FAILED)
                         ^
..\bamviewer-poc/seqan/file/file_page.h: In function 'bool seqan::mapWritePage(seqan::Buffer<TValue, seqan::PageFrame<TFile, TSpec> >&, TFile&, TSize)':
..\bamviewer-poc/seqan/file/file_page.h:723:63: error: 'PROT_READ' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_SHARED, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                               ^
..\bamviewer-poc/seqan/file/file_page.h:723:75: error: 'PROT_WRITE' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_SHARED, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                                           ^
..\bamviewer-poc/seqan/file/file_page.h:723:87: error: 'MAP_SHARED' was not declared in this scope
         pf.begin = (TValue*)mmap(NULL, size * sizeof(TValue), PROT_READ | PROT_WRITE, MAP_SHARED, file.handle, (TPos)pf.pageNo * (TPos)capacity(pf) * (TPos)sizeof(TValue));
                                                                                       ^
..\bamviewer-poc/seqan/file/file_page.h:725:25: error: 'MAP_FAILED' was not declared in this scope
         if (pf.begin == MAP_FAILED)
                         ^
In file included from ..\bamviewer-poc/seqan/file.h:84:0,
                 from ..\bamviewer-poc/seqan/stream.h:62,
                 from ..\bamviewer-poc/seqan/seq_io.h:45,
                 from ..\bamviewer-poc/trackviewer.h:6,
                 from ..\bamviewer-poc\track\abstracttrack.h:5,
                 from ..\bamviewer-poc\track\abstracttrack.cpp:1:
..\bamviewer-poc/seqan/file/file_mapping.h: At global scope:
..\bamviewer-poc/seqan/file/file_mapping.h:117:18: error: 'POSIX_MADV_NORMAL' was not declared in this scope
     MAP_NORMAL = POSIX_MADV_NORMAL,
                  ^
..\bamviewer-poc/seqan/file/file_mapping.h:118:18: error: 'POSIX_MADV_RANDOM' was not declared in this scope
     MAP_RANDOM = POSIX_MADV_RANDOM,
                  ^
..\bamviewer-poc/seqan/file/file_mapping.h:119:22: error: 'POSIX_MADV_SEQUENTIAL' was not declared in this scope
     MAP_SEQUENTIAL = POSIX_MADV_SEQUENTIAL,
                      ^
..\bamviewer-poc/seqan/file/file_mapping.h:120:20: error: 'POSIX_MADV_WILLNEED' was not declared in this scope
     MAP_WILLNEED = POSIX_MADV_WILLNEED,
                    ^
..\bamviewer-poc/seqan/file/file_mapping.h:121:20: error: 'POSIX_MADV_DONTNEED' was not declared in this scope
     MAP_DONTNEED = POSIX_MADV_DONTNEED
                    ^
..\bamviewer-poc/seqan/file/file_mapping.h: In function 'bool seqan::flushFileSegment(seqan::FileMapping<TSpec>&, void*, TPos, TSize)':
..\bamviewer-poc/seqan/file/file_mapping.h:565:62: error: 'MS_SYNC' was not declared in this scope
     return (msync(static_cast<char*>(addr) + beginPos, size, MS_SYNC) == 0);
                                                              ^
..\bamviewer-poc/seqan/file/file_mapping.h: In function 'bool seqan::cancelFileSegment(seqan::FileMapping<TSpec>&, void*, TPos, TSize)':
..\bamviewer-poc/seqan/file/file_mapping.h:594:41: error: 'MS_INVALIDATE' was not declared in this scope
     return (msync(addr, size + fileOfs, MS_INVALIDATE) == 0);
                                         ^
..\bamviewer-poc/seqan/file/file_mapping.h: In function 'void* seqan::mapFileSegment(seqan::FileMapping<TSpec>&, TPos, TSize, TFileMappingMode)':
..\bamviewer-poc/seqan/file/file_mapping.h:677:36: error: 'PROT_READ' was not declared in this scope
     if (mode & MAP_RDONLY) prot |= PROT_READ;
                                    ^
..\bamviewer-poc/seqan/file/file_mapping.h:678:36: error: 'PROT_WRITE' was not declared in this scope
     if (mode & MAP_WRONLY) prot |= PROT_WRITE;
                                    ^
..\bamviewer-poc/seqan/file/file_mapping.h:682:18: error: 'MAP_PRIVATE' was not declared in this scope
         flags |= MAP_PRIVATE;
                  ^
..\bamviewer-poc/seqan/file/file_mapping.h:684:18: error: 'MAP_SHARED' was not declared in this scope
         flags |= MAP_SHARED;
                  ^
..\bamviewer-poc/seqan/file/file_mapping.h:695:17: error: 'MAP_FAILED' was not declared in this scope
     if (addr == MAP_FAILED)
                 ^
Makefile.Debug:2646: recipe for target 'debug/abstracttrack.o' failed
mingw32-make[1]: Leaving directory 'C:/Users/home/Documents/GitHub/build-bamviewer-Desktop_Qt_5_9_1_MinGW_32bit-Debug'
mingw32-make[1]: *** [debug/abstracttrack.o] Error 1
Makefile:36: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
02:13:34: The process "D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project bamviewer (kit: Desktop Qt 5.9.1 MinGW 32bit)
When executing step "Make"
02:13:34: Elapsed time: 00:11
dridk commented 6 years ago

I finally success to compile win mingw32 by removing uncompiled codes from seqan... It's ugly, and I don't know what it does. If you want to see what I changed in seqan :

https://github.com/labsquare/bamviewer-poc/compare/win

h-2 commented 6 years ago

@dridk Thanks for working on this! We would be interested in merging this, but only if you can provide a clean pull-request against our develop-branch and all tests pass (in edge cases some tests might also be be disabled, but not only for very minor things).

h-2 commented 5 years ago

We are working on MinGW support in SeqAn3. If you want this in SeqAn2, please open a pull request!