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

mroonga storage engine fails to build on OpenBSD

Details

    Description

      The mroonga storage engine fails to build on OpenBSD.

      Updating this for 10.5 it is now failing in a different manner.

      humpty$ make
      ===>  Building for mariadb-10.5.8
      [1/102] cd /home/ports/pobj/mariadb-10.5.8/build-amd64 && /usr/local/bin/cmake -P /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/cmake/info_src.cmake
      [2/102] cd /home/ports/pobj/mariadb-10.5.8/build-amd64 && /usr/local/bin/cmake -P /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/cmake/info_bin.cmake
      [3/102] /home/ports/pobj/mariadb-10.5.8/bin/c++  -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -Dmroonga_EXPORTS -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-l
      ib/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/wsrep-API/v26 -Iinclude -Istorage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/lib -I/home/ports/pobj/mariadb
      -10.5.8/mariadb-10.5.8/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/regex -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8 -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/vendor/groonga/incl
      ude -O2 -pipe  -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -fPIC   -std=gnu++11 -MD -MT storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -MF storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o.d -o st
      orage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -c /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp
      FAILED: storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o
      /home/ports/pobj/mariadb-10.5.8/bin/c++  -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -Dmroonga_EXPORTS -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/inclu
      de -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/wsrep-API/v26 -Iinclude -Istorage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/lib -I/home/ports/pobj/mariadb-10.5.8/
      mariadb-10.5.8/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/regex -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8 -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/vendor/groonga/include -O2
      -pipe  -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -fPIC   -std=gnu++11 -MD -MT storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -MF storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o.d -o storage/mr
      oonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -c /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
      In file included from /usr/include/c++/v1/math.h:309:
      In file included from /usr/include/c++/v1/type_traits:406:
      In file included from /usr/include/c++/v1/cstddef:38:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
      In file included from /usr/include/c++/v1/math.h:309:
      In file included from /usr/include/c++/v1/type_traits:407:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
      In file included from /usr/include/c++/v1/math.h:310:
      In file included from /usr/include/c++/v1/limits:122:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:1127:
      In file included from /usr/include/c++/v1/new:85:
      In file included from /usr/include/c++/v1/exception:84:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:1127:
      In file included from /usr/include/c++/v1/new:88:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:51:
      In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql/sql_class.h:23:
      In file included from /usr/include/c++/v1/atomic:547:
      /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
      7.07
      ^
      .....
      

      Attachments

        Activity

          brad0 Brad Smith created issue -
          brad0 Brad Smith made changes -
          Field Original Value New Value
          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)
          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.

          {quote}
          /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)
          {quote}
          serg Sergei Golubchik made changes -
          Assignee Kentoku [ kentoku ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.16 [ 17900 ]
          brad0 Brad Smith made changes -
          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.

          {quote}
          /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)
          {quote}
          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.

          {noformat}
          /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)
          {noformat}
          brad0 Brad Smith added a comment -

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

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

          ping.

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

          Still broken with 10.0.16.

          brad0 Brad Smith added a comment - Still broken with 10.0.16.
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0 [ 16000 ]
          Fix Version/s 10.0.16 [ 17900 ]
          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.

          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.
          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)

          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)
          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.

          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.
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 58729 ] MariaDB v3 [ 67051 ]
          brad0 Brad Smith made changes -
          Affects Version/s 10.0.21 [ 19406 ]
          Affects Version/s 10.0.15 [ 17300 ]
          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.

          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.
          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.

          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.
          brad0 Brad Smith added a comment - - edited

          Since our OpenBSD port has Mroonga disabled (until this is fixed) I forgot about this issue. It still exists with 10.0.27.

          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_copen':
          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: 'TCP_NODELAY' undeclared (first use in this function)
          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: (Each undeclared identifier is reported only once
          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: for each function it appears in.)
          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_sopen':
          /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:1094: error: 'TCP_NODELAY' undeclared (first use in this function)
          

          brad0 Brad Smith added a comment - - edited Since our OpenBSD port has Mroonga disabled (until this is fixed) I forgot about this issue. It still exists with 10.0.27. /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_copen': /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: 'TCP_NODELAY' undeclared (first use in this function) /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: (Each undeclared identifier is reported only once /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:976: error: for each function it appears in.) /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c: In function 'grn_com_sopen': /home/ports/pobj/mariadb-10.0.27/mariadb-10.0.27/storage/mroonga/vendor/groonga/lib/com.c:1094: error: 'TCP_NODELAY' undeclared (first use in this function)
          kou Kouhei Sutou added a comment -

          Thanks for your report.
          I've fixed it as https://github.com/groonga/groonga/commit/ed2045bc1dc985f71af4e290ec460bd2fec96ebe

          Mroonga will be able to build on OpenBSD when the latest Groonga and Mroonga are merged into MariaDB.

          kou Kouhei Sutou added a comment - Thanks for your report. I've fixed it as https://github.com/groonga/groonga/commit/ed2045bc1dc985f71af4e290ec460bd2fec96ebe Mroonga will be able to build on OpenBSD when the latest Groonga and Mroonga are merged into MariaDB.
          brad0 Brad Smith added a comment -

          Except that did not fix anything. It's a nasty workaround. OpenBSD does have TCP_NODELAY. It is in netinet/tcp.h where it should be. The problem is with the CMake test that is testing for the existence of netinet/tcp.h, the test needs to test sys/types.h + netinet/tcp.h. As Jon pointed out this also affects illumos/Solaris.

          brad0 Brad Smith added a comment - Except that did not fix anything. It's a nasty workaround. OpenBSD does have TCP_NODELAY. It is in netinet/tcp.h where it should be. The problem is with the CMake test that is testing for the existence of netinet/tcp.h, the test needs to test sys/types.h + netinet/tcp.h. As Jon pointed out this also affects illumos/Solaris.
          kou Kouhei Sutou added a comment - - edited

          Do you know a document that TCP_NODELAY requires sys/types.h + netinet/tcp.h?

          http://man.openbsd.org/OpenBSD-5.9/tcp.4 says only netinet/tcp.h:

          > TCP_NODELAY (from <netinet/tcp.h>)

          kou Kouhei Sutou added a comment - - edited Do you know a document that TCP_NODELAY requires sys/types.h + netinet/tcp.h? http://man.openbsd.org/OpenBSD-5.9/tcp.4 says only netinet/tcp.h: > TCP_NODELAY (from <netinet/tcp.h>)
          kou Kouhei Sutou added a comment -

          MariaDB 10.0.27 still bundles old Mroonga and Groonga.
          I hope that they are updated to the latest version.

          kou Kouhei Sutou added a comment - MariaDB 10.0.27 still bundles old Mroonga and Groonga. I hope that they are updated to the latest version.
          brad0 Brad Smith made changes -
          Affects Version/s 10.5.8 [ 25023 ]
          Affects Version/s 10.0.21 [ 19406 ]
          brad0 Brad Smith made changes -
          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.

          {noformat}
          /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)
          {noformat}
          The mroonga storage engine fails to build on OpenBSD.

          Updating this for 10.5 it is now failing in a different manner.

          {noformat}
          humpty$ make
          ===> Building for mariadb-10.5.8
          [1/102] cd /home/ports/pobj/mariadb-10.5.8/build-amd64 && /usr/local/bin/cmake -P /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/cmake/info_src.cmake
          [2/102] cd /home/ports/pobj/mariadb-10.5.8/build-amd64 && /usr/local/bin/cmake -P /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/cmake/info_bin.cmake
          [3/102] /home/ports/pobj/mariadb-10.5.8/bin/c++ -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -Dmroonga_EXPORTS -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-l
          ib/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/wsrep-API/v26 -Iinclude -Istorage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/lib -I/home/ports/pobj/mariadb
          -10.5.8/mariadb-10.5.8/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/regex -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8 -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/vendor/groonga/incl
          ude -O2 -pipe -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -fPIC -std=gnu++11 -MD -MT storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -MF storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o.d -o st
          orage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -c /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp
          FAILED: storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o
          /home/ports/pobj/mariadb-10.5.8/bin/c++ -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -Dmroonga_EXPORTS -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/inclu
          de -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/wsrep-lib/wsrep-API/v26 -Iinclude -Istorage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/lib -I/home/ports/pobj/mariadb-10.5.8/
          mariadb-10.5.8/include -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/regex -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8 -I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/vendor/groonga/include -O2
          -pipe -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -fPIC -std=gnu++11 -MD -MT storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -MF storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o.d -o storage/mr
          oonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o -c /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
          In file included from /usr/include/c++/v1/math.h:309:
          In file included from /usr/include/c++/v1/type_traits:406:
          In file included from /usr/include/c++/v1/cstddef:38:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
          In file included from /usr/include/c++/v1/math.h:309:
          In file included from /usr/include/c++/v1/type_traits:407:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:320:
          In file included from /usr/include/c++/v1/math.h:310:
          In file included from /usr/include/c++/v1/limits:122:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:1127:
          In file included from /usr/include/c++/v1/new:85:
          In file included from /usr/include/c++/v1/exception:84:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:24:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/include/my_global.h:1127:
          In file included from /usr/include/c++/v1/new:88:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/ha_mroonga.cpp:23:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/mrn_mysql.h:51:
          In file included from /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/sql/sql_class.h:23:
          In file included from /usr/include/c++/v1/atomic:547:
          /home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga/version:1:1: error: expected unqualified-id
          7.07
          ^
          .....
          {noformat}
          brad0 Brad Smith added a comment -

          I updated the ticket since it is still open but it was based on 10.0 way back in 2016. Now we're using 10.5.

          brad0 Brad Smith added a comment - I updated the ticket since it is still open but it was based on 10.0 way back in 2016. Now we're using 10.5.

          komainu8, is it something you would want to look at?

          serg Sergei Golubchik added a comment - komainu8 , is it something you would want to look at?
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0 [ 16000 ]
          Fix Version/s 10.1 [ 16100 ]
          komainu8 Horimoto Yasuhiro added a comment - - edited

          Probably, this problem is caused by the Mroonga version is old.
          So, I think I can't find anything for resolving this problem for now.

          So, first of all, we update to the latest the Mroonga that is included in MariaDB.
          Next, I hope that I confirm that this problem whither reproduces or not on the latest Mroonga.

          komainu8 Horimoto Yasuhiro added a comment - - edited Probably, this problem is caused by the Mroonga version is old. So, I think I can't find anything for resolving this problem for now. So, first of all, we update to the latest the Mroonga that is included in MariaDB. Next, I hope that I confirm that this problem whither reproduces or not on the latest Mroonga.
          dnachun Daniel Nachun added a comment - - edited

          I'm a Homebrew maintainer and we recently identified the root cause of this problem. Some versions of Clang expect any file called "version" (or "VERSION" on macOS, due to case insensitivity) to have a certain format (a better explanation is that Clang mistakes the version/VERSION files for the "version" header that is part of its standard library). There are currently several files called "version/VERSION" in the include paths of the mroonga plugin which cause this failure. A similar issue was already fixed by MDEV-25543 for a different plugin, and we have implemented a temporary fix in https://github.com/Homebrew/homebrew-core/pull/79696, by renaming the offending files, or removing directories which contain them from include paths. This is also related to MDEV-25716, which is caused by the same issue. Please follow up if more information is needed to get this resolved.

          dnachun Daniel Nachun added a comment - - edited I'm a Homebrew maintainer and we recently identified the root cause of this problem. Some versions of Clang expect any file called "version" (or "VERSION" on macOS, due to case insensitivity) to have a certain format (a better explanation is that Clang mistakes the version/VERSION files for the "version" header that is part of its standard library). There are currently several files called "version/VERSION" in the include paths of the mroonga plugin which cause this failure. A similar issue was already fixed by MDEV-25543 for a different plugin, and we have implemented a temporary fix in https://github.com/Homebrew/homebrew-core/pull/79696 , by renaming the offending files, or removing directories which contain them from include paths. This is also related to MDEV-25716 , which is caused by the same issue. Please follow up if more information is needed to get this resolved.
          brad0 Brad Smith added a comment - - edited

          Oh. I see what you're talking about. From the error, looking at /usr/include/c++/v1/cstddef.. which has...

          #include <__config>
          #include <version>
          

          and there are some header paths added (-I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga) during the build which happen to have files named "version". I was wondering why we had not run into this with libmarias3 but then I noticed it's VERSION there instead of version so we luck out due to case sensitivity.

          brad0 Brad Smith added a comment - - edited Oh. I see what you're talking about. From the error, looking at /usr/include/c++/v1/cstddef.. which has... #include <__config> #include <version> and there are some header paths added (-I/home/ports/pobj/mariadb-10.5.8/mariadb-10.5.8/storage/mroonga) during the build which happen to have files named "version". I was wondering why we had not run into this with libmarias3 but then I noticed it's VERSION there instead of version so we luck out due to case sensitivity.
          serg Sergei Golubchik made changes -
          Assignee Kentoku Shiba [ kentoku ] Oleksandr Byelkin [ sanja ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          dnachun Daniel Nachun added a comment -

          Actually this is a problem for libmarias3 as well because macOS is not case sensitive, but it was resolved in a commit that hasn't made it into 10.5 yet: https://github.com/mariadb-corporation/libmarias3/commit/c71898f82598.

          dnachun Daniel Nachun added a comment - Actually this is a problem for libmarias3 as well because macOS is not case sensitive, but it was resolved in a commit that hasn't made it into 10.5 yet: https://github.com/mariadb-corporation/libmarias3/commit/c71898f82598 .
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin added a comment - - edited

          commit 4fc25ed235e9a4cd8fddba0f76ec4cb94cf37ea5 (HEAD -> bb-10.2-MDEV-7209, origin/bb-10.2-MDEV-7209)
          Author: Oleksandr Byelkin <sanja@mariadb.com>
          Date:   Tue Jul 20 14:47:24 2021 +0200
           
              MDEV-7209 mroonga storage engine fails to build on OpenBSD
              
              Rename VERSION -> VERSION.txt
          

          sanja Oleksandr Byelkin added a comment - - edited commit 4fc25ed235e9a4cd8fddba0f76ec4cb94cf37ea5 (HEAD -> bb-10.2-MDEV-7209, origin/bb-10.2-MDEV-7209) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Tue Jul 20 14:47:24 2021 +0200   MDEV-7209 mroonga storage engine fails to build on OpenBSD Rename VERSION -> VERSION.txt
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.2.40 [ 26027 ]
          Fix Version/s 10.3.31 [ 26028 ]
          Fix Version/s 10.4.21 [ 26030 ]
          Fix Version/s 10.5.12 [ 26025 ]
          Fix Version/s 10.6.4 [ 26033 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          brad0 Brad Smith added a comment -

          Thanks. With 10.6.4 out we're now shipping Mroonga with our port / package in -current.

          brad0 Brad Smith added a comment - Thanks. With 10.6.4 out we're now shipping Mroonga with our port / package in -current.
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 67051 ] MariaDB v4 [ 148547 ]

          People

            serg Sergei Golubchik
            brad0 Brad Smith
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.