![]() |
|
|
#1 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
2·53·71 Posts |
Prime95 version 29.1 is built with the rather ancient CentOS 5 so that downloaders of mprime do not run into an issue where mprime requires a newer C runtime library than is present on their system.
Version 29.2 will not compile because I'm including SQLite which uses some pthread options that apparently did not exist 10 years ago. The question: Do you think switching to building 29.2 on CentOS 6.9 will cause problems for many users? |
|
|
|
|
|
#2 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
260316 Posts |
Quote:
But, why don't you simply spin up a CentOS 7 instance, and compile a fully staticly linked executable? |
|
|
|
|
|
|
#3 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
2·53·71 Posts |
Chris, you're the one that recommended building on a CentOS 5 system. That has worked rather well.
Mprime cannot be linked statically. Apparently there are some C runtime functions that preclude that. I don't remember which one mprime is tripping over. The last time I tried was several years ago. |
|
|
|
|
|
#4 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37×263 Posts |
Quote:
We've got some very smart programmers around these here parts. Let's figure this out. |
|
|
|
|
|
|
#5 | |
|
Dec 2016
73 Posts |
Quote:
It's not quite so simple. Kernel APIs also change, even for such common syscalls as open(). If I recall correctly it is the recently introduced (=10 years ago) O_CLOEXEC flag that had a different meaning for the ancient RHEL 4 kernel, which interpreted it as "only open the file if it is already cached". This means a statically compiled binary using new libraries will randomly fail to open files on RHEL 4. We learned this the hard way. |
|
|
|
|
|
|
#6 |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37·263 Posts |
|
|
|
|
|
|
#7 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
2×53×71 Posts |
This URL, http://stackoverflow.com/questions/1...ostbyname?lq=1 , describes my problem along with possible solutions.
|
|
|
|
|
|
#8 |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37×263 Posts |
|
|
|
|
|
|
#9 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37×263 Posts |
Quote:
I will spend some time over the long weekend trying to tweak the mprime source code such that it can compile a static executable. |
|
|
|
|
|
|
#10 |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37·263 Posts |
Hey George.
So, I began the compile experiments, but immediately encountered some difficulties. Is there a build guide anywhere? Code:
[chalsall@burrow gimps]$ cd test1/
[chalsall@burrow test1]$ ls
comm95b.c comm95c.c commona.c commonb.c commonc.c common.h gwnum linux macosx md5.c p95v2810.source.zip primenet.c qd winnt
comm95b.h comm95c.h commona.h commonb.h commonc.h ecm.c gwtest.c linux64 macosx64 os2 prime95 primenet.h tput.c
[chalsall@burrow test1]$ cd linux
[chalsall@burrow linux]$ ls
factor32.o makebsd makefile makehaikugcc2 makehaikugcc4 menu.c os_routines.c prime.c prime.h
[chalsall@burrow linux]$ 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 -O2 -march=i486 -malign-double -c prime.c
prime.c:1:0: error: CPU you selected does not support x86-64 instruction set
/* Copyright 1995-2016 Mersenne Research, Inc. */
prime.c:1:0: error: CPU you selected does not support x86-64 instruction set
makefile:49: recipe for target 'prime.o' failed
make: *** [prime.o] Error 1
[chalsall@burrow linux]$ cd ..
[chalsall@burrow test1]$ cd linux64
[chalsall@burrow 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
In file included from prime.c:109:0:
../primenet.c:49:23: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^
compilation terminated.
makefile:42: recipe for target 'prime.o' failed
make: *** [prime.o] Error 1
|
|
|
|
|
|
#11 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
|
|
|
|
|