![]() |
![]() |
#1 |
"Sam"
Nov 2016
5·67 Posts |
![]()
The Windows version, it is the newest version of PFGW. The Linux version is outdated by half a year. Is someone able to compile a Linux version of the newest version of PFGW which is 3.8.3? Thanks to someone who is advanced at Linux and can do it, I am just a beginner at it for now. I can spare CPUs on my upgraded Linux computer as I cannot for Windows. The upgrade to PFGW is listed in this thread.
![]() |
![]() |
![]() |
![]() |
#2 |
Dec 2016
2·32·7 Posts |
![]()
I gave it a try. First, the source code needs a bit of adjustment to compile:
Code:
--- pform/pfio/pfdecimalfile.cpp (revision 642) +++ pform/pfio/pfdecimalfile.cpp (working copy) @@ -2,6 +2,7 @@ #include "pfiopch.h" #include <stdio.h> #include <string.h> +#include <ctype.h> // also includes pffile.h but defines PFNewPGenFile class which is needed for the openInputFile() function. #include "pfnewpgenfile.h" But then, "make" still fails with Code:
g++ -O3 -m64 -DX86_64 -D_64BIT -I../../packages/gmp/64bit -I../../pfconfig/headers \ pform/pfgw/.libs/pfgw_main.a pform/pfio/.libs/pfio.a pform/pfoo/.libs/pfoo.a pform/pfgwlib/.libs/pfgwlib.a \ pform/pfmath/.libs/pfmath.a pform/pflib/.libs/pflib.a \ packages/gmp/64bit/libgmp.a packages/gwnum/64bit/gwnum.a -Wl,-no_pie -lpthread -lstdc++ -o pfgw64 g++: error: packages/gmp/64bit/libgmp.a: No such file or directory g++: error: packages/gwnum/64bit/gwnum.a: No such file or directory makefile:8: recipe for target 'pfgw64' failed |
![]() |
![]() |
![]() |
#3 |
"Mark"
Apr 2003
Between here and the
11011001110012 Posts |
![]()
You need to build gwnum and gmp on your own and move the libraries to the correct folders in order for it to build. Fortunately that should be fairly easy to do.
If you can point me to the correct source file for isdigit(), I can add it to the source. I have a couple of pending changes that I haven't committed yet so I will include it with those. |
![]() |
![]() |
![]() |
#4 |
Sep 2002
Database er0rr
5×29×31 Posts |
![]()
After installing gwnum.a and libgmp.a, and adding "#include <ctype.h>", my make gets me to:
Code:
g++ -O3 -m64 -DX86_64 -D_64BIT -I../../packages/gmp/64bit -I../../pfconfig/headers \ pform/pfgw/.libs/pfgw_main.a pform/pfio/.libs/pfio.a pform/pfoo/.libs/pfoo.a pform/pfgwlib/.libs/pfgwlib.a \ pform/pfmath/.libs/pfmath.a pform/pflib/.libs/pflib.a \ packages/gmp/64bit/libgmp.a packages/gwnum/64bit/gwnum.a -Wl,-no_pie -lpthread -lstdc++ -o pfgw64 /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status makefile:8: recipe for target 'pfgw64' failed make: *** [pfgw64] Error 1 ![]() Last fiddled with by paulunderwood on 2017-02-08 at 21:57 |
![]() |
![]() |
![]() |
#5 |
Dec 2016
2×32×7 Posts |
![]()
isdigit() is already there, you just need to include it as shown in the diff.
@paulunderwood: Do you have some commands I can run? I'm trying to automate the build using a Docker container. So far, my Dockerfile is still quite modest: Code:
FROM gcc RUN apt-get update && apt-get install -y libgmp-dev COPY . /usr/src/openpfgw WORKDIR /usr/src/openpfgw RUN make |
![]() |
![]() |
![]() |
#6 |
Sep 2002
Database er0rr
5×29×31 Posts |
![]()
I get libgmp.a from a recent installation of the latest GMP, and gwnum.a from compiling mprime -- so I guess you can wget it and make it to get GWNUM. HTH.
![]() Last fiddled with by paulunderwood on 2017-02-08 at 22:30 |
![]() |
![]() |
![]() |
#7 |
Dec 2016
12610 Posts |
![]()
I did get the libgmp.a, but cannot compile mprime:
Code:
/usr/src/mprime/linux64# make [ ! -e ../security.h ] && touch ../security.h || true [ ! -e ../security.c ] && touch ../security.c || true [ ! -e ../secure5.c ] && touch ../secure5.c || true gcc -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2 -c prime.c gcc -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2 -c menu.c make: *** No rule to make target 'factor64.o', needed by 'mprime'. Stop. |
![]() |
![]() |
![]() |
#8 |
Sep 2002
Database er0rr
449510 Posts |
![]()
Please try make in the gwnum directory.
Code:
/Downloads/p95/gwnum$ make -f make64 gcc -I.. -DX86_64 -O2 -c cpuid.c gcc -I.. -DX86_64 -O2 -c gwnum.c gcc -I.. -DX86_64 -O2 -c gwtables.c gcc -I.. -DX86_64 -O2 -c gwthread.c gcc -I.. -DX86_64 -O2 -c gwini.c gcc -I.. -DX86_64 -O2 -c gwutil.c g++ -I.. -I../qd -DX86_64 -O2 -c gwdbldbl.cpp gcc -I.. -DX86_64 -O2 -c giants.c gcc -I.. -DX86_64 -O2 -c ecmstag1.c cp linux64/gwnum.a . ar -rs gwnum.a cpuid.o gwnum.o gwtables.o gwthread.o gwini.o gwutil.o gwdbldbl.o giants.o ecmstag1.o Last fiddled with by paulunderwood on 2017-02-08 at 23:05 |
![]() |
![]() |
![]() |
#9 |
Dec 2016
1768 Posts |
![]()
I also tried this, it also failed:
Code:
/usr/src/mprime/gwnum# make -f make64 gcc -I.. -DX86_64 -O2 -c cpuid.c gcc -I.. -DX86_64 -O2 -c gwnum.c gcc -I.. -DX86_64 -O2 -c gwtables.c gcc -I.. -DX86_64 -O2 -c gwthread.c gcc -I.. -DX86_64 -O2 -c gwutil.c g++ -I.. -I../qd -DX86_64 -O2 -c gwdbldbl.cpp gcc -I.. -DX86_64 -O2 -c giants.c gcc -I.. -DX86_64 -O2 -c ecmstag1.c cp linux64/gwnum.a . cp: cannot stat 'linux64/gwnum.a': No such file or directory make64:19: recipe for target 'gwnum.a' failed make: *** [gwnum.a] Error 1 |
![]() |
![]() |
![]() |
#10 |
Dec 2016
2×32×7 Posts |
![]()
Thanks for posting the example output! Turns out the repo on Github was missing a file. So far, it works now.
|
![]() |
![]() |
![]() |
#11 | |
Sep 2002
Database er0rr
10001100011112 Posts |
![]() Quote:
Code:
..... drwx--- 6.3 fat 102 bx stor 16-Oct-30 14:42 gwnum/linux64/ -rw---- 6.3 fat 35851474 bx defN 16-Oct-30 10:33 gwnum/linux64/gwnum.a -rw---- 6.3 fat 30960362 bx defN 16-Oct-30 10:32 gwnum/linux/gwnum.a ..... |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
(Open)PFGW 32 bit linux | Rincewind | Software | 0 | 2016-03-10 09:18 |
PFGW latest well-tested version | mdettweiler | Conjectures 'R Us | 109 | 2010-09-29 20:20 |
Linux newpgen pfgw llr | jasong | Linux | 10 | 2008-02-16 23:55 |
src2414 how to compile 64 bit in Linux | Unregistered | Software | 1 | 2005-08-22 13:19 |
How to Compile mprime Under Linux | Blaise Pascal | Software | 12 | 2005-01-13 14:40 |