amkozlov / raxml-ng

RAxML Next Generation: faster, easier-to-use and more flexible
GNU Affero General Public License v3.0
379 stars 64 forks source link

Changes for MinGW-w64 environment #54

Open astanabe opened 5 years ago

astanabe commented 5 years ago

I changed several codes for MinGW-w64 environment. However, the following problems still exist.

astanabe commented 5 years ago

To perform compilation, type the following on the terminal of MSYS2+MinGW-w64. mkdir build; cd build; cmake -DCMAKE_TOOLCHAIN_FILE=../mingw-w64.cmake -G "MSYS Makefiles" ..; make

astanabe commented 5 years ago

The "hsearch,hcreate,hdestroy" functions are used in pll_msa.c in pll-modules. To fix hsearch,hcreate,hdestroy problem on MinGW-w64 environment, pll_msa.c need to be modified.

astanabe commented 5 years ago

Using modified version of pll-modules (https://github.com/astanabe/pll-modules/tree/dev), I got an executable binary of raxml-ng. However, this binary do not run correctly. Here is a backtrace of gdb.

[00:00:00] Generating 1 parsimony starting tree(s) with 11 taxa

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000000489fc7 in create_shuffled (n=11, seed=28170)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/libs/libpll/src/stepwise.c:88
88            PLL_SWAP(x[i],x[j]);
(gdb) backtrace
#0  0x0000000000489fc7 in create_shuffled (n=11, seed=28170)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/libs/libpll/src/stepwise.c:88
#1  0x000000000048aa17 in pll_fastparsimony_stepwise (list=0x4d4de80,
    labels=0x4d4bbc0, cost=0x24aefbc, count=1, seed=28170)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/libs/libpll/src/stepwise.c:440
#2  0x0000000000446d6a in pllmod_utree_create_parsimony_multipart (
    taxon_count=11, taxon_names=0x4d4bbc0, partition_count=1,
    partitions=0x4d4bc50, random_seed=28170, score=0x24aefbc)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/src/tree/pll_tree.c:918
#3  0x000000000041d750 in Tree::buildParsimony (parted_msa=...,
    random_seed=28170, attributes=18, score=0x24aefbc)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/Tree.cpp:181
#4  0x0000000000437d29 in generate_tree (instance=...,
    type=StartingTree::parsimony)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:771
#5  0x0000000000439966 in build_start_trees (instance=..., skip_trees=0)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:1033
#6  0x000000000043eb21 in master_main (instance=..., cm=...)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:1897
#7  0x000000000043f607 in internal_main (argc=9, argv=0x4d43f50, comm=0x0)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:2096
#8  0x000000000043fd32 in main (argc=9, argv=0x4d43f50)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:2190

Another backtrace.

[00:00:03] ML tree search #1, logLikelihood: -5446.356485

warning: Critical error detected c0000374

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffc353383eb in ntdll!RtlIsNonEmptyDirectoryReparsePointAllowed ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb) backtrace
#0  0x00007ffc353383eb in ntdll!RtlIsNonEmptyDirectoryReparsePointAllowed ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ffc3533f96a in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ffc352dfbf2 in ntdll!RtlSetProxiedProcessId ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x00007ffc352fa20c in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x00007ffc3273984c in msvcrt!free () from C:\WINDOWS\System32\msvcrt.dll
#5  0x0000000000484fb7 in dealloc_partition_data (partition=0x6529fd0)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/libs/libpll/src/pll.c:126
#6  0x0000000000486e5a in pll_partition_destroy (partition=0x6529fd0)
    at C:/msys64/home/shimotsuki/raxml-ng-master/libs/pll-modules/libs/libpll/src/pll.c:869
#7  0x000000000041fe19 in TreeInfo::~TreeInfo (this=0x45be290,
    __in_chrg=<optimized out>)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/TreeInfo.cpp:111
#8  0x000000000041fe85 in TreeInfo::~TreeInfo (this=0x45be290,
    __in_chrg=<optimized out>)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/TreeInfo.cpp:117
#9  0x000000000051788e in std::default_delete<TreeInfo>::operator() (
    this=0x24af320, __ptr=0x45be290)
    at C:/msys64/mingw64/include/c++/8.2.0/bits/unique_ptr.h:81
#10 0x000000000056de83 in std::unique_ptr<TreeInfo, std::default_delete<TreeInfo> >::~unique_ptr (this=0x24af320, __in_chrg=<optimized out>)
    at C:/msys64/mingw64/include/c++/8.2.0/bits/unique_ptr.h:274
#11 0x000000000043e753 in thread_main (instance=..., cm=...)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:1665
#12 0x000000000043ec9b in master_main (instance=..., cm=...)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:1928
#13 0x000000000043f607 in internal_main (argc=9, argv=0x45b3f50, comm=0x0)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:2096
#14 0x000000000043fd32 in main (argc=9, argv=0x45b3f50)
    at C:/msys64/home/shimotsuki/raxml-ng-master/src/main.cpp:2190
amkozlov commented 5 years ago

@astanabe many thanks for working on this! I will integrate your changes and try to produce a working raxml-ng version for windows as soon as I have a bit more time.

tomas-fer commented 4 years ago

Is there any success with Windows binaries for raxml-ng? Thank you, Tomas

astanabe commented 4 years ago

I compiled RAxML-NG several times, but initial parsimonious tree construction did not work and execution was terminated. ML optimization of fixed tree topology and single ML tree search starting from a given tree topology or a random tree topology works well (but multiple ML tree searches starting from multiple random tree topologies did not work).

tomas-fer commented 4 years ago

Thank you, this saves me a lot of time trying to compile it. Is there any chance it will work in the future? TF

On Thu, Feb 6, 2020, 10:19 Akifumi S. Tanabe notifications@github.com wrote:

I compiled RAxML-NG several times, but initial parsimonious tree construction did not work and execution was terminated. ML optimization of fixed tree topology and single ML tree search starting from a given tree topology or a random tree topology works well (but multiple ML tree searches starting from multiple random tree topologies did not work).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/amkozlov/raxml-ng/pull/54?email_source=notifications&email_token=AEITIDORZNVMGKS4LNFBGEDRBPI23A5CNFSM4GGVEZGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6PPIQ#issuecomment-582809506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEITIDMSRGM7OGV5Y42JEXDRBPI23ANCNFSM4GGVEZGA .