mersenneforum.org  

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

Reply
 
Thread Tools
Old 2012-04-25, 14:56   #1
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

24·43 Posts
Default PRPNet Build Errors on Linux

Hi. I've tried numerous times to build PRPNet on Linux, with no success. The error message says that it cannot be linked. Any solutions? Trying to use PRPNet 5.0.7 on Kubuntu 11.10 (soon to be 12.04) x64.

Alexander
Happy5214 is offline   Reply With Quote
Old 2012-04-25, 16:53   #2
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11·577 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
Hi. I've tried numerous times to build PRPNet on Linux, with no success. The error message says that it cannot be linked. Any solutions? Trying to use PRPNet 5.0.7 on Kubuntu 11.10 (soon to be 12.04) x64.
Are you trying to build the client or the server or both? If you only need the client, then use "make prpclient" instead of "make". If you need the server, i.e. "make prpserver", then you need iodbc or some other odbc library that work with MySQL or PostgreSQl. Please report the text from your failed build so that I know what library is missing.
rogue is offline   Reply With Quote
Old 2012-04-30, 22:07   #3
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

24×43 Posts
Default

I am trying to build both the server and client.

This is the error (all the rest has already been compiled, I assume):
Code:
makeobj[0]: Entering directory `/home/happy5214/rps/prpnet/source'
g++ -lpthread -o prpclient prpclient.o Log.o Socket.o ClientSocket.o  SharedMemoryItem.o  \
        WorkUnitTestFactory.o WorkUnitTest.o MainWorkUnitTest.o TwinWorkUnitTest.o SophieGermainWorkUnitTest.o WWWWWorkUnitTest.o PrimeWorkUnitTest.o TestingProgram.o TestingProgramFactory.o PFGWProgram.o LLRProgram.o PhrotProgram.o GeneferProgram.o WWWWProgram.o ServerHandler.o Worker.o PrimeWorker.o WWWWWorker.o
SharedMemoryItem.o: In function `SharedMemoryItem':
/home/happy5214/rps/prpnet/source/SharedMemoryItem.cpp:17: undefined reference to `pthread_mutexattr_init'
/home/happy5214/rps/prpnet/source/SharedMemoryItem.cpp:18: undefined reference to `pthread_mutexattr_settype'
collect2: ld returned 1 exit status
make: *** [prpclient] Error 1
makeobj[0]: Leaving directory `/home/happy5214/rps/prpnet/source'
Is there a package I need to install?

Alexander
Happy5214 is offline   Reply With Quote
Old 2012-04-30, 22:46   #4
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

143138 Posts
Default

I don't think so. I saw something about adding -ldl to the link. I also saw something about adding -lpthread at the end. I suggest you google (as I did) unless someone here has more information. There are a number of linux users here, so one of them might be able to help.
rogue is offline   Reply With Quote
Old 2012-05-10, 05:44   #5
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

24×43 Posts
Default

Well, I got it to compile. The trick was to move the link parameters to the end of the command. Also, I had to link with unixodbc, as installing iodbc again would pretty much destroy my environment. It actually worked.

I then proceeded to run the server. I was even able to add candidates via the admin. But, the server can't read the candidates from the database at all. Apparently, the server uses the ifnull SQL function. However, that is not in the standard, thus my DB server, PostgreSQL, doesn't include it. I can't use MySQL because the ODBC config interface doesn't recognize it. (The driver uses version 5.1, while a recent upgrade left me with server version 5.5.) Any solutions?

Alexander
Happy5214 is offline   Reply With Quote
Old 2012-05-10, 12:38   #6
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

634710 Posts
Default

Update the code to use "coalesce":

http://stackoverflow.com/questions/2...ent-for-isnull

If that works, I'll try to fix it in the next release.
rogue is offline   Reply With Quote
Old 2012-05-14, 14:15   #7
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

24·43 Posts
Thumbs up

It works. Thanks.

Alexander
Happy5214 is offline   Reply With Quote
Old 2012-05-18, 02:03   #8
Mathew
 
Mathew's Avatar
 
Nov 2009

2·52·7 Posts
Default

I have made changes to the makefile as Happy5214 stated:

Code:
CPP=g++ -I/usr/include -pthread -lodbc

CPPFLAGS=-c -O2 -Wall

# prpclient/prpadmin link flags
#LFLAGS_CLIENT=-lpthread -lstdc++ -o
LFLAGS_CLIENT=-o


# use this on most Unix systems for prpserver
#LFLAGS_SERVER=-lpthread -liodbc -lstdc++ -o
LFLAGS_SERVER=-o
I can now build a prpclient and a prpadmin. I keep getting errors for the prpserver.

I did the following:

make prpserver &> build_errors.txt

Attached is the makefile and build_errors.txt

Any advice would be greatly appreciated.

-----
This was done on xubuntu 12.04 64-bit version.
Attached Files
File Type: zip prpnet_buildinfo.zip (3.8 KB, 93 views)
Mathew is offline   Reply With Quote
Old 2012-05-18, 12:42   #9
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11×577 Posts
Default

Quote:
Originally Posted by Mathew View Post
I have made changes to the makefile as Happy5214 stated:

Code:
CPP=g++ -I/usr/include -pthread -lodbc

CPPFLAGS=-c -O2 -Wall

# prpclient/prpadmin link flags
#LFLAGS_CLIENT=-lpthread -lstdc++ -o
LFLAGS_CLIENT=-o


# use this on most Unix systems for prpserver
#LFLAGS_SERVER=-lpthread -liodbc -lstdc++ -o
LFLAGS_SERVER=-o
I can now build a prpclient and a prpadmin. I keep getting errors for the prpserver.
The LFLAGS you are using are incorrect. Why did you change them? Happy5214 needed different flags because he is using unixodbc instead of iodbc. What happens if you use the default LFLAGS (-lpthread -liodbc -lstdc++ -o)?
rogue is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring PRPNet ODBC on Linux amphoria Software 11 2020-01-14 14:23
[Patch] CPU affinity prompt problem in mprime Linux / OS X build Explorer09 Software 1 2017-03-01 02:34
Information about PRPNet Build Errors on Linux hangxanh Software 2 2014-10-24 16:22
PSP goes prpnet ltd Prime Sierpinski Project 86 2012-06-06 02:30
Linux build for LLRNet client available! axn Sierpinski/Riesel Base 5 9 2008-11-26 03:47

All times are UTC. The time now is 09:13.


Sat Jul 17 09:13:09 UTC 2021 up 50 days, 7 hrs, 1 user, load averages: 1.50, 1.71, 1.62

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.