[MDEV-6577] auth_socket.so does not build in kFreeBSD Created: 2014-08-13  Updated: 2014-10-01  Resolved: 2014-09-06

Status: Closed
Project: MariaDB Server
Component/s: Platform Debian, Plugin - unix_socket
Affects Version/s: 5.5.39, 10.0.13
Fix Version/s: 5.5.40, 10.0.14

Type: Bug Priority: Major
Reporter: Otto Kekäläinen Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: debian, kfreebsd, packaging

Attachments: File kfreebsd-peercred.diff    
Issue Links:
Relates
relates to MDEV-6800 auth_socket plugin fails to build on ... Closed
relates to MDEV-5707 MTR fails on kfreebsd Closed

 Description   

Building MariaDB 5.5.39 fails now due missing auth_socket.so file. See log at https://buildd.debian.org/status/fetch.php?pkg=mariadb-5.5&arch=kfreebsd-i386&ver=5.5.39-1&stamp=1407785424

Visible warnings in the build log are at least

/«PKGBUILDDIR»/cmd-line-utils/readline/complete.c: In function 'fnwidth':
/«PKGBUILDDIR»/cmd-line-utils/readline/complete.c:605:8: warning: implicit declaration of function 'wcwidth' [-Wimplicit-function-declaration]
        w = wcwidth (wc);
        ^
