[vtk-developers] VTK build for mysql on OSX

Darren Weber darren.weber.lists at gmail.com
Wed Aug 27 20:13:32 EDT 2008


It builds after I changed to the 32bit binary of mysql, in this case:

mysql-5.0.67-osx10.5-x86.dmg

I'm using an OSX Server platform, so there are a few tweaks to replacing the
native installation.  I forget where I found these notes, but this is the
essence of it:

Replace the default installation with a download package. Firstly use MySQL
AB binaries. Secondly make sure the path includes /usr/local/mysql/bin/
(added to /etc/paths). Next edit the Startup script to make sure it is
launching mysqld_safe from /usr/local/mysql/bin and not from /usr/bin/.
Finally, and this is the most important one... As root:

cd /usr/bin/
rm mysql*
rm myisam*
ln -s /usr/local/mysql/bin/mysql* .

ln -s /usr/local/mysql/bin/myisam* .

This is not only replacing the Apple Binaries with the MySQL binaries, it is
protecting you as you upgrade MySQL versions... Each time you upgrade MySQL
versions the symlink to /usr/local/mysql/bin/ will always point to the
current version of MySQL you are using.

The only thing you need to watch is from time to time Apple will update
their MySQL installs (snuck into a System Update), which will overwrite your
symlinks with new Apple Binaries (which is why the real fix it so make sure
you have the right path settings and replace the startup scripts, even if
Apple overwrites your symlinks, you'll still be calling your binaries).
Still, you should get in the habit of checking the files in /usr/bin/my*
each time you install a System update in case Apple has updated versions.

Best, Darren





On Wed, Aug 27, 2008 at 10:04 AM, Darren Weber <darren.weber.lists at gmail.com
> wrote:

>
> I want to build the VTK interface to MySQL on OSX (Leopard).  Is there a
> wiki on how to do this right?
>
> I have an error (below).  I'm using a cvs checkout with tag version
> VTK-5-2.  I have a binary install of MySQL that was packaged as
> mysql-5.0.67-osx10.5-x86_64.dmg, but this may be the wrong version or
> something for the VTK interface.  Here is the build (link) error:
>
> [ 40%] Building CXX object IO/CMakeFiles/vtkIO.dir/vtkIOInstantiator.o
> Linking CXX shared library ../bin/libvtkIO.dylib
> ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of
> required architecture
> Undefined symbols:
>   "_mysql_get_client_version", referenced from:
>       vtkMySQLDatabase::IsSupported(int)    in vtkMySQLDatabase.o
>   "_mysql_fetch_field", referenced from:
>       vtkMySQLDatabase::GetRecord(char const*)in vtkMySQLDatabase.o
>   "_mysql_real_escape_string", referenced from:
>       vtkMySQLQuery::EscapeString(vtkStdString, bool)   in vtkMySQLQuery.o
>   "_mysql_list_tables", referenced from:
>       vtkMySQLDatabase::GetTables()      in vtkMySQLDatabase.o
>   "_mysql_get_server_version", referenced from:
>       vtkMySQLDatabase::IsSupported(int)    in vtkMySQLDatabase.o
>   "_mysql_free_result", referenced from:
>       vtkMySQLDatabase::GetTables()      in vtkMySQLDatabase.o
>       vtkMySQLDatabase::GetRecord(char const*)in vtkMySQLDatabase.o
>       vtkMySQLQuery::Execute()      in vtkMySQLQuery.o
>       vtkMySQLQuery::~vtkMySQLQuery()in vtkMySQLQuery.o
>       vtkMySQLQuery::~vtkMySQLQuery()in vtkMySQLQuery.o
>   "_mysql_close", referenced from:
>       vtkMySQLDatabase::Close()      in vtkMySQLDatabase.o
>   "_mysql_fetch_row", referenced from:
>       vtkMySQLDatabase::GetTables()      in vtkMySQLDatabase.o
>       vtkMySQLQuery::NextRow()      in vtkMySQLQuery.o
>   "_mysql_num_fields", referenced from:
>       vtkMySQLQuery::GetNumberOfFields()       in vtkMySQLQuery.o
>   "_mysql_store_result", referenced from:
>       vtkMySQLQuery::Execute()      in vtkMySQLQuery.o
>   "_mysql_errno", referenced from:
>       vtkMySQLDatabase::HasError()      in vtkMySQLDatabase.o
>       vtkMySQLQuery::NextRow()      in vtkMySQLQuery.o
>   "_mysql_error", referenced from:
>       vtkMySQLDatabase::GetLastErrorText()       in vtkMySQLDatabase.o
>       vtkMySQLDatabase::Open()      in vtkMySQLDatabase.o
>       vtkMySQLDatabase::GetTables()      in vtkMySQLDatabase.o
>       vtkMySQLDatabase::GetRecord(char const*)in vtkMySQLDatabase.o
>       vtkMySQLQuery::Execute()      in vtkMySQLQuery.o
>       vtkMySQLQuery::NextRow()      in vtkMySQLQuery.o
>   "_mysql_data_seek", referenced from:
>       vtkMySQLDatabase::GetTables()      in vtkMySQLDatabase.o
>   "_mysql_list_fields", referenced from:
>       vtkMySQLDatabase::GetRecord(char const*)in vtkMySQLDatabase.o
>   "_mysql_init", referenced from:
>       vtkMySQLDatabase::vtkMySQLDatabase()in vtkMySQLDatabase.o
>   "_mysql_real_connect", referenced from:
>       vtkMySQLDatabase::Open()      in vtkMySQLDatabase.o
>   "_mysql_query", referenced from:
>       vtkMySQLQuery::Execute()      in vtkMySQLQuery.o
>   "_mysql_fetch_field_direct", referenced from:
>       vtkMySQLQuery::GetFieldName(int)    in vtkMySQLQuery.o
>       vtkMySQLQuery::GetFieldType(int)    in vtkMySQLQuery.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [bin/libvtkIO.5.2.0.dylib] Error 1
> make[1]: *** [IO/CMakeFiles/vtkIO.dir/all] Error 2
> make: *** [all] Error 2
> [ dweber at elegans ~/src/kitware/VTK_build ]$
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080827/f1cc66c7/attachment.html>


More information about the vtk-developers mailing list