DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

compiling fails with mariadb-10.0.14-winx64 on windows 7 (64) [rt.cpan.org #100898]

Open mbeijen opened this issue 8 years ago • 0 comments
trafficstars

Migrated from rt.cpan.org#100898 (status was 'open')

Requestors:

Attachments:

From [email protected] on 2014-12-13 17:23:39:

[MSG] [Sat Dec 13 11:36:15 2014] Trying to get
'ftp://ftp.cpan.org/pub/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.029.tar.gz'
[MSG] [Sat Dec 13 11:36:23 2014] Trying to get
'ftp://ftp.cpan.org/pub/CPAN/authors/id/C/CA/CAPTTOFU/CHECKSUMS'
[MSG] [Sat Dec 13 11:36:25 2014] Checksum matches for 'DBD-mysql-4.029.tar.gz'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/proc_example3.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/eg/prepare_memory_usage.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/bug14979.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/eg/proc_example2b.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/eg/proc_example2a.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/bigint_quotes.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/bug30033pg.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/bug21028.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/proc_example4.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/proc_example1.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/decimal_test.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/proc_example2.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/issue21946.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/eg/bug30033.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/myld'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/dbdimp.c'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/DBD/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/DBD/mysql.pm'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/DBD/mysql/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/lib/DBD/mysql/INSTALL.pod'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/lib/DBD/mysql/GetInfo.pm'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/Bundle/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/lib/Bundle/DBD/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/lib/Bundle/DBD/mysql.pm'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/META.yml'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/ChangeLog'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/rt91715.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/rt83494-quotes-comments.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/40server_prepare_error.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/rt86153-reconnect-fail-memory.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/rt25389-bin-case.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40nulls.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/manifest.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40listfields.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/76multi_statement.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/52comment.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/25lockunlock.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/rt50304-column_info_parentheses.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/91errcheck.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/89async-method-check.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/88async-multi-stmts.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/55utf8.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/75supported_sql.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/00base.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/70takeimp.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/53comment.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/32insert_error.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/99_bug_server_prepare_blob_null.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40bindparam.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/mysql.mtest'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/60leaks.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/10connect.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/40server_prepare.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/86_bug_36972.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40bindparam2.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40keyinfo.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40blobs.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40numrows.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/31insertid.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/35limit.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/50commit.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/43count_params.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/85init_command.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/mysql.dbtest'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/30insertfetch.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/29warnings.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/90no-async.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40nulls_prepare.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/65segfault.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/65types.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40catalog.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/71impdata.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/80procs.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/rt85919-fetch-lost-connection.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/41bindparam.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/pod.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/87async.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/81procs.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/t/51bind_type_guessing.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/15reconnect.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/lib.pl'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/40types.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/20createdrop.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/50chopblanks.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/41blobs_prepare.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/35prepare.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/05dbcreate.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/t/42bindparam.t'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/MANIFEST'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/Makefile.PL'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/README.pod'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/constants.h'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/mysql.xs'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/TODO'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/MANIFEST.SKIP'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD-mysql-4.029/dbdimp.h'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted
'DBD-mysql-4.029/Makefile.PL.embedded'
[MSG] [Sat Dec 13 11:36:30 2014] Extracted 'DBD::mysql' to
'C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029'
[MSG] [Sat Dec 13 11:36:40 2014]

mysql_config.pl, and an associated bat file, has been

successfully created under

   C:\soft\mariadb\bin



Unknown option: testdb

Unknown option: testhost

Unknown option: testuser





PLEASE NOTE:



For 'make test' to run properly, you must ensure that the

database user '' 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 ''@'localhost' identified by 's3kr1t';



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



perl Makefile.PL --testuser=username



Unknown option: testpassword

Unknown option: testsocket

Unknown option: testport

Unknown option: nocatchstderr

Unknown option: ssl

Unknown option: nofoundrows

Unknown option: force-embedded

I will use the following settings for compiling and testing:



  cflags        (mysql_config) = -I"C:\soft\mariadb\include\mysql"

  embedded      (mysql_config) =

  ldflags       (mysql_config) =

  libs          (mysql_config) = -LC:\soft\mariadb\lib\opt -lmysql -lzlib

  mysql_config  (guessed     ) = mysql_config

  nocatchstderr (default     ) = 0

  nofoundrows   (default     ) = 0

  ssl           (guessed     ) = 0

  testdb        (default     ) = test

  testhost      (default     ) =

  testpassword  (default     ) =

  testport      (default     ) =

  testsocket    (default     ) =

  testuser      (guessed     ) =



To change these settings, see 'perl Makefile.PL --help' and

'perldoc DBD::mysql::INSTALL'.



Checking if your kit is complete...

Warning: the following files are missing in your kit:

    META.json

Please inform the author.

Have \soft\perl\lib

Want \soft\perl-5~1.1\lib

Your perl and your Config.pm seem to have different ideas about the

architecture they are running on.

Perl thinks: [lib]

Config says: [MSWin32-x64-multi-thread]

This may or may not cause problems. Please check your installation of perl

if you have problems building this extension.

Warning (mostly harmless): No library found for -lmysql

Warning (mostly harmless): No library found for -lzlib

Warning (mostly harmless): No library found for -lmoldname

Warning (mostly harmless): No library found for -lkernel32

Warning (mostly harmless): No library found for -luser32

Warning (mostly harmless): No library found for -lgdi32

Warning (mostly harmless): No library found for -lwinspool

Warning (mostly harmless): No library found for -lcomdlg32

Warning (mostly harmless): No library found for -ladvapi32

Warning (mostly harmless): No library found for -lshell32

Warning (mostly harmless): No library found for -lole32

Warning (mostly harmless): No library found for -loleaut32

Warning (mostly harmless): No library found for -lnetapi32

Warning (mostly harmless): No library found for -luuid

Warning (mostly harmless): No library found for -lws2_32

Warning (mostly harmless): No library found for -lmpr

Warning (mostly harmless): No library found for -lwinmm

Warning (mostly harmless): No library found for -lversion

Warning (mostly harmless): No library found for -lodbc32

Warning (mostly harmless): No library found for -lodbccp32

Warning (mostly harmless): No library found for -lcomctl32

Using DBI 1.632 (for perl 5.020001 on MSWin32-x64-multi-thread)
installed in G:/soft/perl/site/lib/auto/DBI/

Generating a dmake-style Makefile

Writing Makefile for DBD::mysql

Writing MYMETA.yml and MYMETA.json


[MSG] [Sat Dec 13 11:36:40 2014] DEFAULT 'filter_prereqs' HANDLER
RETURNING 'sub return value'
[ERROR] [Sat Dec 13 11:37:03 2014] MAKE failed: No such file or
directory cp lib/DBD/mysql/GetInfo.pm blib\lib\DBD\mysql\GetInfo.pm

cp README.pod blib\lib\DBD\README.pod

cp lib/DBD/mysql/INSTALL.pod blib\lib\DBD\mysql\INSTALL.pod

cp lib/DBD/mysql.pm blib\lib\DBD\mysql.pm

cp lib/Bundle/DBD/mysql.pm blib\lib\Bundle\DBD\mysql.pm

Running Mkbootstrap for DBD::mysql ()
"G:\soft\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "mysql.bs"

gcc -c  -IG:\soft\perl\site\lib\auto\DBI
-I"C:\soft\mariadb\include\mysql" -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv
-fno-strict-aliasing -mms-bitfields -s -O2       -DVERSION=\"4.029\"
  -DXS_VERSION=\"4.029\"  "-IG:\soft\perl-5.20.1\lib\CORE"   dbdimp.c

dbdimp.c: In function 'mysql_db_disconnect':

dbdimp.c:2237:17: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                 (long) imp_dbh->pmysql);

                 ^

