![]() |
![]() |
#1 |
"Daniel Jackson"
May 2011
14285714285714285714
3×251 Posts |
![]()
Can someone help me with compiling yafu in MinGW on Win7 64-bit? I'm using the msys terminal, and this is what comes out when I use "sh make_all-mingw.sh" (SVN 345):
Code:
Username@ComputerName-PC /c/VBox/yafu-code-345-trunk/yafu-code-345-trunk $ sh make_all-mingw.sh rm -f factor/qs/msieve/lanczos.o factor/qs/msieve/lanczos_matmul0.o factor/qs/msieve/lanczos_matmul1.o factor/qs/msieve/lanczos_ matmul2.o factor/qs/msieve/lanczos_pre.o factor/qs/msieve/sqrt.o factor/qs/msieve/savefile.o factor/qs/msieve/gf2.o top/driver.o top/utils.o top/stack.o top/calc.o top/test.o top/aprcl/mpz_aprcl.o factor/factor_common.o factor/rho.o factor/squfof.o factor/ trialdiv.o factor/tune.o factor/qs/filter.o factor/qs/tdiv.o factor/qs/tdiv_small.o factor/qs/tdiv_large.o factor/qs/tdiv_scan.o factor/qs/large_sieve.o factor/qs/new_poly.o factor/qs/siqs_test.o factor/tinyqs/tinySIQS.o factor/qs/siqs_aux.o factor/qs/smal lmpqs.o factor/qs/SIQS.o factor/gmp-ecm/ecm.o factor/gmp-ecm/pp1.o factor/gmp-ecm/pm1.o factor/nfs/nfs.o arith/arith0.o arith/ar ith1.o arith/arith2.o arith/arith3.o top/eratosthenes/count.o top/eratosthenes/offsets.o top/eratosthenes/primes.o top/eratosthe nes/roots.o top/eratosthenes/linesieve.o top/eratosthenes/soe.o top/eratosthenes/tiny.o top/eratosthenes/worker.o top/eratosthen es/soe_util.o top/eratosthenes/wrapper.o factor/qs/tdiv_med_32k.o factor/qs/tdiv_med_64k.o factor/qs/tdiv_resieve_32k.o factor/q s/tdiv_resieve_64k.o factor/qs/med_sieve_32k.o factor/qs/med_sieve_64k.o factor/qs/poly_roots_32k.o factor/qs/poly_roots_64k.o f actor/qs/update_poly_roots_32k.o factor/qs/update_poly_roots_64k.o gcc -march=core2 -mtune=core2 -DUSE_NFS -O3 -fomit-frame-pointer -Wall -I. -Iinclude -Itop/aprcl -I../gmp/include -I../gmp-ecm/ include -I/d/Programming/gmp-ecm/svn_2529_mw64_gmp512 -c -o factor/qs/msieve/lanczos.o factor/qs/msieve/lanczos.c In file included from include/yafu.h:48:0, from include/factor.h:24, from include/lanczos.h:21, from factor/qs/msieve/lanczos.c:18: include/types.h:38:22: fatal error: intrin.h: No such file or directory #include <intrin.h> ^ compilation terminated. <builtin>: recipe for target `factor/qs/msieve/lanczos.o' failed make: *** [factor/qs/msieve/lanczos.o] Error 1 rm -f factor/qs/msieve/lanczos.o factor/qs/msieve/lanczos_matmul0.o factor/qs/msieve/lanczos_matmul1.o factor/qs/msieve/lanczos_ matmul2.o factor/qs/msieve/lanczos_pre.o factor/qs/msieve/sqrt.o factor/qs/msieve/savefile.o factor/qs/msieve/gf2.o top/driver.o top/utils.o top/stack.o top/calc.o top/test.o top/aprcl/mpz_aprcl.o factor/factor_common.o factor/rho.o factor/squfof.o factor/ trialdiv.o factor/tune.o factor/qs/filter.o factor/qs/tdiv.o factor/qs/tdiv_small.o factor/qs/tdiv_large.o factor/qs/tdiv_scan.o factor/qs/large_sieve.o factor/qs/new_poly.o factor/qs/siqs_test.o factor/tinyqs/tinySIQS.o factor/qs/siqs_aux.o factor/qs/smal lmpqs.o factor/qs/SIQS.o factor/gmp-ecm/ecm.o factor/gmp-ecm/pp1.o factor/gmp-ecm/pm1.o factor/nfs/nfs.o arith/arith0.o arith/ar ith1.o arith/arith2.o arith/arith3.o top/eratosthenes/count.o top/eratosthenes/offsets.o top/eratosthenes/primes.o top/eratosthe nes/roots.o top/eratosthenes/linesieve.o top/eratosthenes/soe.o top/eratosthenes/tiny.o top/eratosthenes/worker.o top/eratosthen es/soe_util.o top/eratosthenes/wrapper.o factor/qs/tdiv_med_32k.o factor/qs/tdiv_med_64k.o factor/qs/tdiv_resieve_32k.o factor/q s/tdiv_resieve_64k.o factor/qs/med_sieve_32k.o factor/qs/med_sieve_64k.o factor/qs/poly_roots_32k.o factor/qs/poly_roots_64k.o f actor/qs/update_poly_roots_32k.o factor/qs/update_poly_roots_64k.o Username@ComputerName /c/VBox/yafu-code-345-trunk/yafu-code-345-trunk |
![]() |
![]() |
![]() |
#2 |
"Ben"
Feb 2007
7×13×41 Posts |
![]()
I'm glad you decided to try this!
It's not clear that you are using mingw-64 from your post, so just a reminder that you need 64-bit mingw. That said, it looks like there is currently at least one issue with building the most recent SVN using mingw64, although a workaround has been identified. Or you could go back in revision until it works. Before you do any of that, you'll need to have built GMP, GMP-ECM, and MSIEVE. So if you haven't already, download those projects into parallel folders to yafu, like this, and try to build them: Code:
top_folder yafu_src_folder msieve_src_folder gmp_src_folder gmp_ecm_src_folder ./configure make make install msieve I think has a mingw makefile. or the linux makefile could be modified. |
![]() |
![]() |
![]() |
#3 |
I moo ablest echo power!
May 2013
185210 Posts |
![]()
Just wanted to pop in and confirm that YAFU can be built in MinGW-64 with a little bit of finagling. I'm not going to try and write out a how-to here or anything, but if you have questions, I'll definitely try and help.
![]() |
![]() |
![]() |
![]() |
#4 |
"Daniel Jackson"
May 2011
14285714285714285714
3×251 Posts |
![]()
I can't get GMP-ECM to compile, even though I made the GMP libraries beforehand. It says "no makefile found. Stop.", and when I try using the "makefile.am" or "makefile.in" file as input, I get "makefile.am:14: *** missing separator. Stop." or "makefile.in:16: *** missing separator. Stop.". Which makefile is the right one to use, and how do I fix it? I'm using the most recent packages.
|
![]() |
![]() |
![]() |
#5 |
I moo ablest echo power!
May 2013
111001111002 Posts |
![]()
If you mean the latest SVN version, you probably want to use the VS Studio solution, not MinGW. I'm pretty sure you're meant to do autoconf or something, and I've never had any success with MinGW doing that. Alternatively, you can use the 6.4.4 package, which comes with a working Makefile.
|
![]() |
![]() |
![]() |
#6 | |
"Ed Hall"
Dec 2009
Adirondack Mtns
3×1,741 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Mar 2006
22·7·19 Posts |
![]() Quote:
You will need to run these commands inside of an MSYS shell. I use the MSYS that you can get from here: http://sourceforge.net/projects/ming...nary-packages/ Download the 2013-05-15 version and extract it somewhere, I have mine extracted to c:\msys-20130515\. It contains autoreconf under \bin. Actually, my folder has several autoreconf's. If the included one doesn't work let us know and we can try to help find a recent version that will work. Also, after extracting the MSYS environment, be sure to edit the c:\msys-20130515\etc\profile file and set the following: Code:
if [ $MSYSTEM == MINGW32 ]; then # export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH" export PATH=".:/c/mingw64-20141222/bin:/usr/local/bin:/bin:$PATH" else export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH" fi Code:
autoreconf -i ./configure (you may want to add the --disable-assert option) make make check |
|
![]() |
![]() |
![]() |
#8 |
"Daniel Jackson"
May 2011
14285714285714285714
2F116 Posts |
![]()
I ran "./Configure --disable-assert", but it said it couldn't find gmp.h, even though I copied it into the GMP-ECM source directory.
Last fiddled with by Stargate38 on 2016-01-19 at 15:42 |
![]() |
![]() |
![]() |
#9 |
"Ben"
Feb 2007
7·13·41 Posts |
![]()
Leave gmp.h where it was and run this to configure gmp-ecm:
./configure --with-gmp=<gmpdir> BTW, this info is in the INSTALL readme file in the gmp-ecm package. |
![]() |
![]() |
![]() |
#10 |
"Daniel Jackson"
May 2011
14285714285714285714
3×251 Posts |
![]()
OK. I got ECM to compile, but now I'm doing Msieve, and I'm getting the following errors:
Code:
c:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bi n/ld.exe: cannot find -lecm c:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bi n/ld.exe: cannot find -ldl c:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bi n/ld.exe: cannot find -lgmp Collect2.exe: error: ld returned 1 exit status makefile: 274: recipe for target 'all' failed make: *** [all] Error 1 |
![]() |
![]() |
![]() |
#11 |
Tribal Bullet
Oct 2004
67438 Posts |
![]()
Msieve only very recently was ported to run in 64-bit windows, and that used MSYS2 not the old Msys with mingw64. The makefile expects a prebuilt GMP and GMP-ECM library in the default library path. I don't know if mingw-w64 has a libdl.a anywhere, it may be 32-bit only.
Edit: actually you don't need the demo binary that gets created, only libmsieve.a to link into YAFU, and you got past that point so you can probably ignore the compile error and move on to building the YAFU binary. Last fiddled with by jasonp on 2016-01-20 at 01:34 |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling YAFU for Windows using mingw | bsquared | YAFU | 87 | 2022-11-21 22:31 |
Running YAFU via Aliqueit doesn't find yafu.ini | EdH | YAFU | 8 | 2018-03-14 17:22 |
Guide to compiling YAFU | Mr. Odd | YAFU | 4 | 2017-04-24 15:40 |
Compiling YAFU under MinGW | wombatman | YAFU | 10 | 2016-01-21 19:48 |
Compiling 24.14 | CBoland | Software | 6 | 2007-08-01 00:11 |