![]() |
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 [/CODE] /etc/odbc.ini [CODE][MySQL] Description = MySQL driver for Linux Driver = /usr/lib/odbc/libmyodbc.so Server = localhost Option = 3 [/CODE] /etc/odbcinst.ini [CODE][MySQL] Description = MySQL driver Driver = /usr/lib/odbc/libmyodbc.so Setup = /usr/lib/odbc/libodbcmyS.so Server = localhost Database = prpnet [/CODE] 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 [/CODE] 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 [/CODE] 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. |
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 [/CODE] 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 [url]http://bugs.mysql.com/bug.php?id=42993[/url]. 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. |
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. |
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.
|
[QUOTE=pinhodecarlos;351848]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.[/QUOTE]
There are readme.txt files in the server and client directories of my distribution. Start there. |
Why is llr64 not in the current 64 bit linux 7z file? :question:
|
[QUOTE=paulunderwood;351868]Why is llr64 not in the current 64 bit linux 7z file? :question:[/QUOTE]
To whom is that question directed? |
You, rogue. :smile:
|
[QUOTE=paulunderwood;351904]You, rogue. :smile:[/QUOTE]
I don't distribute PRPNet with llr/pfgw/genefer. You must be referring to a package put together by another entity, possibly PrimeGrid. |
Yes, it's PrimeGrid's. Thanks.
|
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 :smile:
Thanks to [B]amphoria[/B], his [URL="https://www.mersenneforum.org/showpost.php?p=349183&postcount=3"]advice[/URL] 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 [/CODE]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? |
| All times are UTC. The time now is 13:58. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.