Win64 compiling package from source: "sorry, unimplemented: 64 bit mode not compiled in" - mysql

Trying to install RMySQL on 64-bit Windows 7.
Using R-2.14.2 with Rtools214 and MySQL Server 5.5.
Read through several step-by-steps of RMySQL source installation.
Troubleshooting:
- Copied libmysql.dll to R-2.14.2/bin AND R-2.14.2/bin/i386.
- Copied libmysql.dll and libmysql.lib to MySQL Server 5.5\lib\opt.
- Entered MYSQL_HOME=C:\Program Files\MySQL\MySQL Server 5.5 into Renviron.site, saved to R\R-2.14.2\etc.
My instances of common problems:
Sys.getenv('MySQL_HOME')
[1] "C:\Program Files\MySQL\MySQL Server 5.5\"
install.packages('RMySQL', type = 'source')
Installing package(s) ...
...
RS-DBI.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
make: [RS-DBI.o] Error 1*
ERROR: compilation failed for package 'RMySQL'
...
I'm guessing my problem lies in the '64-bit mode...' message, but I'm not sure.
Thoughts?

I'm not sure this error message has anything to do with RMySQL, or any particular package.
On 64bit Windows, instead of the default PATH :
C:\Rtools\MinGW\bin
( gives the error sorry, unimplemented: 64-bit mode not compiled in )
you might (quite reasonably) notice the MinGW64 directory alongside and try :
C:\Rtools\MinGW64\bin
but in fact it needs to be :
C:\Rtools\gcc-4.6.3\bin
Then of course, stop and start a new DOS window to pick up the new PATH.

I had problems installing RMySQl
so I installed the package RODBC which works fine.
(make sure the MySQL driver is installed).
http://dev.mysql.com/downloads/connector/odbc/

Related

Compiling MySql plugin under Qt 5.14.2

i'am using a Windows x64, i need to use Mysql 8 in QT 5.14.2( MinGW x64)
i've started installing MySQl driver as indicated :
2- then when, I am using:
cd $QTDIR/qtbase/src/plugins/sqldrivers/mysql
3- and run:
qmake -- MYSQL_INCDIR="C:\Program Files\MySQL\MySQL Server 8.0\include" "MYSQL_LIBDIR="C:\Program Files\MySQL\MySQL Server 8.0\lib"
I'm getting :
Project ERROR: Library 'mysql' is not defined.
in the log file it shows me that there's a missing file sybfront.h anyone knows how to solve this please
You should replace '\' by '/', either paths will be invalid, even on Windows.
And one quote " is not closed in your code.
qmake parameters follows the same rules as pro file contents:
https://doc.qt.io/qt-5/qmake-project-files.html

Asterisk res_config_mysql module is missing

I have installed asterisk latest package and using mysql DB for realtime simulation. But in the CLI i am getting the error:
config.c:2444 find_engine: Realtime mapping for 'sippeers' found to engine 'mysql', but the engine is not available
and while executing command MODULE LOAD RES_CONFIG_MYSQL i am getting the following message.
loader.c:918 load_resource: Module 'RES_CONFIG_MYSQL' could not be loaded.
My machine is with linux mint 16. 64 bit.
If you have version <1.4 you have download asterisk-addons and compile it too
Otherwise you have do
make menuconfig
before make and select mysql addon

Qt - Trying mysql driver

I followed this tutorial to compile mysql driver with VS2010 :
Qt - How to get|compile Mysql driver.
The compilation fails with the error : LNK1123: failure during conversion to COFF: file invalid or corrupt
I tried with with multiple versions of mysql and qt, i always get the same error.
Note: I am using Qt-4.8.4 and mysql-5.5.32-win32.
I would rebuild Qt from source, because you also need the SQL driver (not only the plugin).
The driver source is located under /src/sql/drivers/mysql
The plugin source is located under /src/plugins/sqldrivers
/src/sql/drivers/mysqldrivers.pri contains this:
contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase
contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri)
So I think that you need to run configure with the options: -qt-sql-mysql and -plugin-sql-mysql before compiling Qt.
Recompile Qt
Open a Qt 4.8.4 Command Prompt
cd \qtdir
nmake distclean
configure -debug-and-release -platform win32-msvc2010 -mp -nomake examples -nomake demos -qt-sql-mysql -plugin-sql-mysql
nmake
You might need to point configure to the correct include/library directory for MySQL, by adding this options: -I "c:\path\to\mysql\include" and -L "c:\path\to\mysql\lib"

