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

error LNK2001: unresolved external symbol log_10_int on Windows

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.7
    • 10.4.8
    • Server
    • None
    • Windows

    Description

      When building bundled MariaDB 10.4.7 with latest storage engine Mroonga http://mroonga.org/ , it causes "error LNK2001: unresolved external symbol log_10_int". [1]
      It seems that it requires MYSQL_PLUGIN_IMPORT on Windows.

      Here is the patch to fix this issue.

      diff -ru mariadb-10.4.7.orig/include/my_time.h mariadb-10.4.7/include/my_time.h
      — mariadb-10.4.7.orig/include/my_time.h 2019-07-30 20:32:14.000000000 +0900
      +++ mariadb-10.4.7/include/my_time.h 2019-08-26 08:28:59.857378783 +0900
      @@ -27,7 +27,7 @@

      C_MODE_START

      -extern ulonglong log_10_int[20];
      +extern MYSQL_PLUGIN_IMPORT ulonglong log_10_int[20];
      extern uchar days_in_month[];

      #define MY_TIME_T_MAX LONG_MAX

      [1] build logs on AppVeyor CI https://ci.appveyor.com/project/groonga/mroonga/builds/26925777/job/aneis43usly9jd6c#L5179

      Attachments

        Activity

          How do you build with Mroonga , if mroonga does not build on Windows, i.e it is disabled via CMake.
          kenhys ?

          wlad Vladislav Vaintroub added a comment - How do you build with Mroonga , if mroonga does not build on Windows, i.e it is disabled via CMake. kenhys ?

          Here is the recipe to build latest one. https://github.com/mroonga/mroonga/blob/master/appveyor.yml

          The brief instruction is the following:

          1. remove storage/mroonga and replace it with latest cloned mroonga (https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L51)
          2. exec cmake .. -G "Visual Studio 14 2015 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF -DGRN_WITH_MRUBY=ON for configuration (https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L90)
          3. exec cmake --build . --config RelWithDebInfo (https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L94)

          kenhys Kentaro Hayashi added a comment - Here is the recipe to build latest one. https://github.com/mroonga/mroonga/blob/master/appveyor.yml The brief instruction is the following: 1. remove storage/mroonga and replace it with latest cloned mroonga ( https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L51 ) 2. exec cmake .. -G "Visual Studio 14 2015 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF -DGRN_WITH_MRUBY=ON for configuration ( https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L90 ) 3. exec cmake --build . --config RelWithDebInfo ( https://github.com/mroonga/mroonga/blob/master/appveyor.yml#L94 )

          why would mroonga need this symbol?

          serg Sergei Golubchik added a comment - why would mroonga need this symbol?
          kenhys Kentaro Hayashi added a comment - - edited

          In Mroonga, it seems that log_10_int is indirectly referenced. (maybe, not confident at all)

          1. https://github.com/mroonga/mroonga/blob/master/ha_mroonga.cpp#L12494 uses Field_timestamp_hires
          2. Field_timestamp_hires's constructor call sec_part_shift
          which is defined https://github.com/MariaDB/server/blob/10.4/sql/field.h#L3253.
          3. sec_part_shift uses log_10_int
          https://github.com/MariaDB/server/blob/10.4/include/my_time.h#L221

          kenhys Kentaro Hayashi added a comment - - edited In Mroonga, it seems that log_10_int is indirectly referenced. (maybe, not confident at all) 1. https://github.com/mroonga/mroonga/blob/master/ha_mroonga.cpp#L12494 uses Field_timestamp_hires 2. Field_timestamp_hires's constructor call sec_part_shift which is defined https://github.com/MariaDB/server/blob/10.4/sql/field.h#L3253 . 3. sec_part_shift uses log_10_int https://github.com/MariaDB/server/blob/10.4/include/my_time.h#L221

          People

            wlad Vladislav Vaintroub
            kenhys Kentaro Hayashi
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.