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

[email protected] (James Brown via dbi-users) Thu, 17 Jan 2019 10:11:20 +1100
Newsgroups perl.dbi.users
Message-ID <[email protected]>

> 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 <[email protected] <mailto:[email protected]>> 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.