In file included from
G:/soft/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/mm_malloc.h:27:0,

                 from
G:/soft/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/xmmintrin.h:34,

                 from
G:/soft/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/x86intrin.h:31,

                 from G:/soft/mingw64/x86_64-w64-mingw32/include/winnt.h:1495,

                 from
G:/soft/mingw64/x86_64-w64-mingw32/include/minwindef.h:146,

                 from G:/soft/mingw64/x86_64-w64-mingw32/include/windef.h:8,

                 from G:/soft/mingw64/x86_64-w64-mingw32/include/windows.h:69,

                 from dbdimp.c:16:

dbdimp.c: In function 'mysql_st_internal_execute':

dbdimp.c:3222:7: warning: '_errno' redeclared without dllimport
attribute after being referenced with dll linkage

   int errno;

       ^

dbdimp.c: In function 'mysql_st_execute':

dbdimp.c:3551:41: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

       " -> dbd_st_execute for %08lx\n", (u_long) sth);

                                         ^

dbdimp.c: In function 'mysql_st_fetch':

dbdimp.c:3847:19: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                   (u_long) sth, ChopBlanks);

                   ^

dbdimp.c:4015:71: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

       PerlIO_printf(DBIc_LOGPIO(imp_xxh),
"\timp_sth->result=%08lx\n",(long unsigned int) imp_sth->result);

                                                                       ^

dbdimp.c:4023:21: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                     (u_long) sth,imp_sth->currow);

                     ^

dbdimp.c: In function 'mysql_st_STORE_attrib':

dbdimp.c:4332:19: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                   (u_long) sth, key);

                   ^

dbdimp.c:4342:19: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                   (u_long) sth, retval);

                   ^

dbdimp.c: In function 'mysql_st_FETCH_attrib':

dbdimp.c:4541:19: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

                   (u_long) sth, key);

                   ^

"G:\soft\perl\bin\perl.exe" -p -e "s/~DRIVER~/mysql/g"
G:\soft\perl\site\lib\auto\DBI\Driver.xst > mysql.xsi

