Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-114

mariadbclient.lib doesn't have all symbols.

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Visual studio 2010 on Windows 8 Cmake version-2.8.11.2.

    Description

      First Compilation fails on my setup for mariadbclient revision 160 using Cmake .
      If I making following changes, mariadbclient compiles fine-
      In /include/my_global.h -
      change
      " #ifndef _SIZE_T_DEFINED
      typedef SSIZE_T ssize_t;
      #endif"
      to
      " #ifdef _SIZE_T_DEFINED
      typedef SSIZE_T ssize_t;
      #endif"
      After building mariadbclient this way I get linking error for some symbols like mysql_client_find_plugin, mysql_client_register_plugin. Specificaly I am getting following error-"error LNK2019: unresolved external symbol "struct st_mysql_client_plugin * __cdecl mysql_client_find_plugin(struct st_mysql *,char const *,int)" (?mysql_client_find_plugin@@YAPAUst_mysql_client_plugin@@PAUst_mysql@@PBDH@Z)"
      I also observed that all other symbols which I use to execute query, connecting to mysql etc are working correctly as before. I face this issue only when I use functions related to plugin

      Attachments

        Issue Links

          Activity

            abhishekpwy Abhishek added a comment -

            This issue is not fixed in revision-166. I am getting same 'external symbol not found' error.

            abhishekpwy Abhishek added a comment - This issue is not fixed in revision-166. I am getting same 'external symbol not found' error.
            georg Georg Richter added a comment -

            I'm not able to reproduce it:

            bzr log -l1
            ------------------------------------------------------------
            revno: 166
            committer: Georg Richter <georg@mariadb.com>
            branch nick: rc1
            timestamp: Thu 2014-11-13 13:54:45 +0100
            message:
              Fix for CONC-114: Windows version of libmariadb doesn't export all symbols

            dumpbin /exports libmariadb.dll | findstr plugin
                 34   21 00001370 mysql_client_find_plugin = @ILT+875(_mysql_client_find_plugin@12)
                     35   22 000011DB mysql_client_register_plugin = @ILT+470(_mysql_client_register_plugin@8)
                     98   61 00001712 mysql_load_plugin = @ILT+1805(_mysql_load_plugin)
                     99   62 000012B7 mysql_load_plugin_v = @ILT+690(_mysql_load_plugin_v@20)
             
            dumpbin /exports libmariadb.lib | findstr plugin
                              _mysql_client_find_plugin@12
                              _mysql_client_register_plugin@8
                              _mysql_load_plugin
                              _mysql_load_plugin_v@20
                              _mysql_client_find_plugin@12
                              _mysql_client_register_plugin@8
                              _mysql_load_plugin
                              _mysql_load_plugin_v@20

            Test program (added in rev. 167)

            static int test_conc_114(MYSQL *mysql)
            {
              if (mysql_client_find_plugin(mysql, "foo", 0))
              {
                diag("Null pointer expected");
                return FAIL;
              }
              diag("Error: %s", mysql_error(mysql));
              return OK;
            }

            georg Georg Richter added a comment - I'm not able to reproduce it: bzr log -l1 ------------------------------------------------------------ revno: 166 committer: Georg Richter <georg@mariadb.com> branch nick: rc1 timestamp: Thu 2014-11-13 13:54:45 +0100 message: Fix for CONC-114: Windows version of libmariadb doesn't export all symbols dumpbin /exports libmariadb.dll | findstr plugin 34 21 00001370 mysql_client_find_plugin = @ILT+875(_mysql_client_find_plugin@12) 35 22 000011DB mysql_client_register_plugin = @ILT+470(_mysql_client_register_plugin@8) 98 61 00001712 mysql_load_plugin = @ILT+1805(_mysql_load_plugin) 99 62 000012B7 mysql_load_plugin_v = @ILT+690(_mysql_load_plugin_v@20)   dumpbin /exports libmariadb.lib | findstr plugin _mysql_client_find_plugin@12 _mysql_client_register_plugin@8 _mysql_load_plugin _mysql_load_plugin_v@20 _mysql_client_find_plugin@12 _mysql_client_register_plugin@8 _mysql_load_plugin _mysql_load_plugin_v@20 Test program (added in rev. 167) static int test_conc_114(MYSQL *mysql) { if (mysql_client_find_plugin(mysql, "foo", 0)) { diag("Null pointer expected"); return FAIL; } diag("Error: %s", mysql_error(mysql)); return OK; }
            abhishekpwy Abhishek added a comment -

            In Test program (added in rev. 167)

            static int test_conc_114(MYSQL *mysql)
            {
            if (mysql_client_find_plugin(mysql, "foo", 0))

            { diag("Null pointer expected"); return FAIL; }

            diag("Error: %s", mysql_error(mysql));
            return OK;
            }

            output-
            3>------ Build started: Project: misc, Configuration: Debug Win32 ------
            3> Building Custom Rule E:/MOnyog/Documents/mariadbclient_newrev_12-09-2014/unittest/libmariadb/CMakeLists.txt
            3> CMake does not need to re-run because E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\CMakeFiles\generate.stamp is up-to-date.
            3> misc.c
            3>misc.c(834): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data
            3>misc.c(953): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data
            3>misc.c(976): warning C4013: 'mysql_client_find_plugin' undefined; assuming extern returning int
            3>misc.obj : error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114
            3>E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe : fatal error LNK1120: 1 unresolved externals

            error-
            Error 4 error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.obj misc
            Error 5 error LNK1120: 1 unresolved externals E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe 1 1 misc
            6 IntelliSense: identifier "mysql_client_find_plugin" is undefined e:\monyog\documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.c 976 7 misc

            abhishekpwy Abhishek added a comment - In Test program (added in rev. 167) static int test_conc_114(MYSQL *mysql) { if (mysql_client_find_plugin(mysql, "foo", 0)) { diag("Null pointer expected"); return FAIL; } diag("Error: %s", mysql_error(mysql)); return OK; } output- 3>------ Build started: Project: misc, Configuration: Debug Win32 ------ 3> Building Custom Rule E:/MOnyog/Documents/mariadbclient_newrev_12-09-2014/unittest/libmariadb/CMakeLists.txt 3> CMake does not need to re-run because E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\CMakeFiles\generate.stamp is up-to-date. 3> misc.c 3>misc.c(834): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data 3>misc.c(953): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data 3>misc.c(976): warning C4013: 'mysql_client_find_plugin' undefined; assuming extern returning int 3>misc.obj : error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 3>E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe : fatal error LNK1120: 1 unresolved externals error- Error 4 error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.obj misc Error 5 error LNK1120: 1 unresolved externals E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe 1 1 misc 6 IntelliSense: identifier "mysql_client_find_plugin" is undefined e:\monyog\documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.c 976 7 misc
            georg Georg Richter added a comment -

            Did you branch a new tree from launchpad or did you just pull rev. 167? If latter one, try to remove CMakeCache.txt and run cmake again.

            georg Georg Richter added a comment - Did you branch a new tree from launchpad or did you just pull rev. 167? If latter one, try to remove CMakeCache.txt and run cmake again.
            abhishekpwy Abhishek added a comment -

            I branch a new tree.

            Revision:
            167 revid:georg@mariadb.com-20141209101344-e861a4dj71qja0l1
            Parents:
            166: Fix for CONC-114: Windows version of libmariadb doesn't exp…
            Date:
            12/9/2014 3:43:44 PM
            Committer:
            Georg Richter <georg@mariadb.com>
            Branch:
            mariadb-native-client

            Added test case for conc-114

            abhishekpwy Abhishek added a comment - I branch a new tree. Revision: 167 revid:georg@mariadb.com-20141209101344-e861a4dj71qja0l1 Parents: 166: Fix for CONC-114 : Windows version of libmariadb doesn't exp… Date: 12/9/2014 3:43:44 PM Committer: Georg Richter <georg@mariadb.com> Branch: mariadb-native-client Added test case for conc-114
            georg Georg Richter added a comment -

            my fault: pushed from wrong tree (on linux tree #include <mysql/client_plugin.h>) was missing in misc.c.
            Please do a bzr uncommit and bzr pull to get rev. 167 again.

            This might be also the cause for your problems: In your appllication you need to explicitly include <mysql/client_plugin.h>-

            georg Georg Richter added a comment - my fault: pushed from wrong tree (on linux tree #include <mysql/client_plugin.h>) was missing in misc.c. Please do a bzr uncommit and bzr pull to get rev. 167 again. This might be also the cause for your problems: In your appllication you need to explicitly include <mysql/client_plugin.h>-
            abhishekpwy Abhishek added a comment -

            Revision:
            167 revid:georg@mariadb.com-20141209115509-2e6ryt6v2gd99tb0
            Parents:
            166: Fix for CONC-114: Windows version of libmariadb doesn't exp…
            Date:
            12/9/2014 5:25:09 PM
            Committer:
            Georg Richter <georg@mariadb.com>
            Branch:
            mariadb-native-client

            Added test case for conc-114

            output-
            4>------ Build started: Project: misc, Configuration: Debug Win32 ------
            4> Building Custom Rule E:/MOnyog/Documents/mariadbclient_newrev_12-09-2014/unittest/libmariadb/CMakeLists.txt
            4> CMake does not need to re-run because E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\CMakeFiles\generate.stamp is up-to-date.
            4> misc.c
            4>misc.c(834): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data
            4>misc.c(953): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data
            4>misc.c(976): warning C4013: 'mysql_client_find_plugin' undefined; assuming extern returning int
            4>misc.obj : error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114
            4>E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe : fatal error LNK1120: 1 unresolved externals

            error-
            Error 5 error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.obj misc

            I included <mysql/client_plugin.h> in my application.

            abhishekpwy Abhishek added a comment - Revision: 167 revid:georg@mariadb.com-20141209115509-2e6ryt6v2gd99tb0 Parents: 166: Fix for CONC-114 : Windows version of libmariadb doesn't exp… Date: 12/9/2014 5:25:09 PM Committer: Georg Richter <georg@mariadb.com> Branch: mariadb-native-client Added test case for conc-114 output- 4>------ Build started: Project: misc, Configuration: Debug Win32 ------ 4> Building Custom Rule E:/MOnyog/Documents/mariadbclient_newrev_12-09-2014/unittest/libmariadb/CMakeLists.txt 4> CMake does not need to re-run because E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\CMakeFiles\generate.stamp is up-to-date. 4> misc.c 4>misc.c(834): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data 4>misc.c(953): warning C4244: '=' : conversion from 'my_ulonglong' to 'int', possible loss of data 4>misc.c(976): warning C4013: 'mysql_client_find_plugin' undefined; assuming extern returning int 4>misc.obj : error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 4>E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\Debug\misc.exe : fatal error LNK1120: 1 unresolved externals error- Error 5 error LNK2019: unresolved external symbol _mysql_client_find_plugin referenced in function _test_conc_114 E:\MOnyog\Documents\mariadbclient_newrev_12-09-2014\unittest\libmariadb\misc.obj misc I included <mysql/client_plugin.h> in my application.

            People

              georg Georg Richter
              abhishekpwy Abhishek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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