Preferred bug tracker

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id:
100898
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
valkoles [...] gmail.com
Cc:
pali [...] cpan.org

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)

Attachments
0001-Fix-parsing-configure-libs-from-mysql_config-libs-ou.patch d_stderr d_stdout p_m_sderr p_m_stdout

 Subject: compiling fails with mariadb-10.0.14-winx64 on windows 7 (64) Date: Sat, 13 Dec 2014 12:23:24 -0500 To: bug-dbd-mysql@rt.cpan.org From: val
[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.
Show quoted text
mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';
On Sob Dec 13 12:23:39 2014, valkoles@gmail.com wrote:
Show quoted text
> 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.
 Subject: DBD-mysql-4.039-1479588415.log

Message body not shown because it is not plain text.

On Ned Nov 20 14:27:35 2016, VAL wrote:
Show quoted text
Hmm... In log I see:
Show quoted text
> 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?
 Subject: 0001-Fix-parsing-configure-libs-from-mysql_config-libs-ou.patch
From 844f827363f89331bba60bc97388dc9e2640d65b Mon Sep 17 00:00:00 2001 From: Pali <pali@cpan.org> Date: Sun, 20 Nov 2016 21:04:27 +0100 Subject: [PATCH] Fix parsing configure libs from mysql_config --libs output in Makefile.PL Libraries in mysql_config --libs output can be specified by library name with -l prefix or by absolute path to library name without any prefix. Parameters must start with a hyphen, so treat all options without leading hyphen in mysql_config --libs output as libraries with full path. --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 0e78f00..a2202a3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -578,7 +578,7 @@ sub Configure { if (\$param eq 'libs') { my (@libs, @ldflags); for (split ' ', \$str) { - if (/^-[Ll]/) { push @libs, \$_ } + if (/^-[Ll]/ || /^[^\-]/) { push @libs, \$_ } else { push @ldflags, \$_ } } \$str = "@libs"; -- 1.7.9.5
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
 Subject: d_stderr

Message body not shown because it is not plain text.

 Subject: d_stdout

Message body not shown because it is not plain text.

 Subject: p_m_sderr

Message body not shown because it is not plain text.

 Subject: p_m_stdout

Message body not shown because it is not plain text.

On Ned Nov 20 15:23:04 2016, VAL wrote:
Show quoted text
> 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?
Show quoted text
Those are OK.
Show quoted text
> 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.
On Sun Nov 20 15:46:03 2016, PALI wrote:
Show quoted text
> 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).
Show quoted text
> Which compiler and linker are you using for compiling DBD::mysql?
x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z
Show quoted text
> 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...
Show quoted text
> 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.
On Ned Nov 20 16:58:59 2016, VAL wrote:
Show quoted text
> 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!
Show quoted text
> > 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 ")
Show quoted text
> 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.
On Sun Nov 20 17:13:29 2016, PALI wrote:
Show quoted text
> 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?
On Wed Jan 18 09:16:07 2017, PALI wrote:
Show quoted text
> 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.
On Tue Jan 24 00:56:34 2017, VAL wrote:
Show quoted text
> 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.