[  1%] Building C object strings/CMakeFiles/strings.dir/ctype-czech.c.o
[  1%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/bind.c.o
[  1%] Building C object strings/CMakeFiles/strings.dir/ctype-euc_kr.c.o
[  1%] Building C object strings/CMakeFiles/strings.dir/ctype-eucjpms.c.o
[  1%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/isearch.c.o
[  1%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/display.c.o
/«PKGBUILDDIR»/cmd-line-utils/readline/display.c: In function 'rl_redisplay':
/«PKGBUILDDIR»/cmd-line-utils/readline/display.c:714:8: warning: implicit declaration of function 'wcwidth' [-Wimplicit-function-declaration]
        temp = wcwidth (wc);
        ^
/«PKGBUILDDIR»/cmd-line-utils/readline/mbutil.c: In function '_rl_find_next_mbchar_internal':
/«PKGBUILDDIR»/cmd-line-utils/readline/mbutil.c:118:8: warning: implicit declaration of function 'wcwidth' [-Wimplicit-function-declaration]
        if (wcwidth (wc) == 0)
        ^
/«PKGBUILDDIR»/strings/decimal.c: In function 'do_div_mod':
/«PKGBUILDDIR»/strings/decimal.c:2139:55: warning: array subscript is below array bounds [-Warray-bounds]
   for (i= (prec2 - 1) % DIG_PER_DEC1; *buf2 < powers10[i--]; prec2--) ;
                                                       ^
/«PKGBUILDDIR»/strings/decimal.c:2154:52: warning: array subscript is below array bounds [-Warray-bounds]
   for (i=(prec1-1) % DIG_PER_DEC1; *buf1 < powers10[i--]; prec1--) ;
                                                    ^
/«PKGBUILDDIR»/strings/decimal.c:2139:55: warning: array subscript is below array bounds [-Warray-bounds]
   for (i= (prec2 - 1) % DIG_PER_DEC1; *buf2 < powers10[i--]; prec2--) ;
                                                       ^
/«PKGBUILDDIR»/strings/decimal.c:2154:52: warning: array subscript is below array bounds [-Warray-bounds]
   for (i=(prec1-1) % DIG_PER_DEC1; *buf1 < powers10[i--]; prec1--) ;
                                                    ^
[  4%] Building C object strings/CMakeFiles/strings.dir/dtoa.c.o
/«PKGBUILDDIR»/strings/decimal.c: In function 'decimal_actual_fraction':
/«PKGBUILDDIR»/strings/decimal.c:300:26: warning: array subscript is above array bounds [-Warray-bounds]
          *buf0 % powers10[i++] == 0;
                          ^
/«PKGBUILDDIR»/strings/decimal.c:300:26: warning: array subscript is above array bounds [-Warray-bounds]
/«PKGBUILDDIR»/strings/decimal.c: In function 'decimal2string':
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
     for (i= (intg - 1) % DIG_PER_DEC1; *buf0 < powers10[i--]; intg--) ;
                                                        ^
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
/«PKGBUILDDIR»/strings/decimal.c: In function 'decimal2bin':
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
     for (i= (intg - 1) % DIG_PER_DEC1; *buf0 < powers10[i--]; intg--) ;
                                                        ^
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
/«PKGBUILDDIR»/strings/decimal.c: In function 'decimal_shift':
/«PKGBUILDDIR»/strings/decimal.c:478:31: warning: array subscript is below array bounds [-Warray-bounds]
     for (; *buf_beg < powers10[i--]; start++) ;
                               ^
/«PKGBUILDDIR»/strings/decimal.c:496:29: warning: array subscript is above array bounds [-Warray-bounds]
   for (; *buf_end % powers10[i++] == 0; stop--) {}
                             ^
/«PKGBUILDDIR»/strings/decimal.c:496:29: warning: array subscript is above array bounds [-Warray-bounds]
/«PKGBUILDDIR»/strings/decimal.c:478:31: warning: array subscript is below array bounds [-Warray-bounds]
     for (; *buf_beg < powers10[i--]; start++) ;
                               ^
/«PKGBUILDDIR»/strings/decimal.c: In function 'decimal_intg':
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
     for (i= (intg - 1) % DIG_PER_DEC1; *buf0 < powers10[i--]; intg--) ;
                                                        ^
/«PKGBUILDDIR»/strings/decimal.c:264:56: warning: array subscript is below array bounds [-Warray-bounds]
/«PKGBUILDDIR»/sql/sql_yacc.yy:788.1-12: warning: deprecated directive, use '%pure-parser' [-Wdeprecated]
 %pure_parser                                    /* We have threads */
 ^^^^^^^^^^^^

..though these are only warnings, not errors, so the root cause may lie somewhere else.



 Comments   
Comment by Otto Kekäläinen [ 2014-08-13 ]

Tips from #debian-mentors:

15:04 < svuorela> otto: if you look a bit at the build log and the build system, it stand quite clearly 
                  out
15:04 < svuorela> IF(HAVE_PEERCRED OR HAVE_SOCKPEERCRED) MYSQL_ADD_PLUGIN(auth_socket auth_socket.c 
                  MODULE_ONLY)
15:05 < svuorela> from a CMakeLists
15:05 < svuorela> -- Performing Test HAVE_PEERCRED - Failed
15:05 < svuorela> -- Performing Test HAVE_SOCKPEERCRED - Failed
15:07 < otto> svuorela: ok thanks, so the plugin in question isn't supposed to build on all platforms. 
              Thanks for spotting it!
15:07 < svuorela> otto: I do think that freebsd have those things
15:07 < svuorela> it just needs to be correctly detected
15:08 < svuorela> but you need a kfbsd machine to correctly figure it out
15:09 < wRAR> kfreebsd has LOCAL_PEERCRED
15:10 < wRAR> maybe the code needs to have additional ifdefs apart from the addition cmake check
15:13 < otto> ok, thanks for your help. So my plan is now to create a new virtual machine, install Debian 
              with kfreebsd and then hack investigate how to detect PEERCRED in the configure step in 
              cmake
15:13 < wRAR> or look at software already supporting that
15:14 < wRAR> codesearch might help

Comment by Otto Kekäläinen [ 2014-08-28 ]

I've created a new virtual machine, installed Debian kFreeBSD and built my MariaDB branch with the attached patch, and it built successfully. Test suite is still running, but at least the issue in this issue title is solved.

http://anonscm.debian.org/cgit/pkg-mysql/mariadb-5.5.git/tree/debian/patches/21_kfreebsd-peercred.diff

Comment by Otto Kekäläinen [ 2014-09-04 ]

The mariadb-5.5_5.5.39-2 package was uploaded to Debian with this patch included and some kFreeBSD fixes in the rules file. The up-to-date build status in Debian for 5.5 is visible at https://buildd.debian.org/status/package.php?p=mariadb-5.5 and http://buildd.debian-ports.org/status/package.php?p=mariadb-5.5

Generated at Thu Feb 08 07:12:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.