Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6577

auth_socket.so does not build in kFreeBSD

    Details

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              otto Otto Kekäläinen added a comment -

              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
              
              Show
              otto Otto Kekäläinen added a comment - 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
              Hide
              otto Otto Kekäläinen added a comment -

              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

              Show
              otto Otto Kekäläinen added a comment - 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
              Hide
              otto Otto Kekäläinen added a comment -

              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

              Show
              otto Otto Kekäläinen added a comment - 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

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  otto Otto Kekäläinen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour, 30 minutes
                    1h 30m