"G:\soft\perl\bin\perl.exe" "G:\soft\perl\lib\ExtUtils\xsubpp"
-typemap "G:\soft\perl-5.20.1\lib\ExtUtils\typemap"  mysql.xs >
mysql.xsc && "G:\soft\perl\bin\perl.exe" -MExtUtils::Command -e mv --
mysql.xsc mysql.c

Warning: duplicate function definition 'do' detected in mysql.xs, line 242

Warning: duplicate function definition 'rows' detected in mysql.xs, line 754

gcc -c  -IG:\soft\perl\site\lib\auto\DBI
-I"C:\soft\mariadb\include\mysql" -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv
-fno-strict-aliasing -mms-bitfields -s -O2       -DVERSION=\"4.029\"
  -DXS_VERSION=\"4.029\"  "-IG:\soft\perl-5.20.1\lib\CORE"   mysql.c

"G:\soft\perl\bin\perl.exe" -MExtUtils::Mksymlists \

     -e "Mksymlists('NAME'=>\"DBD::mysql\", 'DLBASE' => 'mysql',
'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' =>
[]);"

dlltool --def mysql.def --output-exp dll.exp

"G:\soft\perl\bin\perl.exe" myld g++ -o
blib\arch\auto\DBD\mysql\mysql.dll -Wl,--base-file -Wl,dll.base -mdll
-s -L"g:\soft\perl-5.20.1\lib\CORE" -L"G:\soft\mingw64\lib" dbdimp.o
  mysql.o   "G:\soft\perl-5.20.1\lib\CORE\libperl520.a" -lmoldname
-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32
-lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion
-lodbc32 -lodbccp32 -lcomctl32 dll.exp

dbdimp.o: In function `mysql_dr_connect':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1663:
undefined reference to `mysql_init'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1934:
undefined reference to `mysql_real_connect'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1715:
undefined reference to `mysql_options'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1851:
undefined reference to `mysql_options'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1922:
undefined reference to `mysql_options'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1726:
undefined reference to `mysql_options'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1747:
undefined reference to `mysql_options'

dbdimp.o:C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:1737:
more undefined references to `mysql_options' follow

dbdimp.o: In function `mysql_db_login':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2120:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2120:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2120:
undefined reference to `mysql_errno'

dbdimp.o: In function `mysql_db_commit':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2165:
undefined reference to `mysql_commit'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2168:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2168:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2168:
undefined reference to `mysql_errno'

dbdimp.o: In function `mysql_db_rollback':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2195:
undefined reference to `mysql_rollback'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2198:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2198:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2198:
undefined reference to `mysql_errno'

dbdimp.o: In function `mysql_db_disconnect':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2238:
undefined reference to `mysql_close'

dbdimp.o: In function `dbd_discon_all':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2289:
undefined reference to `mysql_server_end'

dbdimp.o: In function `mysql_db_destroy':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2332:
undefined reference to `mysql_rollback'

dbdimp.o: In function `mysql_db_STORE_attrib':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2389:
undefined reference to `mysql_autocommit'

dbdimp.o: In function `mysql_db_FETCH_attrib':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2562:
undefined reference to `mysql_get_client_version'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2620:
undefined reference to `mysql_insert_id'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2669:
undefined reference to `mysql_warning_count'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2630:
undefined reference to `mysql_get_proto_info'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2664:
undefined reference to `mysql_thread_id'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2606:
undefined reference to `mysql_get_host_info'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2567:
undefined reference to `mysql_errno'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2615:
undefined reference to `mysql_info'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2556:
undefined reference to `mysql_get_client_info'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2635:
undefined reference to `mysql_get_server_info'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2571:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2640:
undefined reference to `mysql_get_server_version'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2654:
undefined reference to `mysql_stat'

dbdimp.o: In function `mysql_st_free_result_sets':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3008:
undefined reference to `mysql_free_result'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3011:
undefined reference to `mysql_next_result'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2991:
undefined reference to `mysql_use_result'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2994:
undefined reference to `mysql_field_count'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2997:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3000:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3000:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3000:
undefined reference to `mysql_errno'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3016:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3019:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3019:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3019:
undefined reference to `mysql_errno'

dbdimp.o: In function `mysql_st_prepare':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2850:
undefined reference to `mysql_stmt_init'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2862:
undefined reference to `mysql_stmt_prepare'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2873:
undefined reference to `mysql_stmt_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2873:
undefined reference to `mysql_stmt_errno'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2880:
undefined reference to `mysql_stmt_errno'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2899:
undefined reference to `mysql_stmt_param_count'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2889:
undefined reference to `mysql_sqlstate'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2889:
undefined reference to `mysql_stmt_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2889:
undefined reference to `mysql_stmt_errno'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2892:
undefined reference to `mysql_stmt_close'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2855:
undefined reference to `mysql_error'

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:2855:
undefined reference to `mysql_errno'

