The databases/p5-Mysql port does not compile because the mysql_shutdown function takes two parameters these days instead of one. Fix: The following contents installed in a file /usr/ports/databases/p5-Mysql/files/patch-dbd::myMsql.h will solve the problem: How-To-Repeat: Try to install the port.
Responsible Changed From-To: freebsd-ports-bugs->jedgar Over to maintainer.
This is still open. Could somebody else patch this or nudge the maintainer pleeeeease ?
> This is still open. Could somebody else patch this or nudge the > maintainer pleeeeease ? Still no action :-) -- Sven
> This may be right for a quite recent version of mysql but not with > the default one (3.something). Coming right back at you, that could very well be the case, but if I've installed mysql 4.something and not 3.something, then this port does not work, which is a pity. My patch is probably not good enough, but perhaps it could check whether the mysql headers are for 3.something or 4.something and use some version #ifdef to choose the correct shutdown calling method. > -- > Florent Thoumie > flz@FreeBSD.org > FreeBSD committer -- With kind regards, Sven Berkvens-Matthijsse sven@ilse.net
This may be right for a quite recent version of mysql but not with the default one (3.something). -- Florent Thoumie flz@FreeBSD.org FreeBSD committer
Le Mardi 29 novembre 2005 à 16:42 +0100, Sven Berkvens-Matthijsse a écrit : > > This may be right for a quite recent version of mysql but not with > > the default one (3.something). > > Coming right back at you, that could very well be the case, but if > I've installed mysql 4.something and not 3.something, then this port > does not work, which is a pity. My patch is probably not good enough, > but perhaps it could check whether the mysql headers are for > 3.something or 4.something and use some version #ifdef to choose the > correct shutdown calling method. I guess you could do this with some magic in Makefile (checking MYSQL_VER after bsd.port.mk inclusion and using EXTRA_PATCHES). -- Florent Thoumie flz@FreeBSD.org FreeBSD committer
> > Coming right back at you, that could very well be the case, but if > > I've installed mysql 4.something and not 3.something, then this port > > does not work, which is a pity. My patch is probably not good enough, > > but perhaps it could check whether the mysql headers are for > > 3.something or 4.something and use some version #ifdef to choose the > > correct shutdown calling method. > > I guess you could do this with some magic in Makefile (checking > MYSQL_VER after bsd.port.mk inclusion and using EXTRA_PATCHES). That's not necessary. I've created a new patch, which I've attached, which will work with both MySQL 3.x and 4.x. > -- > Florent Thoumie > flz@FreeBSD.org > FreeBSD committer -- With kind regards, Sven Berkvens-Matthijsse sven@ilse.net
State Changed From-To: open->feedback when compiling it with the latest patch: /usr/local/bin/perl5.8.7 /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.7/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c Warning: duplicate function definition 'do' detected in mysql.xs, line 281 Warning: duplicate function definition 'rows' detected in mysql.xs, line 407 cc -c -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/include/mysql -I../dbd -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/lib/perl5/5.8.7/mach -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O2 -fno-strict-aliasing -pipe -DVERSION="2.0419" -DXS_VERSION="2.0419" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.7/mach/CORE" -DDBD_MYSQL mysql.c mysql.xs: In function `XS_DBD__mysql__dr__admin_internal': mysql.xs:144: error: `SHUTDOWN_DEFAULT' undeclared (first use in this function) mysql.xs:144: error: (Each undeclared identifier is reported only once mysql.xs:144: error: for each function it appears in.) mysql.xs:144: error: too many arguments to function `mysql_shutdown' That is on a tinderbox with the default settings and thus mysql 3.23.59
> Synopsis: [PATCH] databases/p5-Mysql port does not compile > > State-Changed-From-To: open->feedback > State-Changed-By: edwin > State-Changed-When: Wed Jan 4 09:19:01 UTC 2006 > State-Changed-Why: > when compiling it with the latest patch: > > /usr/local/bin/perl5.8.7 /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.7/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c > Warning: duplicate function definition 'do' detected in mysql.xs, line 281 > Warning: duplicate function definition 'rows' detected in mysql.xs, line 407 > cc -c -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/include/mysql -I../dbd -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/lib/perl5/5.8.7/mach -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O2 -fno-strict-aliasing -pipe -DVERSION=\"2.0419\" -DXS_VERSION=\"2.0419\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.7/mach/CORE" -DDBD_MYSQL mysql.c > mysql.xs: In function `XS_DBD__mysql__dr__admin_internal': > mysql.xs:144: error: `SHUTDOWN_DEFAULT' undeclared (first use in this function) > mysql.xs:144: error: (Each undeclared identifier is reported only once > mysql.xs:144: error: for each function it appears in.) > mysql.xs:144: error: too many arguments to function `mysql_shutdown' > > That is on a tinderbox with the default settings and thus mysql > 3.23.59 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=83373 Finally had time to check on this today. When I have MySQL 3.x on my machine (see the "Cleaning for" lines), the port compiles fine when I install the patch that I sent... here's the output of a portupgrade: portupgrade -vvf databases/p5-Mysql ---> Session started at: Wed, 08 Feb 2006 13:16:19 +0100 ---> Reinstallation of databases/p5-Mysql started at: Wed, 08 Feb 2006 13:16:34 +0100 ---> Reinstalling 'p5-Mysql-modules-1.2219' (databases/p5-Mysql) ---> Build of databases/p5-Mysql started at: Wed, 08 Feb 2006 13:16:34 +0100 ---> Building '/usr/ports/databases/p5-Mysql' ===> Cleaning for perl-5.8.7_2 ===> Cleaning for p5-Data-ShowTable-3.3 ===> Cleaning for p5-DBI-1.50 ===> Cleaning for mysql-client-3.23.59.n.20050301_2 ===> Cleaning for p5-Storable-2.15 ===> Cleaning for libtool-1.5.22_1 ===> Cleaning for ldconfig_compat-1.0_5 ===> Cleaning for rc_subr-1.31_1 ===> Cleaning for p5-Mysql-modules-1.2219 ===> Extracting for p5-Mysql-modules-1.2219 => MD5 Checksum OK for Msql-Mysql-modules-1.2219.tar.gz. ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/bin/perl5.8.7 - found ===> Patching for p5-Mysql-modules-1.2219 ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/bin/perl5.8.7 - found ===> Applying FreeBSD patches for p5-Mysql-modules-1.2219 ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/lib/perl5/site_perl/5.8.7/Data/ShowTable.pm - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/lib/perl5/site_perl/5.8.7/mach/DBI.pm - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/bin/perl5.8.7 - found ===> p5-Mysql-modules-1.2219 depends on shared library: mysqlclient.10 - found ===> Configuring for p5-Mysql-modules-1.2219 Creating files for MySQL .......................... WARNING: PL_FILES takes a hash reference not a array reference. Please inform the author. Checking if your kit is complete... Looks good Using DBI 1.50 (for perl 5.008007 on i386-freebsd-64int) installed in /usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI/ Writing Makefile for DBD::mysql Writing Makefile for Msql-Mysql-modules ===> Building for p5-Mysql-modules-1.2219 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.8.7/mach -I/usr/local/lib/perl5/5.8.7 -Ilib -MExtUtils::PerlPP -e ppp "dbd/dbimon.in" "dbimon" "lib/DBD/mysql/Install/Config.pm" /usr/local/bin/pod2text mysql/lib/DBD/mysql.pm >README cp lib/DBD/mysql.pm ../blib/lib/DBD/mysql.pm cp lib/Mysql.pm ../blib/lib/Mysql.pm cp lib/Mysql/Statement.pm ../blib/lib/Mysql/Statement.pm cp lib/Bundle/DBD/mysql.pm ../blib/lib/Bundle/DBD/mysql.pm cc -c -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/include/mysql -I../dbd -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/lib/perl5/5.8.7/mach -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -D_THREAD_SAFE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe -DVERSION=\"2.0419\" -DXS_VERSION=\"2.0419\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.7/mach/CORE" -DDBD_MYSQL dbdimp.c dbdimp.c: In function `mysql_db_FETCH_attrib': dbdimp.c:1052: warning: cast from pointer to integer of different size dbdimp.c: In function `mysql_st_FETCH_attrib': dbdimp.c:1867: warning: cast from pointer to integer of different size dbdimp.c:1983: warning: cast from pointer to integer of different size dbdimp.c:2052: warning: cast from pointer to integer of different size /usr/local/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI//Driver.xst > mysql.xsi /usr/local/bin/perl /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.7/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c Warning: duplicate function definition 'do' detected in mysql.xs, line 281 Warning: duplicate function definition 'rows' detected in mysql.xs, line 407 cc -c -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/include/mysql -I../dbd -I/usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBI -I/usr/local/lib/perl5/5.8.7/mach -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -D_THREAD_SAFE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe -DVERSION=\"2.0419\" -DXS_VERSION=\"2.0419\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.7/mach/CORE" -DDBD_MYSQL mysql.c Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f ../blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/usr/local/lib/mysql:/usr/lib" cc -shared -L/usr/local/lib dbdimp.o mysql.o -L/usr/local/lib/mysql -o ../blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/lib/mysql -lmysqlclient -lm -lz chmod 755 ../blib/arch/auto/DBD/mysql/mysql.so cp mysql.bs ../blib/arch/auto/DBD/mysql/mysql.bs chmod 644 ../blib/arch/auto/DBD/mysql/mysql.bs Manifying ../blib/man3/DBD::mysql.3 Manifying ../blib/man3/Mysql.3 Manifying ../blib/man3/Bundle::DBD::mysql.3 cp dbimon blib/script/dbimon /usr/local/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/dbimon Manifying blib/man1/dbimon.1 ---> Build of databases/p5-Mysql ended at: Wed, 08 Feb 2006 13:16:54 +0100 (consumed 00:00:19) ---> Uninstallation of p5-Mysql-modules-1.2219 started at: Wed, 08 Feb 2006 13:16:54 +0100 ---> Fixing up dependencies before creating a package ---> Backing up the old version ---> Uninstalling the old version ---> Deinstalling 'p5-Mysql-modules-1.2219' [Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 475 packages found (-1 +0) (...) done] ---> Uninstallation of p5-Mysql-modules-1.2219 ended at: Wed, 08 Feb 2006 13:17:07 +0100 (consumed 00:00:13) ---> Installation of databases/p5-Mysql started at: Wed, 08 Feb 2006 13:17:07 +0100 ---> Installing the new version via the port ===> Installing for p5-Mysql-modules-1.2219 ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/lib/perl5/site_perl/5.8.7/Data/ShowTable.pm - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/lib/perl5/site_perl/5.8.7/mach/DBI.pm - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/bin/perl5.8.7 - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/lib/perl5/site_perl/5.8.7/mach/DBI.pm - found ===> p5-Mysql-modules-1.2219 depends on file: /usr/local/bin/perl5.8.7 - found ===> p5-Mysql-modules-1.2219 depends on shared library: mysqlclient.10 - found ===> Generating temporary packing list ===> Warning: your umask is "0002". If this is not desired, set it to an appropriate value and install this port again by ``make reinstall''. Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBD/mysql/mysql.so Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/auto/DBD/mysql/mysql.bs Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/Mysql.pm Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/DBD/mysql.pm Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/Mysql/Statement.pm Installing /usr/local/lib/perl5/site_perl/5.8.7/mach/Bundle/DBD/mysql.pm Installing /usr/local/man/man1/dbimon.1 Installing /usr/local/lib/perl5/5.8.7/man/man3/DBD::mysql.3 Installing /usr/local/lib/perl5/5.8.7/man/man3/Mysql.3 Installing /usr/local/lib/perl5/5.8.7/man/man3/Bundle::DBD::mysql.3 Installing /usr/local/bin/dbimon Writing /usr/local/lib/perl5/site_perl/5.8.7/mach/auto/Msql-Mysql-modules/.packlist ===> Compressing manual pages for p5-Mysql-modules-1.2219 ===> Registering installation for p5-Mysql-modules-1.2219 ===> Cleaning for perl-5.8.7_2 ===> Cleaning for p5-Data-ShowTable-3.3 ===> Cleaning for p5-DBI-1.50 ===> Cleaning for mysql-client-3.23.59.n.20050301_2 ===> Cleaning for p5-Storable-2.15 ===> Cleaning for libtool-1.5.22_1 ===> Cleaning for ldconfig_compat-1.0_5 ===> Cleaning for rc_subr-1.31_1 ===> Cleaning for p5-Mysql-modules-1.2219 ---> Removing temporary backup files ---> Installation of databases/p5-Mysql ended at: Wed, 08 Feb 2006 13:17:30 +0100 (consumed 00:00:22) ---> Cleaning out obsolete shared libraries [Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 476 packages found (-0 +1) . done] ---> Reinstallation of databases/p5-Mysql ended at: Wed, 08 Feb 2006 13:17:33 +0100 (consumed 00:00:58) ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) + databases/p5-Mysql (p5-Mysql-modules-1.2219) ---> Packages processed: 1 done, 0 ignored, 0 skipped and 0 failed ---> Session ended at: Wed, 08 Feb 2006 13:17:42 +0100 (consumed 00:01:22) -- Sven
Responsible Changed From-To: jedgar->freebsd-ports-bugs Maintainer was reset.
State Changed From-To: feedback->open Feedback received
State Changed From-To: open->closed Committed, thanks! (I was able to build it just fine.)
The latest patch is not entirely correct. It should test: #if MYSQL_VERSION_ID < 40100 instead of: #if MYSQL_VERSION_ID < 40000 to function correctly with all versions of MySQL. Thanks to Igor Karanevich <devdetonator@gmail.com> for pointing this out to me. -- Sven