![]() |
|
|
#1 |
|
"Alexander"
Nov 2008
The Alamo City
24·43 Posts |
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 |
|
|
|
|
|
#2 |
|
"Mark"
Apr 2003
Between here and the
11·577 Posts |
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.
|
|
|
|
|
|
#3 |
|
"Alexander"
Nov 2008
The Alamo City
24×43 Posts |
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'
Alexander |
|
|
|
|
|
#4 |
|
"Mark"
Apr 2003
Between here and the
143138 Posts |
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.
|
|
|
|
|
|
#5 |
|
"Alexander"
Nov 2008
The Alamo City
24×43 Posts |
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 |
|
|
|
|
|
#6 |
|
"Mark"
Apr 2003
Between here and the
634710 Posts |
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. |
|
|
|
|
|
#7 |
|
"Alexander"
Nov 2008
The Alamo City
24·43 Posts |
It works. Thanks.
Alexander |
|
|
|
|
|
#8 |
|
Nov 2009
2·52·7 Posts |
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 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. |
|
|
|
|
|
#9 | |
|
"Mark"
Apr 2003
Between here and the
11×577 Posts |
Quote:
|
|
|
|
|
![]() |
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 |