<div dir="ltr">hi,<br><br>I have installed built perl 5.20 using perlbrew and gcc-4.8.1. <br><br>
# perl -v<br><br>This is perl 5, version 20, subversion 0 (v5.20.0) built for i86pc-solaris-thread-multi-<div>64int<br>
<br>I am using database/mysql-56 from the uulm.mawi repository, which keeps 
its libraries/include files in /usr/local/mysql/5.6/{lib/include} .<br><br></div><div>For an application (RT) I want to use the mysql driver and I tried installing it throuch cpanm.<br><br></div>Then cpanm failed because it could not find the path to mysql_config. No problem, I can set it:<br>

<br><div>=============================================<br># perl Makefile.PL --mysql_config=/usr/local/mysql/5.6/bin/mysql_config --cflags="-m32"     <br>
<br><br>PLEASE NOTE:<br><br>For 'make test' to run properly, you must ensure that the<br>database user '' can connect to your MySQL server<br>and has the proper privileges that these tests require such<br>


as 'drop table', 'create table', 'drop procedure', 'create procedure'<br>as well as others.<br><br>mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';<br>


<br>You can also optionally set the user to run 'make test' with:<br><br>perl Makefile.PL --testuser=username<br><br>I will use the following settings for compiling and testing:<br><br>  cflags        (User's choice) = -m32<br>


  embedded      (mysql_config ) = <br>  ldflags       (mysql_config ) = -R/usr/local/mysql/5.6/lib<br>  libs          (mysql_config ) = -L/usr/local/mysql/5.6/lib -lmysqlclient -lsocket -lnsl -lm -lssl -lcrypto<br>  mysql_config  (Users choice ) = /usr/local/mysql/5.6/bin/mysql_config<br>


  nocatchstderr (default      ) = 0<br>  nofoundrows   (default      ) = 0<br>  ssl           (guessed      ) = 1<br>  testdb        (default      ) = test<br>  testhost      (default      ) = <br>  testpassword  (default      ) = <br>


  testport      (default      ) = <br>  testsocket    (default      ) = <br>  testuser      (guessed      ) = <br><br>To change these settings, see 'perl Makefile.PL --help' and<br>'perldoc DBD::mysql::INSTALL'.<br>


<br>Using DBI 1.631 (for perl 5.020000 on i86pc-solaris-thread-multi-64int) installed in /opt/perl5//perls/perl-5.20.0/lib/site_perl/5.20.0/i86pc-solaris-thread-multi-64int/auto/DBI/<br>Generating a Unix-style Makefile<br>


Writing Makefile for DBD::mysql<br>Writing MYMETA.yml and MYMETA.json<br><br>=========================================================================================<br><br></div>But then make fails:<br><br><div>===========================================================<br>

# make<br>Skip blib/lib/DBD/mysql/INSTALL.pod (unchanged)<br>Skip blib/lib/DBD/<a href="http://mysql.pm" target="_blank">mysql.pm</a> (unchanged)<br>Skip blib/lib/Bundle/DBD/<a href="http://mysql.pm" target="_blank">mysql.pm</a> (unchanged)<br>

Skip blib/lib/DBD/README.pod (unchanged)<br>
Skip blib/lib/DBD/mysql/GetInfo.pm (unchanged)<br>Running Mkbootstrap for DBD::mysql ()<br>chmod 644 <a href="http://mysql.bs" target="_blank">mysql.bs</a><br>gcc -c  -I/opt/perl5/perls/perl-5.20.0/lib/site_perl/5.20.0/i86pc-solaris-thread-multi-64int/auto/DBI
 -m32 -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  
-D_REENTRANT -DPTR_IS_LONG -fno-stack-protector -fwrapv 
-fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-DPERL_USE_SAFE_PUTENV -O   -DVERSION=\"4.027\" -DXS_VERSION=\"4.027\" 
-fPIC "-I/opt/perl5/perls/perl-5.20.0/lib/5.20.0/i86pc-solaris-thread-multi-64int/CORE"   dbdimp.c<br>
In file included from dbdimp.c:20:0:<br>dbdimp.h:21:49: fatal error: mysql.h: No such file or directory<br> #include <mysql.h>  /* Comes with MySQL-devel */<br>                                                 ^<br>

compilation terminated.<br>
make: *** [dbdimp.o] Error 1<br><br>=====================================================================================================<br><br></div>so it cannot find the header. But it is there, this is what mysql_config tells me:<br>


<br># ./mysql_config<br>Usage: ./mysql_config [OPTIONS]<br>Options:<br>        --cflags         [-I/usr/local/mysql/5.6/<div dir="ltr">include  -m64  -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing]<br>

        --cxxflags       [-I/usr/local/mysql/5.6/include  -m64  -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing]<br>
        --include        [-I/usr/local/mysql/5.6/include]<br>        --libs           [-L/usr/local/mysql/5.6/lib -R/usr/local/mysql/5.6/lib -lmysqlclient -lsocket -lnsl -lm -lssl -lcrypto]<br>       
 --libs_r         [-L/usr/local/mysql/5.6/lib -R/usr/local/mysql/5.6/lib
 -lmysqlclient_r -lsocket -lnsl -lm -lssl -lcrypto]<br>
        --plugindir      [/usr/local/mysql/5.6/lib/plugin]<br>        --socket         [/var/mysql/5.6/run/mysqld.socket]<br>        --port           [0]<br>        --version        [5.6.17]<br>        --libmysqld-libs [-L/usr/local/mysql/5.6/lib -R/usr/local/mysql/5.6/lib -lmysqld -lnsl -lm -lssl -lcrypto -lsocket]<br>


        --variable=VAR   VAR is one of:<br>                pkgincludedir [/usr/local/mysql/5.6/include]<br>                pkglibdir     [/usr/local/mysql/5.6/lib]<br>                plugindir     [/usr/local/mysql/5.6/lib/plugin]<br>


<br>And if I look in the include dir, sure there it is:<br><br>root@zone1:/usr/local/mysql/5.6/bin# ls -l ../include/mysql.h<br>-rw-r--r-- 1 root bin 29058 Jun 15 16:56 ../include/mysql.h<br><div><div><div><br></div><div>


Not really sure how to build this. Any tips greatly appreciated.<br></div><div><br></div><div>Thanks.<br clear="all"></div><div><div><div><div><div><div><div>--<br>Groeten,<br>natxo</div></div></div></div></div></div></div>

</div></div></div><div><br></div>
</div>