Build trouble on Cygwin64

164 views
Skip to first unread message

pete...@umn.edu

unread,
Oct 16, 2014, 12:56:58 PM10/16/14
to bali-ph...@googlegroups.com
Hi, I'm trying to build from the git sources (Oct 15) on Windows 8.1 with Cygwin64. I was able to build a 64-bit v2.1.1 on this system yesterday and it is running great. With the current sources I can build the program but it fails with a runtime error:

$ bali-phy: Error! No paths to find builtins are specified!.  Use --builtins-path=<path> to specify the directory containing 'Prelude.so'.

The trouble is, there are no *.so files in the build, so specifying the --builtins-path doesn't help. Cygwin64 builds *.a and *.la libraries. I tried copying and renaming the files and that didn't help:

$ bali-phy: Error! In module 'Prelude': Cannot load library: Exec format error

I'm guessing this is related to the build type. The default is x86_64-unknown-cygwin The build tools are actually x86_64-pc-cygwin but I'm not sure if that's an important difference. I tried building with MingW but I got a variety of build errors that I will paste below. Maybe I just don't understand how to use MingW?

I tried the precompiled MingW64 v2.3.5 binaries but there was some silent crash occuring with my data. I'm running gdb right now to try to find out more. Thanks for any insight you can provide!

Karl

$ ../configure --prefix=/cygdrive/c/users/kjp/win/bali-phy/src/x86_64/BAli-Phy --build=x86_64-w64-mingw32 && make && make install

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../boost/lib/filesystem -I../../.. -I../../../../boost/ -isystem ../../../../boost/include -isystem ../../../../src/dlfcn-win32/ -ffast-math -DNDEBUG -DNDEBUG_DP -funroll-loops -std=c++11 -pipe -O3 -g -O2 -MT src/codecvt_error_category.lo -MD -MP -MF src/.deps/codecvt_error_category.Tpo -c ../../../../boost/lib/filesystem/src/codecvt_error_category.cpp  -DDLL_EXPORT -DPIC -o src/.libs/codecvt_error_category.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../boost/lib/filesystem -I../../.. -I../../../../boost/ -isystem ../../../../boost/include -isystem ../../../../src/dlfcn-win32/ -ffast-math -DNDEBUG -DNDEBUG_DP -funroll-loops -std=c++11 -pipe -O3 -g -O2 -MT src/codecvt_error_category.lo -MD -MP -MF src/.deps/codecvt_error_category.Tpo -c ../../../../boost/lib/filesystem/src/codecvt_error_category.cpp -o src/codecvt_error_category.o >/dev/null 2>&1
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++ -isystem ../../../../boost/include -isystem ../../../../src/dlfcn-win32/ -ffast-math -DNDEBUG -DNDEBUG_DP -funroll-loops -std=c++11  -pipe -O3 -g -O2   -o libboost_filesystem.la  src/operations.lo src/path.lo src/path_traits.lo src/portability.lo src/unique_path.lo src/utf8_codecvt_facet.lo src/windows_file_codecvt.lo src/codecvt_error_category.lo  -lm
Makefile:384: recipe for target 'libboost_filesystem.la' failed
make[4]: *** [libboost_filesystem.la] Interrupt
make[4]: Leaving directory '/cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build/boost/lib/filesystem'
Makefile:476: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
Makefile:364: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Interrupt
Makefile:647: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Interrupt
Makefile:474: recipe for target 'all' failed
make: *** [all] Interrupt

kjp@ddt-tesla /cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build
$ ../configure --prefix=/cygdrive/c/users/kjp/win/bali-phy/src/x86_64/BAli-Phy --build=x86_64-w64-mingw32 --with-system-boost && make && make install

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/builtins -I../.. -I../../../include -I../../../src -isystem ../../../src/dlfcn-win32/ -ffast-math -DNDEBUG -DNDEBUG_DP -funroll-loops -std=c++11 -pipe -O3 -g -O2 -MT Prelude.lo -MD -MP -MF .deps/Prelude.Tpo -c ../../../src/builtins/Prelude.C -o Prelude.o >/dev/null 2>&1
make[4]: *** No rule to make target '../../src/bali-phy.exe', needed by 'Prelude.la'.  Stop.
make[4]: Leaving directory '/cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build/src/builtins'
Makefile:1988: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build/src'
Makefile:1135: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build/src'
Makefile:647: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build'
Makefile:474: recipe for target 'all' failed
make: *** [all] Error 2

