Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-16 Thread James Brown via dbi-users



> On 16 Jan 2019, at 7:36 pm, [email protected] wrote:
> 
> On Wednesday 16 January 2019 17:59:07 James Brown via dbi-users wrote:
>>> On 16 Jan 2019, at 5:48 pm, Daniël van Eeden >> > wrote:
>>> 
>>> The --libs part of that looks wrong.
>>> I would expect something like "... -lmysqlclient -lssl -lcrypto”, not a -l 
>>> without library name.
>>> Not sure why that might be.
>> 
>> Thanks Daniël. To compile Dovecot to link against MySQL I had to use:
>> 
>> export CPPFLAGS="-I/usr/local/opt/[email protected]/include/mysql 
>> -I/usr/local/Cellar/[email protected]/1.1.1/include"
>> export LDFLAGS="-L/usr/local/opt/[email protected]/lib 
>> -L/usr/local/opt/[email protected]/lib"
>> 
>> ./configure --with-mysql --with-ssl=openssl
>> 
>> Would I have to do something like that?
> 
> Hi! After forking DBD::mysql to DBD::MariaDB, I fixed lot of problems
> with parsing output of mysql_config and finding include paths and
> libraries in Makefile.PL.
> 
> Makefile.PL in DBD::MariaDB accepts env variables DBD_MARIADB_CFLAGS
> DBD_MARIADB_LIBS and override output from mysql_config when env variable
> DBD_MARIADB_CONFIG is set to "skip".
> 
> Maybe something similar could work for DBD::mysql. But I do not know as
> Makefile.PL in DBD::mysql had lot of bugs... Maybe it helps you.

Thanks Pali.

Does anyone know how this could be done with DBD::mysql? 

Any other suggestions?

Thanks,

James.

Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-16 Thread pali
On Wednesday 16 January 2019 17:59:07 James Brown via dbi-users wrote:
> > On 16 Jan 2019, at 5:48 pm, Daniël van Eeden  > > wrote:
> > 
> > The --libs part of that looks wrong.
> > I would expect something like "... -lmysqlclient -lssl -lcrypto”, not a -l 
> > without library name.
> > Not sure why that might be.
> 
> Thanks Daniël. To compile Dovecot to link against MySQL I had to use:
> 
> export CPPFLAGS="-I/usr/local/opt/[email protected]/include/mysql 
> -I/usr/local/Cellar/[email protected]/1.1.1/include"
> export LDFLAGS="-L/usr/local/opt/[email protected]/lib 
> -L/usr/local/opt/[email protected]/lib"
> 
> ./configure --with-mysql --with-ssl=openssl
> 
> Would I have to do something like that?

Hi! After forking DBD::mysql to DBD::MariaDB, I fixed lot of problems
with parsing output of mysql_config and finding include paths and
libraries in Makefile.PL.

Makefile.PL in DBD::MariaDB accepts env variables DBD_MARIADB_CFLAGS
DBD_MARIADB_LIBS and override output from mysql_config when env variable
DBD_MARIADB_CONFIG is set to "skip".

Maybe something similar could work for DBD::mysql. But I do not know as
Makefile.PL in DBD::mysql had lot of bugs... Maybe it helps you.


Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-15 Thread James Brown via dbi-users


> On 16 Jan 2019, at 5:48 pm, Daniël van Eeden  > wrote:
> 
> The --libs part of that looks wrong.
> I would expect something like "... -lmysqlclient -lssl -lcrypto”, not a -l 
> without library name.
> Not sure why that might be.

Thanks Daniël. To compile Dovecot to link against MySQL I had to use:

export CPPFLAGS="-I/usr/local/opt/[email protected]/include/mysql 
-I/usr/local/Cellar/[email protected]/1.1.1/include"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib -L/usr/local/opt/[email protected]/lib"

./configure --with-mysql --with-ssl=openssl

Would I have to do something like that?

Looking at the archives, it looks like Rajeev Jain has same or similar issue on 
the previous version of macOS (you replied 8 hours ago).

Thanks,

James.

Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-15 Thread Daniël van Eeden

The --libs part of that looks wrong.
I would expect something like "... -lmysqlclient -lssl -lcrypto”, not a -l 
without library name.

Not sure why that might be.

On 16 January 2019 7:39:23 am James Brown via dbi-users 
 wrote:

Sure:

$ /usr/local/bin/mysql_config
Usage: /usr/local/bin/mysql_config [OPTIONS]
Options:
   --cflags [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
   --cxxflags   [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
   --include[-I/usr/local/Cellar/mysql-connector-c/6.1.11/include]
   --libs   [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
   --libs_r [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
   --plugindir  [/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]
   --socket [/tmp/mysql.sock]
   --port   [0]
   --version[6.1.11]
   --variable=VAR   VAR is one of:
   pkgincludedir 
[/usr/local/Cellar/mysql-connector-c/6.1.11/include]
   pkglibdir [/usr/local/Cellar/mysql-connector-c/6.1.11/lib]
   plugindir 
[/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]




Thanks,

James.


On 16 Jan 2019, at 5:31 pm, Daniël van Eeden  
wrote:


Can you share the output of mysql_config?

On 16 January 2019 07:27:39 James Brown via dbi-users  
wrote:

I have macOS Mojave and am not able to install DBD::mysql - can anyone help?

Perl, [email protected] and mysql-connector-c installed via Homebrew.


I get:


$ sudo /usr/local/bin/perl Makefile.PL
Password:


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 
's3kr1t';


You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

 cflags(mysql_config) = 
 -I/usr/local/Cellar/mysql-connector-c/6.1.11/include

 embedded  (guessed ) =
 ldflags   (guessed ) =
 libs  (mysql_config) = 
 -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l

 mysql_config  (guessed ) = mysql_config
 nocatchstderr (default ) = 0
 nofoundrows   (default ) = 0
 nossl (default ) = 0
 testdb(default ) = test
 testhost  (default ) =
 testpassword  (default ) =
 testport  (default ) =
 testsocket(default ) =
 testuser  (guessed ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...
Can't link/include C library '', aborting.


Any suggestions?


Thanks, James.




Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-15 Thread James Brown via dbi-users
Sure:

$ /usr/local/bin/mysql_config
Usage: /usr/local/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
--cxxflags   [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
--include[-I/usr/local/Cellar/mysql-connector-c/6.1.11/include]
--libs   [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
--libs_r [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
--plugindir  [/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]
--socket [/tmp/mysql.sock]
--port   [0]
--version[6.1.11]
--variable=VAR   VAR is one of:
pkgincludedir 
[/usr/local/Cellar/mysql-connector-c/6.1.11/include]
pkglibdir [/usr/local/Cellar/mysql-connector-c/6.1.11/lib]
plugindir 
[/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]


Thanks,

James.


> On 16 Jan 2019, at 5:31 pm, Daniël van Eeden  > wrote:
> 
> Can you share the output of mysql_config?
> 
> On 16 January 2019 07:27:39 James Brown via dbi-users  > wrote:
> 
>> I have macOS Mojave and am not able to install DBD::mysql - can anyone help? 
>> 
>> Perl, [email protected] and mysql-connector-c installed via Homebrew.
>> 
>> I get:
>> 
>> $ sudo /usr/local/bin/perl Makefile.PL
>> Password:
>> 
>> 
>> PLEASE NOTE:
>> 
>> For 'make test' to run properly, you must ensure that the
>> database user 'root' can connect to your MySQL server
>> and has the proper privileges that these tests require such
>> as 'drop table', 'create table', 'drop procedure', 'create procedure'
>> as well as others.
>> 
>> mysql> grant all privileges on test.* to 'root'@'localhost' identified by 
>> 's3kr1t';
>> 
>> You can also optionally set the user to run 'make test' with:
>> 
>> perl Makefile.PL --testuser=username
>> 
>> I will use the following settings for compiling and testing:
>> 
>>   cflags(mysql_config) = 
>> -I/usr/local/Cellar/mysql-connector-c/6.1.11/include
>>   embedded  (guessed ) = 
>>   ldflags   (guessed ) = 
>>   libs  (mysql_config) = 
>> -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l
>>   mysql_config  (guessed ) = mysql_config
>>   nocatchstderr (default ) = 0
>>   nofoundrows   (default ) = 0
>>   nossl (default ) = 0
>>   testdb(default ) = test
>>   testhost  (default ) = 
>>   testpassword  (default ) = 
>>   testport  (default ) = 
>>   testsocket(default ) = 
>>   testuser  (guessed ) = root
>> 
>> To change these settings, see 'perl Makefile.PL --help' and
>> 'perldoc DBD::mysql::INSTALL'.
>> 
>> Checking if libs are available for compiling...
>> Can't link/include C library '', aborting.
>> 
>> Any suggestions?
>> 
>> Thanks, James.
> 
> 



Re: macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-15 Thread Daniël van Eeden

Can you share the output of mysql_config?

On 16 January 2019 07:27:39 James Brown via dbi-users  
wrote:

I have macOS Mojave and am not able to install DBD::mysql - can anyone help?

Perl, [email protected] and mysql-connector-c installed via Homebrew.


I get:


$ sudo /usr/local/bin/perl Makefile.PL
Password:


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 
's3kr1t';


You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

 cflags(mysql_config) = 
 -I/usr/local/Cellar/mysql-connector-c/6.1.11/include

 embedded  (guessed ) =
 ldflags   (guessed ) =
 libs  (mysql_config) = 
 -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l

 mysql_config  (guessed ) = mysql_config
 nocatchstderr (default ) = 0
 nofoundrows   (default ) = 0
 nossl (default ) = 0
 testdb(default ) = test
 testhost  (default ) =
 testpassword  (default ) =
 testport  (default ) =
 testsocket(default ) =
 testuser  (guessed ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...
Can't link/include C library '', aborting.


Any suggestions?


Thanks, James.




macOS Mojave "Can't link/include C library ' ', aborting"

2019-01-15 Thread James Brown via dbi-users
I have macOS Mojave and am not able to install DBD::mysql - can anyone help? 

Perl, [email protected] and mysql-connector-c installed via Homebrew.

I get:

$ sudo /usr/local/bin/perl Makefile.PL
Password:


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 
's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

  cflags(mysql_config) = 
-I/usr/local/Cellar/mysql-connector-c/6.1.11/include
  embedded  (guessed ) = 
  ldflags   (guessed ) = 
  libs  (mysql_config) = 
-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  nossl (default ) = 0
  testdb(default ) = test
  testhost  (default ) = 
  testpassword  (default ) = 
  testport  (default ) = 
  testsocket(default ) = 
  testuser  (guessed ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...
Can't link/include C library '', aborting.

Any suggestions?

Thanks, James.