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

Report information
The Basics
 Id: 100898 Status: resolved Priority: 0/ Queue: DBD-mysql

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

Bug Information
 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
DBD-mysql-4.039-1479588415.log
p_m_sderr
p_m_stdout

History
text/plain 24.5k

Message body is not shown because it is too large.

 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 223
text/plain 223b
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.
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) X-RT-Interface: Web References: Content-Type: multipart/mixed; boundary="----------=_1479670055-22257-2" Message-ID: X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 0
 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 Content-Length: 936
text/plain 936b
 MIME-Version: 1.0 Subject: DBD-mysql-4.039-1479588415.log X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Type: application/octet-stream; name="DBD-mysql-4.039-1479588415.log" Content-Disposition: inline; filename="DBD-mysql-4.039-1479588415.log" Content-Transfer-Encoding: base64 Content-Length: 26821
application/octet-stream 26.1k

Message body not shown because it is not plain text.

 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) X-RT-Interface: Web References: Content-Type: multipart/mixed; boundary="----------=_1479672440-20779-2" Message-ID: X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 0
 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 Content-Length: 1734
text/plain 1.6k
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?
 MIME-Version: 1.0 Subject: 0001-Fix-parsing-configure-libs-from-mysql_config-libs-ou.patch X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Type: application/octet-stream; name="0001-Fix-parsing-configure-libs-from-mysql_config-libs-ou.patch" Content-Disposition: inline; filename="0001-Fix-parsing-configure-libs-from-mysql_config-libs-ou.patch" Content-Transfer-Encoding: base64 Content-Length: 1120
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
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) X-RT-Interface: Web References: Content-Type: multipart/mixed; boundary="----------=_1479673384-20779-9" Message-ID: X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 0
 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 Content-Length: 535
text/plain 535b
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
 MIME-Version: 1.0 Subject: d_stderr X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Type: application/octet-stream; name="d_stderr" Content-Disposition: inline; filename="d_stderr" Content-Transfer-Encoding: base64 Content-Length: 89729
application/octet-stream 87.6k

Message body not shown because it is not plain text.

 Subject: d_stdout MIME-Version: 1.0 Content-Type: application/octet-stream; name="d_stdout" X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline; filename="d_stdout" Content-Transfer-Encoding: base64 Content-Length: 1915
application/octet-stream 1.8k

Message body not shown because it is not plain text.

 MIME-Version: 1.0 Subject: p_m_sderr X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Type: application/octet-stream; name="p_m_sderr" Content-Disposition: inline; filename="p_m_sderr" Content-Transfer-Encoding: base64 Content-Length: 2401
application/octet-stream 2.3k

Message body not shown because it is not plain text.

 Subject: p_m_stdout MIME-Version: 1.0 Content-Type: application/octet-stream; name="p_m_stdout" X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline; filename="p_m_stdout" Content-Transfer-Encoding: base64 Content-Length: 1853
application/octet-stream 1.8k

Message body not shown because it is not plain text.

 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 1574
text/plain 1.5k
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.
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 1942
text/plain 1.8k
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).
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 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.
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 3340
text/plain 3.2k
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.
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 3652
text/plain 3.5k
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?
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 4018
text/plain 3.9k
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.
 MIME-Version: 1.0 In-Reply-To: X-Mailer: MIME-tools 5.504 (Entity 5.504) Content-Disposition: inline X-RT-Interface: Web References: Content-Type: text/plain; charset="utf-8" Message-ID: Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 5346
text/plain 5.2k
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.