mersenneforum.org Configuring PRPNet ODBC on Linux
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 2013-08-10, 18:54 #1 amphoria     "Dave" Sep 2005 UK 2×19×73 Posts 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
 2013-08-11, 18:17 #2 amphoria     "Dave" Sep 2005 UK 2×19×73 Posts 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.
 2013-08-11, 20:33 #3 amphoria     "Dave" Sep 2005 UK 2×19×73 Posts 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.
 2013-09-04, 11:32 #4 pinhodecarlos     "Carlos Pinho" Oct 2011 Milton Keynes, UK 3×37×43 Posts 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
2013-09-04, 12:52   #5
rogue

"Mark"
Apr 2003
Between here and the

32·23·29 Posts

Quote:
 Originally Posted by pinhodecarlos 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.

 2013-09-04, 13:40 #6 paulunderwood     Sep 2002 Database er0rr 23×19×23 Posts Why is llr64 not in the current 64 bit linux 7z file? Last fiddled with by paulunderwood on 2013-09-04 at 13:41
2013-09-04, 16:45   #7
rogue

"Mark"
Apr 2003
Between here and the

32·23·29 Posts

Quote:
 Originally Posted by paulunderwood Why is llr64 not in the current 64 bit linux 7z file?
To whom is that question directed?

 2013-09-04, 16:56 #8 paulunderwood     Sep 2002 Database er0rr 1101101010002 Posts You, rogue.
2013-09-04, 18:56   #9
rogue

"Mark"
Apr 2003
Between here and the

32×23×29 Posts

Quote:
 Originally Posted by paulunderwood 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.

 2013-09-04, 19:26 #10 paulunderwood     Sep 2002 Database er0rr 23·19·23 Posts Yes, it's PrimeGrid's. Thanks.
 2020-01-14, 09:41 #11 unconnected     May 2009 Russia, Moscow 250610 Posts 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?

 Similar Threads Thread Thread Starter Forum Replies Last Post lukerichards Software 1 2018-01-24 19:13 hangxanh Software 2 2014-10-24 16:22 Happy5214 Software 8 2012-05-18 12:42 xilman Programming 30 2011-08-16 06:47 WraithX GMP-ECM 5 2007-12-05 15:24

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

Thu Nov 26 07:41:35 UTC 2020 up 77 days, 4:52, 3 users, load averages: 1.04, 1.35, 1.38

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.