dbdimp.o: In function `mysql_st_next_results':

C:\Users\val\AppData\Roaming\.cpanplus\5.20.1\build\DBD-mysql-4.029/dbdimp.c:3065:
undefined reference to `mysql_more_results'

C:\Users\val\AppData\Roaming\.cpanplus
[MSG] [Sat Dec 13 11:37:04 2014] Not sending test report - external
libraries not pre-installed
[ERROR] [Sat Dec 13 11:37:04 2014] Unable to create a new distribution
object for 'DBD::mysql' -- cannot continue

From [email protected] on 2016-11-20 12:47:26:

On Sob Dec 13 12:23:39 2014, [email protected] wrote:
> Warning (mostly harmless): No library found for -lmysql

It means that you did not installed mysql library and header files. Without it DBD::mysql cannot be compiled.

From [email protected] on 2016-11-20 19:27:35:

But it is installed:

C:\Users\val>mysql_config
Usage: C:\soft\mariadb\bin\mysql_config.pl [OPTIONS]
Options:
        --cflags         ["-IC:\soft\mariadb/include/mysql"]
        --include        ["-IC:\soft\mariadb/include/mysql"]
        --libs           ["C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib"]
        --libs_r         ["C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib" "-lmysqlclient  ws2_32 IPHLPAPI  "]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [10.1.19]
        --libmysqld-libs ["C:\soft\mariadb/lib/mysqlserver.lib" "wsock32.lib" "advapi32.lib" "user32.lib" "-lmysqlclient  ws2_32 IPHLPAPI  "]

this is unpacked mariadb-10.1.19-winx64.zip and I believe it has all required headers and libs

though 4.039 is still failing.  'libs' somehow is empty in the attached log
libs          (mysql_config) = 

From [email protected] on 2016-11-20 20:07:20:

On Ned Nov 20 14:27:35 2016, VAL wrote:
> But it is installed:
> 
> C:\Users\val>mysql_config
> Usage: C:\soft\mariadb\bin\mysql_config.pl [OPTIONS]
> Options:
>         --cflags         ["-IC:\soft\mariadb/include/mysql"]
>         --include        ["-IC:\soft\mariadb/include/mysql"]
>         --libs           ["C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib"]
>         --libs_r         ["C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib" "-lmysqlclient  ws2_32 IPHLPAPI  "]
>         --socket         [/tmp/mysql.sock]
>         --port           [0]
>         --version        [10.1.19]
>         --libmysqld-libs ["C:\soft\mariadb/lib/mysqlserver.lib" "wsock32.lib" "advapi32.lib" "user32.lib" "-lmysqlclient  ws2_32 IPHLPAPI  "]
> 
> this is unpacked mariadb-10.1.19-winx64.zip and I believe it has all
> required headers and libs
> 
> though 4.039 is still failing.  'libs' somehow is empty in the
> attached log
>  libs          (mysql_config) =

Hmm... In log I see:

>  cflags        (mysql_config) = "-IC:\soft\mariadb/include/mysql"
>
>  embedded      (mysql_config) = 
>
>  ldflags       (guessed     ) = "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib"
>
>  libs          (mysql_config) = 

It means that either Makefile.PL incorrectly parsed mysql_config output, or mysql_config output is in some wrong format. Please provide output from commands:

mysql_config --libs

mysql_config --cflags

mysql_config --include

As a quick looks it looks like that Makefile.PL expect that library param starts with -l or -L. In above case with absolute paths it looks like that libraries are without hyphen l/L. Can you try attached patch?

From [email protected] on 2016-11-20 20:23:04:

I was blaming Makefile.PL too.

C:\Users\val>mysql_config --libs
"C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib"

C:\Users\val>mysql_config --cflags
"-IC:\soft\mariadb/include/mysql"

C:\Users\val>mysql_config --include
"-IC:\soft\mariadb/include/mysql"

Applied patch.  
perl Makefile.PL > p_m_stdout 2> p_m_sderr
# output in attached files

dmake.exe > d_stdout 2> d_stderr
# output in attached files


before I was trying similar approach with adding -l / -L for the in the line you changed.  No luck

From [email protected] on 2016-11-20 20:46:03:

On Ned Nov 20 15:23:04 2016, VAL wrote:
> I was blaming Makefile.PL too.
> 
> C:\Users\val>mysql_config --libs
> "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib" "user32.lib"

First one is OK, it is file specified with full path without any leading hyphen. gcc and gnu linker can handle it.

But I doubt that other 3 files can be located properly with gcc or gnu linker, as it can search for libraries only with -l param (in this case without "lib" prefix and ".lib" or ".a" suffix).

Which compiler and linker are you using for compiling DBD::mysql?

> C:\Users\val>mysql_config --cflags
> "-IC:\soft\mariadb/include/mysql"
> 
> C:\Users\val>mysql_config --include
> "-IC:\soft\mariadb/include/mysql"

