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

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

          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.