mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2016-01-27, 21:28   #1
EmbeddedSteve
 
Jan 2016

210 Posts
Default building mprime issue on FedoraCore22

Greetings,
I got a copy of the P95v287 release (source code) to build mprime to be used in a diagnostics manner (i.e. stressing the CPU).
Host system is FedoraCore 22 running in Virtual Box on a 2014 vintage MacBook Pro. The hose CPU is i7 Quad-Core. The Host GCC is 5.3.1.
Initial issues were the lack of curl - which I added, including the curl-devel.
The build of the gwnum.a library was successful, I have the ~ 34.5MB output.
Then, in the Linux64 directory, I run the "make" and get the following error:

/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
makefile:31: recipe for target 'mprime' failed
make: *** [mprime] Error 1

The prime.o and menu.o get build, but the loader/linker can't find the libcurl, which is here:

[sbeckwith@sdb-mbp-vm lib64]$ ls -l libcurl*
lrwxrwxrwx. 1 root root 18 Jan 26 2015 libcurlpp.so -> libcurlpp.so.0.0.2
lrwxrwxrwx. 1 root root 18 Jan 26 2015 libcurlpp.so.0 -> libcurlpp.so.0.0.2
-rwxr-xr-x. 1 root root 123360 Jan 26 2015 libcurlpp.so.0.0.2
lrwxrwxrwx. 1 root root 16 Sep 18 12:45 libcurl.so -> libcurl.so.4.3.0
lrwxrwxrwx. 1 root root 16 Sep 18 12:45 libcurl.so.4 -> libcurl.so.4.3.0
-rwxr-xr-x. 1 root root 489200 Sep 18 12:45 libcurl.so.4.3.0

this is in /usr/lib64. Doing an export on LD_LIBRARY_PATH to point to /usr/lib64 doesn't help, same error.
Any suggestions as to why this doesn't work "out of the box"?
Thanks!
EmbeddedSteve is offline   Reply With Quote
Old 2016-01-27, 22:06   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×53×71 Posts
Default

Quote:
Originally Posted by EmbeddedSteve View Post
Any suggestions as to why this doesn't work "out of the box"?
Thanks!
It doesn't work because I know very little about Linux and makefiles.

Try this suggestion (from the 32-bit linux makefile):

# NOTES: libcurl built by downloading latest sources and:
# ./configure --without-ssl --without-libssh2 --without-libidn --disable-ldap --disable-ldaps --without-gssapi --enable-ipv6 --without-krb4
# make
# make install

Linux gurus here might give you more helpful advice
Prime95 is offline   Reply With Quote
Old 2016-01-28, 02:28   #3
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Quote:
Originally Posted by EmbeddedSteve View Post
Greetings,
I got a copy of the P95v287 release (source code) to build mprime to be used in a diagnostics manner (i.e. stressing the CPU).
Host system is FedoraCore 22 running in Virtual Box on a 2014 vintage MacBook Pro. The hose CPU is i7 Quad-Core. The Host GCC is 5.3.1.
Initial issues were the lack of curl - which I added, including the curl-devel.
The build of the gwnum.a library was successful, I have the ~ 34.5MB output.
Then, in the Linux64 directory, I run the "make" and get the following error:

/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
makefile:31: recipe for target 'mprime' failed
make: *** [mprime] Error 1

The prime.o and menu.o get build, but the loader/linker can't find the libcurl, which is here:

[sbeckwith@sdb-mbp-vm lib64]$ ls -l libcurl*
lrwxrwxrwx. 1 root root 18 Jan 26 2015 libcurlpp.so -> libcurlpp.so.0.0.2
lrwxrwxrwx. 1 root root 18 Jan 26 2015 libcurlpp.so.0 -> libcurlpp.so.0.0.2
-rwxr-xr-x. 1 root root 123360 Jan 26 2015 libcurlpp.so.0.0.2
lrwxrwxrwx. 1 root root 16 Sep 18 12:45 libcurl.so -> libcurl.so.4.3.0
lrwxrwxrwx. 1 root root 16 Sep 18 12:45 libcurl.so.4 -> libcurl.so.4.3.0
-rwxr-xr-x. 1 root root 489200 Sep 18 12:45 libcurl.so.4.3.0

this is in /usr/lib64. Doing an export on LD_LIBRARY_PATH to point to /usr/lib64 doesn't help, same error.
Any suggestions as to why this doesn't work "out of the box"?
Thanks!
Ok, libcurl.a is needed (as written in the Makefile). I've seen this issue before (as I've built, modified, rebuilt, ... mprime).
Two ways to solve it:
1. Either remove mentions of static from makefile (and get a dynamic dep on libcurl.so which is not a problem if you are just going to use it on one comp)
Code:
LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl
2. Or get curl source and build the static lib, then go back to building mprime statically linked binary. (It might be faster, and will be more portable from a comp to a comp)
Batalov is offline   Reply With Quote
Old 2016-01-28, 14:24   #4
EmbeddedSteve
 
Jan 2016

28 Posts
Default

@Batalov @Prime95:
Thanks for the suggestions. Removing the -Wl options worked, but this ended up with an mprime with "many" libraries, which won't be on the target system (it's an embedded box). So, following both your suggestions to build curl from scratch, I built the same version as in the FC22 release (7.40) and that worked OK (got the libcurl.a). Back to the original linux64/makefile setup with the -Wl options and it threw an error missing zlib in curl. Adding the "-lz" to the LIBS worked (I have zlib on the host) and we're good to go! Cuts down from 36 libraries to 10, which is ~ what the 1.32 version we currently use has. Thanks for the Assist! ! ! !
EmbeddedSteve is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help building GMP for prime95 29.3 Prime95 Linux 16 2017-08-29 18:02
Issue with Broadwell-E and mprime? Akujik Information & Answers 14 2016-08-05 09:16
Help building new computer Prime95 Hardware 30 2009-09-12 05:58
Building gcc 4.4.0 CRGreathouse Software 1 2009-07-07 22:25
Building on Linux? FenwayFrank Software 4 2002-10-20 21:59

All times are UTC. The time now is 08:28.


Sat Jul 17 08:28:56 UTC 2021 up 50 days, 6:16, 1 user, load averages: 2.45, 1.77, 1.58

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.