using 64bit mysql with R 32bit (64Bit Win7 )

RMySQL library works at R-64bit version.
but still it doesn't work with the 32bit R version
because I'm using statconn tools(DCOM, rcom) which only work with the 32 version R,
I need to access MySQL DB with R-32bit Version.
below are thing i've done till now.
install latest Rtools
install 64-bit MySQL Client( 32bit version doens't work)
C:\Program Files\R\R-2.12.1\etc\Renviron.site and add line like MYSQL_HOME=C:/mysql (path to your mysql files)
copy libmysql.lib to (mysql/lib/opt, R_HOME\bin, windows\system32)
install.packages('RMySQL',type='source')
set R_HOME, MYSQL_HOME to enviroment variables properly
add R_HOME, MYSQL_HOME, Rtools to path.
error messages :
RS-MySQL.o:RS-MySQL.c:(.text+0x2f23): undefined reference to `mysql_get_client_version#0'
RS-MySQL.o:RS-MySQL.c:(.text+0x2f44): undefined reference to `mysql_get_client_info#0'
RS-MySQL.o:RS-MySQL.c:(.text+0x2f71): undefined reference to `mysql_server_end#0'
collect2: ld returned 1 exit status
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Program Files/R/R-2.15.1/library/RMySQL'
how can i use 32bit R version with 64bit MySQL?
For your information.
"RODBC" library works with 64 bit R version, but 32 bit R version

Connect to mysql from node.js app, error: "dyld: lazy symbol binding failed: Symbol not found: _mysql_init"

I use OSX 10.6.8 and MySQL from XAMPP.
When I run this node.js app (app.js):
var mysql = require('mysql-libmysqlclient');
var conn = mysql.createConnectionSync();
conn.connectSync('127.0.0.1', 'root', '', 'database_name');
I see this output:
Airs0urce:nodejs airs0urce$ node app.js
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Applications/XAMPP/xamppfiles/htdocs/myproject/nodejs/node_modules/mysql-libmysqlclient/build/Release/mysql_bindings.node
Expected in: dynamic lookup
dyld: Symbol not found: _mysql_init
Referenced from: /Applications/XAMPP/xamppfiles/htdocs/myproject/nodejs/node_modules/mysql-libmysqlclient/build/Release/mysql_bindings.node
Expected in: dynamic lookup
Trace/BPT trap
Already tried couple solutions after googling.
Added mysql libs from XAMPP directory to include path this way:
export DYLD_LIBRARY_PATH=/Applications/XAMPP/xamppfiles/lib/mysql:$DYLD_LIBRARY_PATH
tried to install mysql5-devel using MacPorts, but no luck, building failed:
Airs0urce:~ airs0urce$ sudo port install mysql5-devel
---> Computing dependencies for mysql5-devel
---> Building mysql5-devel
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for mysql5-devel is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_mysql5-devel/mysql5-devel/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
There is log file if you want to see: http://dl.dropbox.com/u/1875424/main.log
This is because of a config issue on Mac OS X Lion (10.7): lib/libmysqlclient.18.dylib (mysql 5.5 and above).
Step 1:
Make sure you set the path in ~/.profile
export ARCHFLAGS=-arch x86_64
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
Step 2:
I am using rvm so, I used the following command:
rvmsudo ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config --with-opt-lib=/usr/local/mysql/lib
which has solved the issues with rails application on Mac lion and mysql x86_64.
I futzed around with this for a ton of time including setting the DVLD library path and copying the library into /usr/lib.
sudo cp /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib
Heck, anything to get it working. Finally I tried clearing the default for 64 vs 32 bit and it worked!
defaults delete com.apple.versioner.perl
Not sure if my perl is 64 or 32 bit, but my db is 64 bit and just using the default default seems to work better ;-)