mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2017-01-02, 12:37   #56
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

Ever since ECM-7 was introduced, I've been unable to successfully compile GMP-ECM using MinGW/MinSys under Windows.
GMP is correctly installed, and passes 'make check'.
I am using the standard commands of
./configure --with-gmp=/usr/local
make
but it always ends in error. I am now trying to use GMP-6.1.2 and ECM-7.0.4
Here is the last few lines of the output of my latest attempt. I can't tell what I did wrong.
Code:
 -march=pentium4 -mno-sse2 -MT ecm-main.o -MD -MP -MF .deps/ecm-main.Tpo -c -o e
cm-main.o `test -f 'main.c' || echo './'`main.c
main.c: In function 'main':
main.c:1352:32: warning: ISO C does not support the 'I64' ms_printf length modif
ier [-Wformat=]
               fprintf (stdout, "Reading batch product (of %"PRIu64" bits) of "
                                ^
main.c:1352:32: warning: format '%I64u' expects argument of type 'long long unsi
gned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]
mv -f .deps/ecm-main.Tpo .deps/ecm-main.Po
gcc -DHAVE_CONFIG_H -I.  -DOUTSIDE_LIBECM -I/usr/local/include -I/usr/local/incl
ude  -g -W -Wall -Wundef -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium4
 -march=pentium4 -mno-sse2 -MT ecm-resume.o -MD -MP -MF .deps/ecm-resume.Tpo -c
-o ecm-resume.o `test -f 'resume.c' || echo './'`resume.c
mv -f .deps/ecm-resume.Tpo .deps/ecm-resume.Po
gcc -DHAVE_CONFIG_H -I.  -DOUTSIDE_LIBECM -I/usr/local/include -I/usr/local/incl
ude  -g -W -Wall -Wundef -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium4
 -march=pentium4 -mno-sse2 -MT ecm-getprime_r.o -MD -MP -MF .deps/ecm-getprime_r
.Tpo -c -o ecm-getprime_r.o `test -f 'getprime_r.c' || echo './'`getprime_r.c
mv -f .deps/ecm-getprime_r.Tpo .deps/ecm-getprime_r.Po
gcc -DHAVE_CONFIG_H -I.  -DOUTSIDE_LIBECM -I/usr/local/include -I/usr/local/incl
ude  -g -W -Wall -Wundef -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium4
 -march=pentium4 -mno-sse2 -MT aprtcle/ecm-mpz_aprcl.o -MD -MP -MF aprtcle/.deps
/ecm-mpz_aprcl.Tpo -c -o aprtcle/ecm-mpz_aprcl.o `test -f 'aprtcle/mpz_aprcl.c'
|| echo './'`aprtcle/mpz_aprcl.c
mv -f aprtcle/.deps/ecm-mpz_aprcl.Tpo aprtcle/.deps/ecm-mpz_aprcl.Po
gcc -DHAVE_CONFIG_H -I.  -DOUTSIDE_LIBECM -I/usr/local/include -I/usr/local/incl
ude  -g -W -Wall -Wundef -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium4
 -march=pentium4 -mno-sse2 -MT ecm-memusage.o -MD -MP -MF .deps/ecm-memusage.Tpo
 -c -o ecm-memusage.o `test -f 'memusage.c' || echo './'`memusage.c
