M
Martin Kissner
Hello together,
this time I am not going txpo post a Question but a solution to a - as
far as I know common - problem.
Installation of DBD-mysql has been a problem on Mac OS X 10.3 and still
is on Mac OS X 10.4.
As far as I have experienced at least one problem is that mysql_config
does not provide correct settings for cflags and libs directories, which
actually is an error of mysql and not of Perl.
It can be solved by editing "/usr/local/mysql/bin/mysql_config" and
changing the following lines:
pkglibdir='/usr/local/mysql/lib/mysql'
to
pkglibdir='/usr/local/mysql/lib/'
and
pkgincludedir='/usr/local/mysql/include/mysql'
to
pkgincludedir='/usr/local/mysql/include/'
It is also possible to leave mysql_config alone and to call "perl
Makefile.PL" as follows (all in one line and with a space before the
second and thid line), but I prefere the first method:
perl Makefile.PL --cflags="-I/usr/local/mysql/include/
-fno-omit-frame-pointer" --libs="-L/usr/local/mysql/lib/ -lmysqlclient
-lz -lm"
I have tested both methods on Mac OS X 10.4 and hope that this will be
useful to others.
Best regards
Martin
this time I am not going txpo post a Question but a solution to a - as
far as I know common - problem.
Installation of DBD-mysql has been a problem on Mac OS X 10.3 and still
is on Mac OS X 10.4.
As far as I have experienced at least one problem is that mysql_config
does not provide correct settings for cflags and libs directories, which
actually is an error of mysql and not of Perl.
It can be solved by editing "/usr/local/mysql/bin/mysql_config" and
changing the following lines:
pkglibdir='/usr/local/mysql/lib/mysql'
to
pkglibdir='/usr/local/mysql/lib/'
and
pkgincludedir='/usr/local/mysql/include/mysql'
to
pkgincludedir='/usr/local/mysql/include/'
It is also possible to leave mysql_config alone and to call "perl
Makefile.PL" as follows (all in one line and with a space before the
second and thid line), but I prefere the first method:
perl Makefile.PL --cflags="-I/usr/local/mysql/include/
-fno-omit-frame-pointer" --libs="-L/usr/local/mysql/lib/ -lmysqlclient
-lz -lm"
I have tested both methods on Mac OS X 10.4 and hope that this will be
useful to others.
Best regards
Martin