Those are OK.

> Applied patch.
> perl Makefile.PL > p_m_stdout 2> p_m_sderr
> # output in attached files
> 
> dmake.exe > d_stdout 2> d_stderr
> # output in attached files
> 
> 
> before I was trying similar approach with adding -l / -L for the in
> the line you changed.  No luck

Looks like my patch really fix problem with determinating if output from mysql_config --libs is library (either specified by -l syntax or by full path) or ordinary flag. Now there are problems with undefined references to internal windows symbols which are probably in those not found libraries...

If you want to compile DBD::mysql I would suggest you to manually play with "perl Makefile.PL --libs=...". And specify all needed libs (ideally with full path). Maybe you need to link against some other windows libraries... But I do not know, I do not use windows system.

From [email protected] on 2016-11-20 21:58:59:

On Sun Nov 20 15:46:03 2016, PALI wrote:
> On Ned Nov 20 15:23:04 2016, VAL wrote:
> > I was blaming Makefile.PL too.
> >
> > C:\Users\val>mysql_config --libs
> > "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib"
> > "user32.lib"
> 
> First one is OK, it is file specified with full path without any
> leading hyphen. gcc and gnu linker can handle it.
> 
> But I doubt that other 3 files can be located properly with gcc or gnu
> linker, as it can search for libraries only with -l param (in this
> case without "lib" prefix and ".lib" or ".a" suffix).

Found
G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a 
G:\soft\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a 
G:\soft\mingw64\x86_64-w64-mingw32\lib\libuser32.a


> Which compiler and linker are you using for compiling DBD::mysql?

x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z

> Looks like my patch really fix problem with determinating if output
> from mysql_config --libs is library (either specified by -l syntax or
> by full path) or ordinary flag. Now there are problems with undefined
> references to internal windows symbols which are probably in those not
> found libraries...
 
> If you want to compile DBD::mysql I would suggest you to manually play
> with "perl Makefile.PL --libs=...". And specify all needed libs
> (ideally with full path). Maybe you need to link against some other
> windows libraries... But I do not know, I do not use windows system.

What's the syntax for few args for --libs? 
--libs="c:/full/path/lib1" --libs="c:/another/lib2" 
or
--libs="c:/full/path/lib1 c:/another/lib2" ?

is there a way to define few paths to lib dirs and provide to --libs only filenames (without common path)?

I'm just surprised that with same perl, build system it's possible to compile DBD::mysql against mysql, but not mariadb.  And even mysql_config.pl in mariadb needs small fix to get it working at all (in sub get_full_path).

Thanks for your help.

From [email protected] on 2016-11-20 22:13:29:

On Ned Nov 20 16:58:59 2016, VAL wrote:
> On Sun Nov 20 15:46:03 2016, PALI wrote:
> > On Ned Nov 20 15:23:04 2016, VAL wrote:
> > > I was blaming Makefile.PL too.
> > >
> > > C:\Users\val>mysql_config --libs
> > > "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib" "advapi32.lib"
> > > "user32.lib"
> >
> > First one is OK, it is file specified with full path without any
> > leading hyphen. gcc and gnu linker can handle it.
> >
> > But I doubt that other 3 files can be located properly with gcc or
> > gnu
> > linker, as it can search for libraries only with -l param (in this
> > case without "lib" prefix and ".lib" or ".a" suffix).
> 
> Found
>  G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
>  G:\soft\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a
> G:\soft\mingw64\x86_64-w64-mingw32\lib\libuser32.a
> 
> 
> > Which compiler and linker are you using for compiling DBD::mysql?
> 
> x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z

So you are using gcc from 64bit mingw. In this case make sure that your libmysqlclient is also 64bit!

> > Looks like my patch really fix problem with determinating if output
> > from mysql_config --libs is library (either specified by -l syntax or
> > by full path) or ordinary flag. Now there are problems with undefined
> > references to internal windows symbols which are probably in those
> > not
> > found libraries...
> 
> > If you want to compile DBD::mysql I would suggest you to manually
> > play
> > with "perl Makefile.PL --libs=...". And specify all needed libs
> > (ideally with full path). Maybe you need to link against some other
> > windows libraries... But I do not know, I do not use windows system.
> 
> What's the syntax for few args for --libs?
> --libs="c:/full/path/lib1" --libs="c:/another/lib2"
> or
> --libs="c:/full/path/lib1 c:/another/lib2" ?
> 
> is there a way to define few paths to lib dirs and provide to --libs
> only filenames (without common path)?

IIRC syntax is space separated arguments passed to gcc when linking. When specifying more libs do not forget to properly quote (and espace) params which is needed on windows.

If you have a library with full path G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a then you can tell gcc to use it as:

-LG:\soft\mingw64\x86_64-w64-mingw32\lib -lwsock32

or

G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a