mv -f .deps/ecm-memusage.Tpo .deps/ecm-memusage.Po
/bin/sh ./libtool  --tag=CC   --mode=link gcc  -g -W -Wall -Wundef -m32 -O2 -ped
antic -fomit-frame-pointer -mtune=pentium4 -march=pentium4 -mno-sse2   -o ecm.ex
e ecm-auxi.o ecm-b1_ainc.o ecm-candi.o ecm-eval.o ecm-main.o ecm-resume.o ecm-ge
tprime_r.o aprtcle/ecm-mpz_aprcl.o ecm-memusage.o libecm.la /usr/local/lib/libgm
p.a -lm -lm -lm -lm -lm
libtool: link: gcc -g -W -Wall -Wundef -m32 -O2 -pedantic -fomit-frame-pointer -
mtune=pentium4 -march=pentium4 -mno-sse2 -o ecm.exe ecm-auxi.o ecm-b1_ainc.o ecm
-candi.o ecm-eval.o ecm-main.o ecm-resume.o ecm-getprime_r.o aprtcle/ecm-mpz_apr
cl.o ecm-memusage.o  ./.libs/libecm.a /usr/local/lib/libgmp.a
ecm-memusage.o: In function `PeakMemusage':
C:\MinGW\msys\1.0\home\User\ecm-7.0.4/memusage.c:72: undefined reference to `Get
ProcessMemoryInfo@12'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [ecm.exe] Error 1
make[2]: Leaving directory `/home/User/ecm-7.0.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/User/ecm-7.0.4'
make: *** [all] Error 2

User@User-test ~/ecm-7.0.4
$
M0CZY is offline   Reply With Quote
Old 2017-01-02, 16:14   #57
WraithX
 
WraithX's Avatar
 
Mar 2006

48610 Posts
Default

Quote:
Originally Posted by M0CZY View Post
but it always ends in error. I am now trying to use GMP-6.1.2 and ECM-7.0.4
Here is the last few lines of the output of my latest attempt. I can't tell what I did wrong.
Code:
ecm-memusage.o: In function `PeakMemusage':
C:\MinGW\msys\1.0\home\User\ecm-7.0.4/memusage.c:72: undefined reference to `GetProcessMemoryInfo@12'
collect2.exe: error: ld returned 1 exit status
Can you post a zipped copy of your config.log file from the folder "C:\MinGW\msys\1.0\home\User\ecm-7.0.4"?
Also, which version of Windows are you using? (XP, Vista, 7, 8, 8.1, 10)
And, is it 32-bit or 64-bit Windows?
Also, can you post here the output of the following commands?
autoconf -V
gcc -v
WraithX is offline   Reply With Quote
Old 2017-01-02, 16:56   #58
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

My computer is running Windows 7 Enterprise 32-bit Edition.
I have included the zipped config.log file.

The other output you requested is

User@User-test ~
$ autoconf -V
autoconf (GNU Autoconf) 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

User@User-test ~

User@User-test ~
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/5.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu --host=m
ingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i58
6 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-sha
red --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-sp
ecific-runtime-libs --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with
-tune=generic --enable-libgomp --disable-libvtv --enable-nls : (reconfigured) ..
/src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mi
ngw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-language
s=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-thread
s --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs
--with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-d
ebug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 5.3.0 (GCC)

User@User-test ~
$

Hope this helps.
M0CZY is offline   Reply With Quote
Old 2017-01-02, 16:59   #59
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

Silly me, I forgot to upload the log file. It is in this post. I hope.
Attached Files
File Type: zip config.zip (12.3 KB, 76 views)
M0CZY is offline   Reply With Quote
Old 2017-01-02, 18:38   #60
WraithX
 
WraithX's Avatar
 
Mar 2006

2·35 Posts
Default

Quote:
Originally Posted by M0CZY View Post
My computer is running Windows 7 Enterprise 32-bit Edition.
I have included the zipped config.log file.
Hope this helps.
Hmmm, there isn't an obvious reason why -lpsapi isn't working on your computer. Can you do a search inside your C:\MinGW\ directory and see if you can find a file called libpsapi.a? If you find it, or even more than one of them, can you post here the full path to it? If you don't find it, let us know about that, too.

BTW, where did you get your mingw tool-chain from?
WraithX is offline   Reply With Quote
Old 2017-01-02, 20:28   #61
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

libpsapi.a is not present on my computer.
I don't understand what you mean by mingw tool-chain. If you are asking how I installed MinGW/MSYS, then I used the latest MinGW Installation Manager Setup Tool.
M0CZY is offline   Reply With Quote
Old 2017-01-03, 00:04   #62
WraithX
 
WraithX's Avatar
 
Mar 2006

2×35 Posts
Default

Quote:
Originally Posted by M0CZY View Post
libpsapi.a is not present on my computer.
I don't understand what you mean by mingw tool-chain. If you are asking how I installed MinGW/MSYS, then I used the latest MinGW Installation Manager Setup Tool.
That's pretty much what I mean.

I just went to www.mingw.org, clicked the Downloads link which took me to SourceForge, went into the Installers folder, downloaded and ran the mingw-get-setup.exe program, and then had it install mingw32-base and mingw32-developer-toolkit all to the c:\mingw\ directory. When I looked inside my c:\mingw\lib\ directory I found a libpsapi.a file. So, I'm not sure why you don't have it. You probably need to run the installer again to make sure you have the above packages, or that you have the latest version of the above packages.

Alternatively, you can try downloading the appropriate file yourself. I just checked and the libpsapi.a file is inside the w32api "zip" (actually it's a tar.xz file). If you download that and extract it (7-zip is good for extracting files) into the correct place in your current setup, it will give you the libpsapi.a file. The file you will need is called:
w32api-3.18.2-mingw32-dev.tar.xz
Which can be found at:
https://sourceforge.net/projects/min...i/w32api-3.18/

If the first method above doesn't give you the file, try the second method. Once you have the file, try compiling again. Let us know how it goes.
WraithX is offline   Reply With Quote
Old 2017-01-03, 04:34   #63
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·3·13·41 Posts
Default

You can try MSYS2 instead: https://msys2.github.io/

Download the 32 bit version: msys2-i686-20161025.exe

First follow the guide to install and run these first commands as in the guide:

pacman -Sy pacman
(restart MSYS2)
pacman -Syu
(restart MSYS2)
pacman -Su

Then install the tools needed for compiling by running these commands:

pacman -S gcc
pacman -S make
pacman -S autoconf
pacman -S libtool
pacman -S automake

Then you should be ready to compile GMP and GMP-ECM.
ATH is offline   Reply With Quote
Old 2017-01-03, 09:53   #64
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

I've done another thorough Windows search, and I have found 2 copies of libpsapi.a, one in C:\MinGW\lib, and another, older copy in C:\MinGW\msys\1.0\lib\w32api

I have another Windows 7 32-bit computer with the same MinGW/MSYS setup, and building ECM 7 on that fails with the same errors.
Interestingly, I can build ecm-6.4.4 without any error.
M0CZY is offline   Reply With Quote
Old 2017-01-03, 16:47   #65
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

22×31 Posts
Default

I took the advice of ATH and installed MSYS2 as he suggested, and have managed to compile a copy of GMP-ECM that passes 'make check'.
But I am unable to use the program because I get a message that says
"The program can't start because msys-2.0.dll is missing from your computer. Try reinstalling the program to fix this problem."

Any ideas what I need to do to fix this?
M0CZY is offline   Reply With Quote
Old 2017-01-03, 16:54   #66
M0CZY
 
M0CZY's Avatar
 
May 2005
England, UK

12410 Posts
Default

And my other machine complains that msys-gcc_s-1.dll is missing!
M0CZY is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed compiling GMP-ECM M0CZY GMP-ECM 76 2009-09-29 15:48
Compiling my first program by using GMP Raman Programming 3 2009-02-14 02:17
Compiling Phrot rogue Sierpinski/Riesel Base 5 142 2009-01-09 03:42
Compiling 24.14 CBoland Software 6 2007-08-01 00:11
Compiling new version of GMP-ECM M0CZY GMP-ECM 3 2006-05-27 09:54

All times are UTC. The time now is 20:39.


Fri Dec 3 20:39:01 UTC 2021 up 133 days, 15:08, 0 users, load averages: 2.00, 1.48, 1.29

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.