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

mroonga storage engine fails to build on OpenBSD

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.21
    • Fix Version/s: 10.0
    • Labels:
      None
    • Environment:
      OpenBSD

      Description

      The mroonga storage engine fails to build on OpenBSD.

      Looking at the code it appears as if netinet/tcp.h is not being included at the bare minimum. The CMake test for netinet/tcp.h is failing. The test needs to include sys/types.h when testing for netinet/tcp.h.

      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_send':
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:717: error: array type has incomplete element type
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:717: warning: unused variable 'msg_iov'
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_copen':
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:947: error: 'TCP_NODELAY' undeclared (first use in this function)
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:947: error: (Each undeclared identifier is reported only once
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:947: error: for each function it appears in.)
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_sopen':
      /home/ports/pobj/mariadb-10.0.15/mariadb-10.0.15/storage/mroonga/vendor/groonga/lib/com.c:1063: error: 'TCP_NODELAY' undeclared (first use in this function)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            brad0 Brad Smith added a comment -

            Any comment? I can build test any proposed diffs even against a 10.0.15 code base.

            Show
            brad0 Brad Smith added a comment - Any comment? I can build test any proposed diffs even against a 10.0.15 code base.
            Hide
            brad0 Brad Smith added a comment -

            ping.

            Show
            brad0 Brad Smith added a comment - ping.
            Hide
            brad0 Brad Smith added a comment -

            Still broken with 10.0.16.

            Show
            brad0 Brad Smith added a comment - Still broken with 10.0.16.
            Hide
            jambii carrie h added a comment -

            I'm encountering this exact issue on OpenBSD 5.6 GENERIC.MP#333 amd64 during the initial make for versions 10.0.15 and 10.0.16.

            Show
            jambii carrie h added a comment - I'm encountering this exact issue on OpenBSD 5.6 GENERIC.MP#333 amd64 during the initial make for versions 10.0.15 and 10.0.16.
            Hide
            JT Jon Tibble added a comment -

            This also affects illumos/Solaris based OSs. The following fixed this particular issue for me:

            --- mariadb-10.0.17/configure.cmake.~1~ 2015-02-25 15:40:53.000000000 +0000
            +++ mariadb-10.0.17/configure.cmake     2015-03-28 19:31:19.075448106 +0000
            @@ -196,6 +196,7 @@
             CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H)
             CHECK_INCLUDE_FILES (ndir.h HAVE_NDIR_H)
             CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H)
            +CHECK_INCLUDE_FILES ("sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H)
             CHECK_INCLUDE_FILES (paths.h HAVE_PATHS_H)
             CHECK_INCLUDE_FILES (port.h HAVE_PORT_H)
             CHECK_INCLUDE_FILES (poll.h HAVE_POLL_H)
            
            Show
            JT Jon Tibble added a comment - This also affects illumos/Solaris based OSs. The following fixed this particular issue for me: --- mariadb-10.0.17/configure.cmake.~1~ 2015-02-25 15:40:53.000000000 +0000 +++ mariadb-10.0.17/configure.cmake 2015-03-28 19:31:19.075448106 +0000 @@ -196,6 +196,7 @@ CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H) CHECK_INCLUDE_FILES (ndir.h HAVE_NDIR_H) CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H) +CHECK_INCLUDE_FILES ( "sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H) CHECK_INCLUDE_FILES (paths.h HAVE_PATHS_H) CHECK_INCLUDE_FILES (port.h HAVE_PORT_H) CHECK_INCLUDE_FILES (poll.h HAVE_POLL_H)
            Hide
            kou Kouhei Sutou added a comment -

            Groonga at master is buildable on OpenBSD. This issue will be fixed when new Groonga is released (It will be released at 2015-05-29) and bundled into MariaDB.

            Show
            kou Kouhei Sutou added a comment - Groonga at master is buildable on OpenBSD. This issue will be fixed when new Groonga is released (It will be released at 2015-05-29) and bundled into MariaDB.
            Hide
            brad0 Brad Smith added a comment -

            Building 10.0.21 the issue still exists there. Again the issue is the netinet/tcp.h header check is failing due to the fact that sys/types.h header is not being included at the same time which is required for netinet/tcp.h. The patch Job Tibble posted seems to work but to me it feels like the wrong place to fix the issue. It should be in the Mroonga specific bits of code with regard to the CMake / autoconf infrastructure.

            Show
            brad0 Brad Smith added a comment - Building 10.0.21 the issue still exists there. Again the issue is the netinet/tcp.h header check is failing due to the fact that sys/types.h header is not being included at the same time which is required for netinet/tcp.h. The patch Job Tibble posted seems to work but to me it feels like the wrong place to fix the issue. It should be in the Mroonga specific bits of code with regard to the CMake / autoconf infrastructure.
            Hide
            kou Kouhei Sutou added a comment -

            Could you try http://packages.groonga.org/source/mroonga/mariadb-10.0.21-with-mroonga-5.06.tar.gz ?

            It replaces bundled Mroonga with the latest Mroonga. If it solves this problem, we can solve this problem by updating bundled Mroonga.

            Show
            kou Kouhei Sutou added a comment - Could you try http://packages.groonga.org/source/mroonga/mariadb-10.0.21-with-mroonga-5.06.tar.gz ? It replaces bundled Mroonga with the latest Mroonga. If it solves this problem, we can solve this problem by updating bundled Mroonga.

              People

              • Assignee:
                Kentoku Kentoku
                Reporter:
                brad0 Brad Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: