mersenneforum.org  

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

Reply
 
Thread Tools
Old 2013-08-10, 18:54   #1
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2·19·73 Posts
Default Configuring PRPNet ODBC on Linux

I have been using prpnet on Ubuntu 10.04 for about 2 years now, lately with v5.0.8. I recently upgraded my hosted VM to Ubuntu 12.04, but the only way I could get prpnet to work was to copy various binaries (including some shared libraries) across from the 10.04 VM. The issues were mostly due to Ubuntu 12.04 deciding that the unixodbc and libiodbc packages could not be installed at the same time, but also I had compiling and linking problems with gcc 4.6.

Due to these issues with Ubuntu 12.04 I decided to explore switching to either Debian 6 or CentOS 6 - my hosted VM provider only offers limited number of Linux distributions. As I was having issues with getting ODBC to work on these distributions, I re-created the Ubuntu 10.04 setup in Virtualbox so that I has a working configuration to compare with. These are the configurations files from my Ubuntu 10.04 setup.

prpnet database.ini
Code:
driver=MySQL
server=localhost
port=3306
database=prpnet
user=xxxx
password=xxxx
/etc/odbc.ini
Code:
[MySQL]
Description = MySQL driver for Linux
Driver	    = /usr/lib/odbc/libmyodbc.so
Server      = localhost
Option      = 3
/etc/odbcinst.ini
Code:
[MySQL]
Description = MySQL driver
Driver = /usr/lib/odbc/libmyodbc.so
Setup = /usr/lib/odbc/libodbcmyS.so
Server = localhost
Database = prpnet
Although /etc/odbc.ini should be sufficient on its own, I got the same shared library error as with Debian below if I did not also have /etc/odbcinst.ini.

With exactly the same configuration files I get the following error message on Debian 6 when running prpserver.

Code:
[2013-08-10 13:03:07 BST] Connect to database failed: [iODBC][Driver Manager]{MySL}: cannot open shared object file: No such file or directory, native code=0
I checked the obvious things such as that I had specfied the correct name and location for libmyodbc.so and that the driver did not call any missing shared libraries using ldd.

With CentOS 6 and the same configuration files I get a slightly different error message when running prpserver.

Code:
[2013-08-10 13:06:29 BST] Connect to database failed: ð*ì§, native code=0
However, with CentOS the libmyodbc driver lives in /usr/lib64 so this may be a 32-bit vs 64-bit code issue. Note that all the distributions I am using are 64-bit.

Can anyone who has got this to work please post their ODBC configurations or suggest what I may be doing wrong. If you have a working configuration on Debian or CentOS even better, but any distribution might give me some things to try.

BTW I successfully connected to the prpnet database on Debian with isql and the DataManager application from the unixodbc package which would suggest that the libmyodbc setup does work.

Last fiddled with by amphoria on 2013-08-10 at 19:01 Reason: Added testing ODBC configuration on Debian
amphoria is offline   Reply With Quote
Old 2013-08-11, 18:17   #2
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

53268 Posts
Default

After a bit more investigation I may be zeroing in on the issue. Firstly I discovered that changing the entry in database.ini from driver= to dsn= made it use odbc.ini rather than odbcinst.ini. This kind of makes sense. But more importantly it got slighter further on in the prpnet code and I can now get a database connection error with both Debian and CentOS 6. The error on Debian is

Code:
[2013-08-11 18:59:18 BST] 2: ODBC Connection via a DSN.  DSN=MySQL, User=xxxx, Password=xxxx
[2013-08-11 18:59:18 BST] Connect to database failed: ˆ™ôoI, native code=2002
After a lot of false trails I final managed to google something referring to the native code = 2002 that looked as if it made sense. Basically the newer versions of mysql-connect-odbc are complied against unixodbc and that they expect the "W" ODBC functions to return a 2-char error code. However, iodbc apparently returns a 4-char unicode error code - this is probably the unreadable bit in the error message above. The full article can be found at http://bugs.mysql.com/bug.php?id=42993. Note that the Mac driver is the only one compiled against iodbc which would explain why Mark had not come against this issue.

The suggested solution is to recompile mysql-connector-odbc against iodbc rather than unixodbc, although I haven't has a chance to try this yet.
amphoria is offline   Reply With Quote
Old 2013-08-11, 20:33   #3
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

1010110101102 Posts
Default

I realised soon after my last post that there might be an even easier solution if it was possible to build prpnet with unixodbc rather than iodbc. I had never thought of this previously because I was unsure if there were any dependencies between the two.

Yes you can and it solves the problem I was getting. I now get a successful connection to the database with the myodbc driver that comes with Debian 6. To record what I did for any others that might be interested, you just need to install the unixodbc and unixodbc-dev packages rather than libiodbc2 and libiodbc2-dev packages. Then in the prpnet makefile you need to change -liodbc to -lodbc.
amphoria is offline   Reply With Quote
Old 2013-09-04, 11:32   #4
pinhodecarlos
 
pinhodecarlos's Avatar
 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK

22×1,187 Posts
Default

Can you make me a guide step by step on how to setup a prpserver and a prpclient under linux ubuntu? What files do I need, how do I add work, in which type of format is the work added in, etc.

Last fiddled with by pinhodecarlos on 2013-09-04 at 11:33
pinhodecarlos is offline   Reply With Quote
Old 2013-09-04, 12:52   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5,953 Posts
Default

Quote:
Originally Posted by pinhodecarlos View Post
Can you make me a guide step by step on how to setup a prpserver and a prpclient under linux ubuntu? What files do I need, how do I add work, in which type of format is the work added in, etc.
There are readme.txt files in the server and client directories of my distribution. Start there.
rogue is offline   Reply With Quote
Old 2013-09-04, 13:40   #6
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,449 Posts
Default

Why is llr64 not in the current 64 bit linux 7z file?

Last fiddled with by paulunderwood on 2013-09-04 at 13:41
paulunderwood is offline   Reply With Quote
Old 2013-09-04, 16:45   #7
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

10111010000012 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Why is llr64 not in the current 64 bit linux 7z file?
To whom is that question directed?
rogue is offline   Reply With Quote
Old 2013-09-04, 16:56   #8
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,449 Posts
Default

You, rogue.
paulunderwood is offline   Reply With Quote
Old 2013-09-04, 18:56   #9
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5,953 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
You, rogue.
I don't distribute PRPNet with llr/pfgw/genefer. You must be referring to a package put together by another entity, possibly PrimeGrid.
rogue is offline   Reply With Quote
Old 2013-09-04, 19:26   #10
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,449 Posts
Default

Yes, it's PrimeGrid's. Thanks.
paulunderwood is offline   Reply With Quote
Old 2020-01-14, 09:41   #11
unconnected
 
unconnected's Avatar
 
May 2009
Russia, Moscow

9BC16 Posts
Default

I've recently installed a newest version of prpserver and spent several hours figuring out why it could not connect to the database. Then I decided to search the forum and found this thread

Thanks to amphoria, his advice solved my problem.
Also, the applications did not compile with the error

Code:
/usr/bin/ld: LengthCalculator.o: undefined reference to symbol 'floor@@GLIBC_2.2.5'
//usr/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [prpserver] Error 1
until I added -lm option to the linker.

One more suggestion is to add prpadmin to the target all.
Does it worth adding these changes to the makefile?
unconnected is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring p-1 test lukerichards Software 1 2018-01-24 19:13
Information about PRPNet Build Errors on Linux hangxanh Software 2 2014-10-24 16:22
PRPNet Build Errors on Linux Happy5214 Software 8 2012-05-18 12:42
Any ODBC experts here? xilman Programming 30 2011-08-16 06:47
Question on configuring/compiling... WraithX GMP-ECM 5 2007-12-05 15:24

All times are UTC. The time now is 11:01.

Sat Oct 31 11:01:45 UTC 2020 up 51 days, 8:12, 2 users, load averages: 1.83, 2.19, 2.17

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.