kjp@ddt-tesla /cygdrive/c/users/kjp/win/bali-phy/src/BAli-Phy/build-static
$ ../configure --prefix=/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy  --with-gnu-ld  && make && make install

make[4]: *** Deleting file 'models/parameters.o'
Makefile:1914: recipe for target 'models/parameters.o' failed
make[4]: *** [models/parameters.o] Interrupt
Makefile:1988: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Interrupt
Makefile:1135: recipe for target 'all' failed
make[2]: *** [all] Interrupt
Makefile:647: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Interrupt
Makefile:474: recipe for target 'all' failed
make: *** [all] Interrupt


pete...@umn.edu

unread,
Oct 16, 2014, 3:15:48 PM10/16/14
to bali-ph...@googlegroups.com
Here's the report on the segfault occurring with the precompiled binary:

$ ./bali64.sh Minimal2_Muscle_MF_Myoall_min_12.mfa 111 a
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.5/bin/bali-phy.exe...done.
(gdb) run
Starting program: /cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.5/bin/bali-phy.exe --smodel WAG+gamma --imodel RS07 --randomize-alignment Minimal2_Muscle_MF_Myoall_min_12.mfa --seed 111
[New Thread 6508.0x1ea0]
[New Thread 6508.0x1734]
[Thread 6508.0x1734 exited with code 0]
smodel = AST[model] mmm (AST[model] gamma_model (AST[model] reversible_markov_model (SModel.wag 'Amino-Acids') (AST[model] plus_f_model 'Amino-Acids')) 4)

#1: subst ~ WAG+gamma (1)     indel ~ RS07 (1)

Prior on branch lengths T[b]:
 T[b] ~ Gamma(alpha=0.5, beta=2*Main.mu<i>)   [mean=Main.mu<i>, variance=2*Main.mu<i>^2]
Created directory 'Minimal2_Muscle_MF_Myoall_min_12-4/' for output files.
Beginning pre-burnin: 3 iterations.
 Tree size #1   prior = -973.389   likelihood = -308025   |T| = 104.168604     mu1 = 0.399903
 Tree size #2   prior = -1002.74   likelihood = -290624   |T| = 14118.202240     mu1 = 54.199809
 Tree size #3   prior = -1004.23   likelihood = -290622   |T| = 14878.571699     mu1 = 57.118869

 SPR #1   prior = -1008.93   likelihood = -290618   |T| = 17289.428930     mu1 = 66.374155
 SPR #2   prior = -828.926   likelihood = -289195   |T| = 8384.811343     mu1 = 31.806458
 SPR #3   prior = -635.988   likelihood = -285914   |T| = 4378.097468     mu1 = 19.171529

 NNI #1   prior = -536.873   likelihood = -283487   |T| = 532.149567     mu1 = 8.176931
 NNI #2   prior = -618.285   likelihood = -283470   |T| = 508.801588     mu1 = 5.094982
 NNI #3   prior = -622.8   likelihood = -283450   |T| = 508.276337     mu1 = 5.046516
 NNI #4   prior = -884.642   likelihood = -283435   |T| = 503.189709     mu1 = 1.628695
 NNI #5   prior = -887.103   likelihood = -283423   |T| = 501.570126     mu1 = 1.620249
 NNI #6   prior = -825.089   likelihood = -283405   |T| = 488.230549     mu1 = 2.008666
 NNI #7   prior = -902.199   likelihood = -283369   |T| = 453.393939     mu1 = 1.449750


Finished pre-burnin in 4707.17 seconds.


Beginning 100000 iterations of MCMC computations.
   - Future screen output sent to 'Minimal2_Muscle_MF_Myoall_min_12-4/C1.out'
   - Future debugging output sent to 'Minimal2_Muscle_MF_Myoall_min_12-4/C1.err'
   - Sampled trees logged to 'Minimal2_Muscle_MF_Myoall_min_12-4/C1.trees'
   - Sampled alignments logged to 'Minimal2_Muscle_MF_Myoall_min_12-4/C1.P<partition>.fastas'
   - Sampled numerical parameters logged to 'Minimal2_Muscle_MF_Myoall_min_12-4/C1.p'

You can examine 'C1.p' using BAli-Phy tool statreport (command-line)
  or the BEAST program Tracer (graphical).
See the manual for further information.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73ded9b in ntdll!RtlAllocateHeap ()
   from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
(gdb)

$ file /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
/cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows

Benjamin Redelings

unread,
Oct 16, 2014, 3:33:20 PM10/16/14
to bali-ph...@googlegroups.com
Hi Pete,

    Thanks for the feedback.  I guess you have three questions, so I'll comment on them separately:

1. Really, you can build and successfully rung 'make install'?  I would have thought that the build would fail, since I hadn't updated the Cygwin do some windows-specific linking.

The run-time error probably comes from looking for Prelude.so instead of Prelude.dll.  I updated the git sources to check for cygwin as well as mingw -- can you try the cygwin compile again?  If it doesn't work, I have some more ideas for how to fix things, but I'd be interested to see the error message.

Note that, you have to actually run 'make install' for bali-phy to run.

2. Regarding building with mingw, try pulling from Git again.  This error:

    make[4]: *** No rule to make target '../../src/bali-phy.exe', needed by 'Prelude.la'.  Stop.
... was kind of expected (I had a hack to work around it) but I think I found a fix.  Basically, it was trying to build plugins before the *.exe, which is not allowed on windows.

I am not sure why you got this error:

    Makefile:384: recipe for target 'libboost_filesystem.la' failed
It looks the linking completed without error? 

For this error:

    make[4]: *** Deleting file 'models/parameters.o'
    Makefile:1914: recipe for target 'models/parameters.o' failed
I am not sure this is the error.  This message seems to be saying that there was an error before this. 

3. Regarding the crash in the provided binaries, I'll reply to your other message separately.

In summary, after doing 'git pull':
(I) Can you try the cygwin build again, and let me know what happens?
(II) Can you try the mingw build again, using --with-system-boost?  I think it should work

Note that I actually did the mingw build using a mingw CROSS-compiler on linux.  So, I haven't yet run the mingw build on windows.  Sorry :-S

-BenRI


On 10/16/2014 12:56 PM, pete...@umn.edu wrote:
Hi, I'm trying to build from the git sources (Oct 15) on Windows 8.1 with Cygwin64. I was able to build a 64-bit v2.1.1 on this system yesterday and it is running great. With the current sources I can build the program but it fails with a runtime error:

$ bali-phy: Error! No paths to find builtins are specified!.  Use --builtins-path=<path> to specify the directory containing 'Prelude.so'.



The trouble is, there are no *.so files in the build, so specifying the --builtins-path doesn't help. Cygwin64 builds *.a and *.la libraries. I tried copying and renaming the files and that didn't help:

$ bali-phy: Error! In module 'Prelude': Cannot load library: Exec format error

I'm guessing this is related to the build type. The default is x86_64-unknown-cygwin The build tools are actually x86_64-pc-cygwin but I'm not sure if that's an important difference.
Hmm.. I hope it builds *.dll libraries in the src/builtins subdirectory...

--
You received this message because you are subscribed to the Google Groups "bali-phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bali-phy-user...@googlegroups.com.
To post to this group, send email to bali-ph...@googlegroups.com.
Visit this group at http://groups.google.com/group/bali-phy-users.
For more options, visit https://groups.google.com/d/optout.

Benjamin Redelings

unread,
Oct 16, 2014, 3:46:03 PM10/16/14
to bali-ph...@googlegroups.com
Hi Pete,

    Thanks for running this under gdb.  A few things:
1. Can you try to get a backtrace?  Then I can see what series of function calls lead to this condition.  I think the gdb command is 'bt'
2. Can you check how much memory the process is using?  I guess you are using the 64-bit binaries, so it shouldn't be running out of virtual memory.
3. Can you tell me how many iterations were (usually) successfully complete?  Is it more like 1, 10, 100, 1000?

This looks like a heap corruption problem -- I will try to see if something is scribbling on memory it does not own.

-BenRI

Benjamin Redelings

unread,
Oct 16, 2014, 4:17:15 PM10/16/14
to bali-ph...@googlegroups.com
I just fixed a memory bug and pushed the fix to github.  I don't know if it will fix your issue or not...  however, if you succeed in compiling, I'd be interested in hearing if the crash goes away.  (I can also upload 2.3.6-beta binaries, if you have trouble compiling.)


-BenRI

On 10/16/2014 03:15 PM, pete...@umn.edu wrote:

pete...@umn.edu

unread,
Oct 20, 2014, 8:03:43 PM10/20/14
to bali-ph...@googlegroups.com
Hi Ben, sorry for the delay in replying, we've been very busy here. I perfectly understand that you're not able to do extensive testing on Windows. The cross compiler should work fine in theory...

