mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2011-03-06, 13:42   #1
graysky
 
graysky's Avatar
 
Jul 2004

3×13 Posts
Default compiling mprime on linux

Is there a readme or guide that describes how to compile 26.5 from source?
graysky is offline   Reply With Quote
Old 2011-03-13, 00:33   #2
graysky
 
graysky's Avatar
 
Jul 2004

1001112 Posts
Default

Source: ftp://mersenne.org/gimps/source265.zip

For me it errors out on the make step.

Code:
$ pwd
/dev/shm/linux64
$ cd 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 -DX86_64 -O2 -Wno-unused-result -c prime.c
gcc -I.. -I../gwnum -DX86_64 -O2 -Wno-unused-result -c menu.c
gcc -Wl,-M -o mprime prime.o menu.o factor64.o ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -lrt -lssl -lcrypto -ldl -lz   -lstdc++ -Wl,-Bdynamic -ldl
gcc: ../gwnum/gwnum.a: No such file or directory
make: *** [mprime] Error 1
Tried moving that file to the specified dir but no joy.

Code:
$ cp ../gwnum/linux64/gwnum.a ../gwnum/
$ make
<<cut>>
menu.o: In function `torture':
menu.c:(.text+0x2318): undefined reference to `CPU_HYPERTHREADS'
menu.c:(.text+0x235c): undefined reference to `CPU_HYPERTHREADS'
menu.c:(.text+0x23f2): undefined reference to `CPU_FLAGS'
menu.c:(.text+0x2423): undefined reference to `CPU_FLAGS'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlopen.o): In function `dlopen':
(.text+0x5): undefined reference to `__dlopen'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlclose.o): In function `dlclose':
(.text+0x1): undefined reference to `__dlclose'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlsym.o): In function `dlsym':
(.text+0x5): undefined reference to `__dlsym'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlerror.o): In function `dlerror':
(.text+0x1): undefined reference to `__dlerror'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dladdr.o): In function `dladdr':
(.text+0x1): undefined reference to `__dladdr'
collect2: ld returned 1 exit status
make: *** [mprime] Error 1
Thoughts and suggestions are welcomed!

Last fiddled with by graysky on 2011-03-13 at 00:47
graysky is offline   Reply With Quote
Old 2011-03-13, 03:00   #3
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

7,013 Posts
Default

cd gwnum
make -f make64
cd ../linux64
make
Prime95 is offline   Reply With Quote
Old 2011-03-13, 03:03   #4
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

7,013 Posts
Default

If you get errors linking to cURL. Try downloading the libcurl sources and follow the instructions in ../linux/makefile for making a libcurl that doesn't drag in a whole bunch of junk
Prime95 is offline   Reply With Quote
Old 2011-03-13, 10:32   #5
graysky
 
graysky's Avatar
 
Jul 2004

3×13 Posts
Default

Thanks for the info. I rebuilt curl as per the instructions, then:

Code:
$ bsdtar -xf source265.zip
$ cd 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 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 .
ar -rs gwnum.a cpuid.o gwnum.o gwthread.o gwutil.o gwdbldbl.o giants.o ecmstag1.o
$ cd ../linux64
$ make
<<CUT>>
.debug_weaknames
 *(.debug_weaknames .zdebug_weaknames)

.debug_funcnames
 *(.debug_funcnames .zdebug_funcnames)

.debug_typenames
 *(.debug_typenames .zdebug_typenames)

.debug_varnames
 *(.debug_varnames .zdebug_varnames)

.debug_pubtypes
 *(.debug_pubtypes .zdebug_pubtypes)

.debug_ranges
 *(.debug_ranges .zdebug_ranges)

.gnu.attributes
 *(.gnu.attributes)

/DISCARD/
 *(.note.GNU-stack)
 *(.gnu_debuglink)
 *(.gnu.lto_*)
OUTPUT(mprime elf64-x86-64)
prime.o: In function `pnHttpServerCURL':
prime.c:(.text+0x15e48): undefined reference to `curl_easy_init'
prime.c:(.text+0x15e7d): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x15f1f): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x15f78): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x15f8a): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x15fa9): undefined reference to `curl_easy_setopt'
prime.o:prime.c:(.text+0x15fba): more undefined references to `curl_easy_setopt' follow
prime.o: In function `pnHttpServerCURL':
prime.c:(.text+0x16040): undefined reference to `curl_easy_perform'
prime.c:(.text+0x16078): undefined reference to `curl_easy_cleanup'
prime.c:(.text+0x1609c): undefined reference to `curl_easy_cleanup'
prime.c:(.text+0x16126): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x1613d): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x16177): undefined reference to `curl_easy_setopt'
prime.c:(.text+0x1618b): undefined reference to `curl_easy_setopt'
prime.o: In function `LoadPrimenet':
prime.c:(.text+0xec7a): undefined reference to `curl_global_init'
collect2: ld returned 1 exit status
make: *** [mprime] Error 1
The complete output of make is on pastebin here.

Ideas?

Note, if I use curl that comes with my distro, I get a different set of errors on the make step:
Code:
$ make
<<CUT>>
/libcrypto.a(cms_io.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(cms_dd.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(cms_cd.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bn_nist.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(ecp_smpl.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bio_ndef.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(asn_mime.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bn_kron.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bn_sqrt.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bio_b64.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(bio_asn1.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlopen.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlclose.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlsym.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlerror.o)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dladdr.o)
 .comment       0x0000000000000027       0x11 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(deflate.o)
                                         0x12 (size before relaxing)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(inflate.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(inftrees.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(trees.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(zutil.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(adler32.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(crc32.o)
 .comment       0x0000000000000000       0x12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libz.a(inffast.o)
 .comment       0x0000000000000000       0x28 /usr/lib/libc_nonshared.a(elf-init.oS)
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/crtend.o
 .comment       0x0000000000000000       0x28 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/crtn.o

.debug
 *(.debug)

.line
 *(.line)

.debug_srcinfo
 *(.debug_srcinfo .zdebug_srcinfo)

.debug_sfnames
 *(.debug_sfnames .zdebug_sfnames)

.debug_aranges
 *(.debug_aranges .zdebug_aranges)

.debug_pubnames
 *(.debug_pubnames .zdebug_pubnames)

.debug_info
 *(.debug_info .gnu.linkonce.wi.* .zdebug_info)

.debug_abbrev
 *(.debug_abbrev .zdebug_abbrev)

.debug_line
 *(.debug_line .zdebug_line)

.debug_frame
 *(.debug_frame .zdebug_frame)

.debug_str
 *(.debug_str .zdebug_str)

.debug_loc
 *(.debug_loc .zdebug_loc)

.debug_macinfo
 *(.debug_macinfo .zdebug_macinfo)

.debug_weaknames
 *(.debug_weaknames .zdebug_weaknames)

.debug_funcnames
 *(.debug_funcnames .zdebug_funcnames)

.debug_typenames
 *(.debug_typenames .zdebug_typenames)

.debug_varnames
 *(.debug_varnames .zdebug_varnames)

.debug_pubtypes
 *(.debug_pubtypes .zdebug_pubtypes)

.debug_ranges
 *(.debug_ranges .zdebug_ranges)

.gnu.attributes
 *(.gnu.attributes)

/DISCARD/
 *(.note.GNU-stack)
 *(.gnu_debuglink)
 *(.gnu.lto_*)
OUTPUT(mprime elf64-x86-64)
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x21): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlopen.o): In function `dlopen':
(.text+0x5): undefined reference to `__dlopen'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlclose.o): In function `dlclose':
(.text+0x1): undefined reference to `__dlclose'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlsym.o): In function `dlsym':
(.text+0x5): undefined reference to `__dlsym'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlerror.o): In function `dlerror':
(.text+0x1): undefined reference to `__dlerror'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dladdr.o): In function `dladdr':
(.text+0x1): undefined reference to `__dladdr'
collect2: ld returned 1 exit status
make: *** [mprime] Error 1

Last fiddled with by graysky on 2011-03-13 at 10:36 Reason: added bit
graysky is offline   Reply With Quote
Old 2011-03-13, 23:58   #6
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

7,013 Posts
Default

Did you do a "make install" of libcurl?

You'll probably need help from a Linux expert - I'm definitely not one.
Prime95 is offline   Reply With Quote
Old 2011-03-14, 07:00   #7
debrouxl
 
debrouxl's Avatar
 
Sep 2009

977 Posts
Default

Is it possible to build mprime using the system package(s) for libcurl ?
debrouxl is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling ggnfs on linux rmd Software 2 2015-11-08 15:38
compiling mprime ATH Software 9 2015-02-15 12:59
compiling ggnfs in Linux framontb Factoring 2 2013-09-13 02:58
msieve linux compiling Trevil Msieve 2 2009-12-06 19:49
compiling decomp under linux James Heinrich Data 2 2006-08-27 15:59

All times are UTC. The time now is 12:07.

Fri Aug 7 12:07:17 UTC 2020 up 21 days, 7:54, 1 user, load averages: 2.48, 2.48, 2.53

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.