Compiling method and mysql on OSX

John Ralls jralls at ceridwen.us
Wed Oct 9 22:57:20 EDT 2013


On Oct 9, 2013, at 6:28 PM, Benjamin Martens <bdmartens at gmail.com> wrote:

> Hi Derek (& John),
> 
> Thanks for your reply.  I've now compiled the libdbimysql.so file, placed it in the Applications/Gnucash.app/Contents/Resources/lib/dbd/ directory of the osx intel package installation, yet still am unable to see mysql as an option in the open menu.  Do you have any suggestions for where to look for troubleshooting this?  
> 
> 
> ---
> With respect to the actual compilation of the libdbimysql.so file and what had been going wrong before (as best as I can tell):
> 
> Unfortunately I am not familiar with any OSX compilers, and have only minimally kept up my coding / compiling skills for the past decade as I have been very busy in my very much unrelated work field.
> 
> Anyway,
> I did place the mysql libraries in the directories I mentioned, and looking back at the areas you snipped, the mysql.h was in the ...mysql-connector-c/include folder (mysql-connector-c is the package containing the c libraries for/from mysql).  
> 
> In fact, a line stated: 
> checking for MySQL support... yes: libs in /Users/macuser/gnucash-stable/mysql-connector-c/lib, headers in /Users/macuser/gnucash-stable/mysql-connector-c/include
> 
> It looks, though, that it is the dbd_mysql.c file that refers to a different location for the mysql.c file (mysql/mysql.c).  This dbd_mysql.c is part of the libdbi-drivers-0.8.3-1 package for gtk-osx, and looking at the dbd_mysql.c contents, on the referred line 54, it has "#include <mysql/mysql.h>  
> 
> I copied the mysql.c and mysql.h files from the mysql-connector-c/include & lib directories to the libi-drivers-0.8.3-1/mysql directory, and was successful at building the libdbdmysql.so file.  I placed it in the Gnucash.app/Contents/Resources/lib/dbd/ folder and installed it according to the quartz build document, with no errors displayed.

The most likely problem is that you didn't specify -arch i386 when you built libdbdmysql.so (shouldn't be libdbimysql). That specifies 32-bit, which I build because we're supporting older systems. An architecture mismatch will prevent the loadable module from loading.

The other thing to check is
  otool -L /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdmysql.so
examine the results and make sure that every dependency is on the specified path.
(If you put Gnucash.app somewhere else, adjust the path as needed.)

Regards,
John Ralls





More information about the gnucash-user mailing list