Regarding your questions, I did a git pull yesterday and tried to build. I tested four cases:

  1. Default configure options: Build completes successfully but apparently has trouble seeing the file system:

  1. GNU gdb (GDB) 7.8
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-cygwin".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
  1. Reading symbols from /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/bin/bali-phy.exe...done.
    (gdb) run
    Starting program: /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/bin/bali-phy.exe --smodel WAG+gamma --imodel RS07 --builtins-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy --modules-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy/modules --randomize-alignment Minimal3_Muscle_MF_Myoall.mfa --seed 111
    [New Thread 7508.0x1994]
    [New Thread 7508.0x1788]
    Home directory '/home/kjp' does not exist!
    random seed = 111

    bali-phy: Error! Loading module 'Prelude': Couldn't find file 'Prelude.hs' in path '/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy/modules'
    [Inferior 1 (process 7508) exited with code 01]
    (gdb) quit

  2. Default build options except add --with-system-boost: More trouble seeing the file system:
  1. GNU gdb (GDB) 7.8
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-cygwin".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
  1. Reading symbols from /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy-system-boost/bin/bali-phy.exe...done.
    (gdb) run
    Starting program: /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy-system-boost/bin/bali-phy.exe --smodel WAG+gamma --imodel RS07 --builtins-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy/ --modules-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy/modules/ --randomize-alignment ../new_plus_12/Minimal2_Motor_Myoall_mod_12.mfa --seed 111
    [New Thread 5028.0x142c]
    [New Thread 5028.0x1314]
    bali-phy: Error! Refusing to open '/cygdrive/c/users/kjp/.bali-phy' because it is a directory.
    [Inferior 1 (process 5028) exited with code 01]
    (gdb) quit

  2. MingW build (--build=x86_64-w64-mingw32): Libtool hangs during the build process and the build doesn't complete.

  3. MingW host (--host=x86_64-w64-mingw32): Build completes successfully but I get an "unknown target error" in gdb at runtime:

  1. GNU gdb (GDB) 7.8
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-cygwin".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
  1. Reading symbols from /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/bin/bali-phy.exe...done.
    (gdb) run
    Starting program: /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/bin/bali-phy.exe --smodel WAG+gamma --imodel RS07 --randomize-alignment Minimal3_Muscle_MF_Myoall.mfa --seed 111
    [New Thread 3772.0x1cf4]
    gdb: unknown target exception 0xc0000135 at 0x7ffff749c0b4
    During startup program exited with code 0xc0000135.
    (gdb) bt
    No stack.
    (gdb) quit
    [[[Also, if I run outside of gdb:]]]
    /cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/bin/bali-phy.exe: error while loading shared libraries: libgcc_s_seh-1.dll: cannot open shared object file: No such file or directory

Just to clarify - I'm indifferent to whether MingW is used and whether system Boost libraries are used, I'm just trying to find a build solution. Thanks for your work on this!

Karl

pete...@umn.edu

unread,
Oct 20, 2014, 8:09:40 PM10/20/14
to bali-ph...@googlegroups.com
I'm having trouble replicating the previous crash, so I can't give an update on this. The jobs were using 2-3 GB of RAM I think and I would expect it to run for >1000 iterations although it crashed before the first iteration here. My system RAM is tied up right now running a couple v2.2.1 jobs (I found I had working 64-bit binaries for that version already). I'll try to test later this week.

Karl

Benjamin Redelings

unread,
Oct 21, 2014, 5:37:32 PM10/21/14
to bali-ph...@googlegroups.com
Hi Karl,

First, thank you for your work in tracking these problems down!

Second, I fixed 2 bugs with alignment constraints in 2.3.  I compiled some new mingw64 binaries here:

    http://www.bali-phy.org/bali-phy-2.3.6beta1-win64.tar.gz

I would be quite interested to hear if this works for you and solves your problem. 

Third, if you find any crashing bugs, you can check C1.out for the random seed.  The crash should then be reproducable if you set the seed.  A crash in the first iteration is much easier to analyze than a crash 1000 iterations in!

Lastly, I suspect 2.2 will be a bit slower than both 2.1 and 2.3.

-BenRI

pete...@umn.edu

unread,
Oct 21, 2014, 6:21:21 PM10/21/14
to bali-ph...@googlegroups.com
I downloaded the beta binaries. Looks like the same filesystem visibility problem as I had with my build (case 1 in my previous post). Isn't one of the Boost libraries involved in filesystem access? Here's the output:

GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/bin/bali-phy.exe...done.
(gdb) run
Starting program: /cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/bin/bali-phy.exe --smodel WAG+gamma --imodel RS07 --builtins-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-2.3.6beta1/lib/bali-phy/ --modules-path=/cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/lib/bali-phy/modules/ --randomize-alignment Minimal3_Muscle_MF_Myoall.mfa --seed 111
[New Thread 6652.0x3c4]
[New Thread 6652.0x1bec]
[Thread 6652.0x1bec exited with code 0]
random seed = 111