(maybe backslash needs to be escaped... \ will probably be \\, but I'm not sure)

libsomething.a is specified by -lsomething

If you have more libraries in some path, then you just need to specify -Lpath only once.

try: --libs="\"C:\\soft\\mariadb/lib/mysqlclient.lib\" -L\"G:\\soft\\mingw64\\x86_64-w64-mingw32\\lib\" "-lwsock32" "-ladvapi32" "-luser32"

(and play with escaping with \ and quoting with ")

> I'm just surprised that with same perl, build system it's possible to
> compile DBD::mysql against mysql, but not mariadb.  And even
> mysql_config.pl in mariadb needs small fix to get it working at all
> (in sub get_full_path).

If you have exactly same build system, then problem is only in mysql_config application. That one (which comes from either mysql or mariadb) is responsible for telling DBD::mysql where to find libmysqlclient and which flags needs to be passed to compiler and linker. Maybe you should report this problem to mariadb if with mysql you do not have any problem.

From [email protected] on 2017-01-18 14:16:07:

On Sun Nov 20 17:13:29 2016, PALI wrote:
> On Ned Nov 20 16:58:59 2016, VAL wrote:
> > On Sun Nov 20 15:46:03 2016, PALI wrote:
> > > On Ned Nov 20 15:23:04 2016, VAL wrote:
> > > > I was blaming Makefile.PL too.
> > > >
> > > > C:\Users\val>mysql_config --libs
> > > > "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib"
> > > > "advapi32.lib"
> > > > "user32.lib"
> > >
> > > First one is OK, it is file specified with full path without any
> > > leading hyphen. gcc and gnu linker can handle it.
> > >
> > > But I doubt that other 3 files can be located properly with gcc or
> > > gnu
> > > linker, as it can search for libraries only with -l param (in this
> > > case without "lib" prefix and ".lib" or ".a" suffix).
> >
> > Found
> >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a
> > G:\soft\mingw64\x86_64-w64-mingw32\lib\libuser32.a
> >
> >
> > > Which compiler and linker are you using for compiling DBD::mysql?
> >
> > x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z
> 
> So you are using gcc from 64bit mingw. In this case make sure that
> your libmysqlclient is also 64bit!
> 
> > > Looks like my patch really fix problem with determinating if output
> > > from mysql_config --libs is library (either specified by -l syntax
> > > or
> > > by full path) or ordinary flag. Now there are problems with
> > > undefined
> > > references to internal windows symbols which are probably in those
> > > not
> > > found libraries...
> >
> > > If you want to compile DBD::mysql I would suggest you to manually
> > > play
> > > with "perl Makefile.PL --libs=...". And specify all needed libs
> > > (ideally with full path). Maybe you need to link against some other
> > > windows libraries... But I do not know, I do not use windows
> > > system.
> >
> > What's the syntax for few args for --libs?
> > --libs="c:/full/path/lib1" --libs="c:/another/lib2"
> > or
> > --libs="c:/full/path/lib1 c:/another/lib2" ?
> >
> > is there a way to define few paths to lib dirs and provide to --libs
> > only filenames (without common path)?
> 
> IIRC syntax is space separated arguments passed to gcc when linking.
> When specifying more libs do not forget to properly quote (and espace)
> params which is needed on windows.
> 
> If you have a library with full path G:\soft\mingw64\x86_64-w64-
> mingw32\lib\libwsock32.a then you can tell gcc to use it as:
> 
> -LG:\soft\mingw64\x86_64-w64-mingw32\lib -lwsock32
> 
> or
> 
> G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> 
> (maybe backslash needs to be escaped... \ will probably be \\, but I'm
> not sure)
> 
> libsomething.a is specified by -lsomething
> 
> If you have more libraries in some path, then you just need to specify
> -Lpath only once.
> 
> try: --libs="\"C:\\soft\\mariadb/lib/mysqlclient.lib\"
> -L\"G:\\soft\\mingw64\\x86_64-w64-mingw32\\lib\" "-lwsock32" "-
> ladvapi32" "-luser32"
> 
> (and play with escaping with \ and quoting with ")
> 
> > I'm just surprised that with same perl, build system it's possible to
> > compile DBD::mysql against mysql, but not mariadb.  And even
> > mysql_config.pl in mariadb needs small fix to get it working at all
> > (in sub get_full_path).
> 
> If you have exactly same build system, then problem is only in
> mysql_config application. That one (which comes from either mysql or
> mariadb) is responsible for telling DBD::mysql where to find
> libmysqlclient and which flags needs to be passed to compiler and
> linker. Maybe you should report this problem to mariadb if with mysql
> you do not have any problem.

Hi! Have you resolved this building problem?

Or are there any others?

From [email protected] on 2017-01-24 05:56:34:

On Wed Jan 18 09:16:07 2017, PALI wrote:
> On Sun Nov 20 17:13:29 2016, PALI wrote:
> > On Ned Nov 20 16:58:59 2016, VAL wrote:
> > > On Sun Nov 20 15:46:03 2016, PALI wrote:
> > > > On Ned Nov 20 15:23:04 2016, VAL wrote:
> > > > > I was blaming Makefile.PL too.
> > > > >
> > > > > C:\Users\val>mysql_config --libs
> > > > > "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib"
> > > > > "advapi32.lib"
> > > > > "user32.lib"
> > > >
> > > > First one is OK, it is file specified with full path without any
> > > > leading hyphen. gcc and gnu linker can handle it.
> > > >
> > > > But I doubt that other 3 files can be located properly with gcc or
> > > > gnu
> > > > linker, as it can search for libraries only with -l param (in this
> > > > case without "lib" prefix and ".lib" or ".a" suffix).
> > >
> > > Found
> > >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> > >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a
> > > G:\soft\mingw64\x86_64-w64-mingw32\lib\libuser32.a
> > >
> > >
> > > > Which compiler and linker are you using for compiling DBD::mysql?
> > >
> > > x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z
> > 
> > So you are using gcc from 64bit mingw. In this case make sure that
> > your libmysqlclient is also 64bit!
> > 
> > > > Looks like my patch really fix problem with determinating if output
> > > > from mysql_config --libs is library (either specified by -l syntax
> > > > or
> > > > by full path) or ordinary flag. Now there are problems with
> > > > undefined
> > > > references to internal windows symbols which are probably in those
> > > > not
> > > > found libraries...
> > >
> > > > If you want to compile DBD::mysql I would suggest you to manually
> > > > play
> > > > with "perl Makefile.PL --libs=...". And specify all needed libs
> > > > (ideally with full path). Maybe you need to link against some other
> > > > windows libraries... But I do not know, I do not use windows
> > > > system.
> > >
> > > What's the syntax for few args for --libs?
> > > --libs="c:/full/path/lib1" --libs="c:/another/lib2"
> > > or
> > > --libs="c:/full/path/lib1 c:/another/lib2" ?
> > >
> > > is there a way to define few paths to lib dirs and provide to --libs
> > > only filenames (without common path)?
> > 
> > IIRC syntax is space separated arguments passed to gcc when linking.
> > When specifying more libs do not forget to properly quote (and espace)
> > params which is needed on windows.
> > 
> > If you have a library with full path G:\soft\mingw64\x86_64-w64-
> > mingw32\lib\libwsock32.a then you can tell gcc to use it as:
> > 
> > -LG:\soft\mingw64\x86_64-w64-mingw32\lib -lwsock32
> > 
> > or
> > 
> > G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> > 
> > (maybe backslash needs to be escaped... \ will probably be \\, but I'm
> > not sure)
> > 
> > libsomething.a is specified by -lsomething
> > 
> > If you have more libraries in some path, then you just need to specify
> > -Lpath only once.
> > 
> > try: --libs="\"C:\\soft\\mariadb/lib/mysqlclient.lib\"
> > -L\"G:\\soft\\mingw64\\x86_64-w64-mingw32\\lib\" "-lwsock32" "-
> > ladvapi32" "-luser32"
> > 
> > (and play with escaping with \ and quoting with ")
> > 
> > > I'm just surprised that with same perl, build system it's possible to
> > > compile DBD::mysql against mysql, but not mariadb.  And even
> > > mysql_config.pl in mariadb needs small fix to get it working at all
> > > (in sub get_full_path).
> > 
> > If you have exactly same build system, then problem is only in
> > mysql_config application. That one (which comes from either mysql or
> > mariadb) is responsible for telling DBD::mysql where to find
> > libmysqlclient and which flags needs to be passed to compiler and
> > linker. Maybe you should report this problem to mariadb if with mysql
> > you do not have any problem.
> 
> Hi! Have you resolved this building problem?
> 
> Or are there any others?

No, I have not. :-(  I'd appreciate if Strawberry perl folks could share their way of getting this module working with MariaDB.

From [email protected] on 2017-01-26 14:26:12:

On Tue Jan 24 00:56:34 2017, VAL wrote:
> On Wed Jan 18 09:16:07 2017, PALI wrote:
> > On Sun Nov 20 17:13:29 2016, PALI wrote:
> > > On Ned Nov 20 16:58:59 2016, VAL wrote:
> > > > On Sun Nov 20 15:46:03 2016, PALI wrote:
> > > > > On Ned Nov 20 15:23:04 2016, VAL wrote:
> > > > > > I was blaming Makefile.PL too.
> > > > > >
> > > > > > C:\Users\val>mysql_config --libs
> > > > > > "C:\soft\mariadb/lib/mysqlclient.lib" "wsock32.lib"
> > > > > > "advapi32.lib"
> > > > > > "user32.lib"
> > > > >
> > > > > First one is OK, it is file specified with full path without
> > > > > any
> > > > > leading hyphen. gcc and gnu linker can handle it.
> > > > >
> > > > > But I doubt that other 3 files can be located properly with gcc
> > > > > or
> > > > > gnu
> > > > > linker, as it can search for libraries only with -l param (in
> > > > > this
> > > > > case without "lib" prefix and ".lib" or ".a" suffix).
> > > >
> > > > Found
> > > >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> > > >  G:\soft\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a
> > > > G:\soft\mingw64\x86_64-w64-mingw32\lib\libuser32.a
> > > >
> > > >
> > > > > Which compiler and linker are you using for compiling
> > > > > DBD::mysql?
> > > >
> > > > x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z
> > >
> > > So you are using gcc from 64bit mingw. In this case make sure that
> > > your libmysqlclient is also 64bit!
> > >
> > > > > Looks like my patch really fix problem with determinating if
> > > > > output
> > > > > from mysql_config --libs is library (either specified by -l
> > > > > syntax
> > > > > or
> > > > > by full path) or ordinary flag. Now there are problems with
> > > > > undefined
> > > > > references to internal windows symbols which are probably in
> > > > > those
> > > > > not
> > > > > found libraries...
> > > >
> > > > > If you want to compile DBD::mysql I would suggest you to
> > > > > manually
> > > > > play
> > > > > with "perl Makefile.PL --libs=...". And specify all needed libs
> > > > > (ideally with full path). Maybe you need to link against some
> > > > > other
> > > > > windows libraries... But I do not know, I do not use windows
> > > > > system.
> > > >
> > > > What's the syntax for few args for --libs?
> > > > --libs="c:/full/path/lib1" --libs="c:/another/lib2"
> > > > or
> > > > --libs="c:/full/path/lib1 c:/another/lib2" ?
> > > >
> > > > is there a way to define few paths to lib dirs and provide to
> > > > --libs
> > > > only filenames (without common path)?
> > >
> > > IIRC syntax is space separated arguments passed to gcc when
> > > linking.
> > > When specifying more libs do not forget to properly quote (and
> > > espace)
> > > params which is needed on windows.
> > >
> > > If you have a library with full path G:\soft\mingw64\x86_64-w64-
> > > mingw32\lib\libwsock32.a then you can tell gcc to use it as:
> > >
> > > -LG:\soft\mingw64\x86_64-w64-mingw32\lib -lwsock32
> > >
> > > or
> > >
> > > G:\soft\mingw64\x86_64-w64-mingw32\lib\libwsock32.a
> > >
> > > (maybe backslash needs to be escaped... \ will probably be \\, but
> > > I'm
> > > not sure)
> > >
> > > libsomething.a is specified by -lsomething
> > >
> > > If you have more libraries in some path, then you just need to
> > > specify
> > > -Lpath only once.
> > >
> > > try: --libs="\"C:\\soft\\mariadb/lib/mysqlclient.lib\"
> > > -L\"G:\\soft\\mingw64\\x86_64-w64-mingw32\\lib\" "-lwsock32" "-
> > > ladvapi32" "-luser32"
> > >
> > > (and play with escaping with \ and quoting with ")
> > >
> > > > I'm just surprised that with same perl, build system it's
> > > > possible to
> > > > compile DBD::mysql against mysql, but not mariadb.  And even
> > > > mysql_config.pl in mariadb needs small fix to get it working at
> > > > all
> > > > (in sub get_full_path).
> > >
> > > If you have exactly same build system, then problem is only in
> > > mysql_config application. That one (which comes from either mysql
> > > or
> > > mariadb) is responsible for telling DBD::mysql where to find
> > > libmysqlclient and which flags needs to be passed to compiler and
> > > linker. Maybe you should report this problem to mariadb if with
> > > mysql
> > > you do not have any problem.
> >
> > Hi! Have you resolved this building problem?
> >
> > Or are there any others?
> 
> No, I have not. :-(  I'd appreciate if Strawberry perl folks could
> share their way of getting this module working with MariaDB.

Currently MariaDB 10.2.2 and newer have bug in mysql_config which cause that DBD::mysql cannot be compiled with those MariaDB versions.

Michiel already reported this bug in MariaDB bug tracker:
https://jira.mariadb.org/browse/MDEV-11872

But MariaDB 10.2.1 and older seems to work fine with DBD::mysql from git on Linux.

This pull request https://github.com/perl5-dbi/DBD-mysql/pull/85 adds support for automatically check if DBD::mysql unit tests pass on different MySQL & MariaDB versions on Linux You can see result (everything pass) and tested versions: https://travis-ci.org/perl5-dbi/DBD-mysql/builds/194603464

Those tests are running on Travis and therefore only Linux versions are tested.

I would suggest you to report this bug either directly Strawberry perl bug tracker or to MariaDB bug tracker. As Linux versions are working fine, problem is somewhere in Windows code (perl/mariadb/scripts/setup) and therefore cannot help you more.

mbeijen avatar Nov 15 '17 07:11 mbeijen