bali-phy: Error! Loading module 'Prelude': Couldn't find file 'Prelude.hs' in path '/cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/lib/bali-phy/modules/'

start time: Tue Oct 21 23:04:26 2014

  end time: Tue Oct 21 23:04:28 2014

total (elapsed) time: 2 seconds
total (CPU) time: 2 seconds
[Inferior 1 (process 6652) exited with code 01]

(gdb) bt
No stack.
(gdb) quit

$ find '/cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/lib/bali-phy/modules/' -name Prelude.hs
/cygdrive/c/users/kjp/win/bali-phy/x86_64/bali-phy-2.3.6beta1/lib/bali-phy/modules/Prelude.hs

Benjamin Redelings

unread,
Oct 22, 2014, 8:59:34 AM10/22/14
to bali-ph...@googlegroups.com
Hi Pete,

    Hmm... it works for me on a windows system.  I think the problem is
(a) you are specifying --builtins-path and --modules-path, which should not be necessary
(b) you are using /cygdrive/c/.  Mingw builds only understand C:/
    Does that make sense?

-BenRI

Benjamin Redelings

unread,
Oct 22, 2014, 9:40:35 AM10/22/14
to bali-ph...@googlegroups.com
Hi Pete,

    Regarding the 4 cases:

4. Mingw (host=x86_64-w64-mingw32) This is probably working fine -- it just can't find a DLL that it needs.  You need to put the DLL into the DLL search path.

So, if you run FILE.exe, it will always look for DLLs in the directory containing FILE.exe.  So, locate the libgcc_s_seh-1.dll from the mingw installation, and place it in the same directory as bali-phy.exe.  Probably you will also need to copy libstd++-6.dll there as well.  This is what I did for the versions I distributed. 

3. Mingw (build=x86_64-w64-mingw32) I don't think you want to do this.  This says that the build tools (compiler and assembler) are mingw, but doesn't specify

[See https://www.gnu.org/software/libtool/manual/html_node/Cygwin-to-MinGW-Cross.html
Apparently host="the system the exe will run on" and build="the system you are compiling on".
I'm guessing you are doing a modern/standard cygwin-to-mingw cross?
Then host=x86_64-w64-mingw32 is right.]

1.  Cygwin:

bali-phy: Error! Loading module 'Prelude': Couldn't find file 'Prelude.hs' in path '/cygdrive/c/users/kjp/win/bali-phy/x86_64/BAli-Phy/lib/bali-phy/modules'

Boost filesystem is being compiled the mingw way, I think, so it doesn't understand '/cygdrive'
Also, --modules-path and --builtins-path should not be necessary.  If they are, its a bug.
I just pushed a patch that should compile boost filesystem under the POSIX api instead of the windows API for cygwin.
I suspect that will probably result in equivalence to Cygwin/system-boost.

2. Cygwin/system-boost:

bali-phy: Error! Refusing to open '/cygdrive/c/users/kjp/.bali-phy' because it is a directory.

This I don't understand yet.  Is there such a directory?

For cygwin builds, I think there are 2-3 more bugs to fix in order to get them working.  I will try installing cygwin on my virtual machine this afternoon.

-BenRI
--

pete...@umn.edu

unread,
Oct 23, 2014, 10:37:36 AM10/23/14
to bali-ph...@googlegroups.com
The v2.3.6beta1 binaries are working for me now - Believe it or not I didn't know the C:/ notation was available in cygwin :-( That's the notation the Windows shell uses so I don't know why I never thought to try it. How embarrassing.

The binaries you provided should work for everything I want to do. For sake of completeness I will retry the MingW build on my system following your suggestion regarding the missing DLLs. Thanks again!

Karl

Benjamin Redelings

unread,
Oct 24, 2014, 10:05:10 AM10/24/14
to bali-ph...@googlegroups.com
Hi Karl,

No worries! The combination of mingw binaries (which want C:/) and
cygwin binaries (which want /cygdrive/c/) is only made more confusing
when you run mingw binaries from a cygwin version of BASH. It would be
nice if I could compile something that understood both...

For now, I'll try and see if I can write something that will
clarify the docs. BTW, when you do the mingw compile, do you just add
"--host=x86_64-w64-mingw32" to the configure command from cygwin?

-BenRI
Reply all
Reply to author
Forward
0 new messages