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

AIX: Unresolved Symbols during linking

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.21
    • 10.2.3
    • Compiling
    • AIX 6.1
      IBM XLC Compiler 13.1.0 with IBM ld
      cmake version 3.3.1
    • 10.1.15

    Description

       
      root@aixbuildhost61: /usr/local/src/mariadb-10.0.21 # cat build.sh
      #!/usr/bin/ksh
       
      export APPATH="/usr/local/itsvbuild/64"
       
      export PATH="$APPATH/bin:$PATH"
      export LIBPATH="$APPATH/lib:/usr/lib:/lib:/opt/freeware/lib64:/opt/freeware/lib"
      export LD_LIBRARY_PATH="$APPATH/lib:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
      export OBJECT_MODE=64
      export CC="xlc_r"
      export CFLAGS="-q64 -qmaxmem=-1 -DNDEBUG -DSYSV -D_AIX -D_AIX64 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O2 -I$APPATH/include -I/opt/freeware/include"
      export CXX="xlC_r"
      export CXXFLAGS=$CFLAGS
      export LDFLAGS="-L$APPATH/lib -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:$APPATH/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 -Wl,-b64 -Wl,-bexpall -Wl,-bnoipath"
       
      gmake clean
      cmake . -DCMAKE_INSTALL_PREFIX=$APPATH -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -DWITH_UNIT_TESTS=OFF"
      gmake
       

      [ 60%] Built target sql
      Scanning dependencies of target explain_filename-t
      [ 60%] Building CXX object unittest/sql/CMakeFiles/explain_filename-t.dir/explain_filename-t.cc.o
      "/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
      [ 60%] Linking CXX executable explain_filename-t
      ld: 0711-317 ERROR: Undefined symbol: .innobase_strnxfrm(const charset_info_st*,const unsigned char*,unsigned long)
      ld: 0711-317 ERROR: Undefined symbol: .trx_sys_file_format_id_to_name(const unsigned long)
      ld: 0711-317 ERROR: Undefined symbol: ib_cursor_insert_row(ib_cursor_t*,ib_tuple_t* const)
      ld: 0711-317 ERROR: Undefined symbol: ib_cursor_update_row(ib_cursor_t*,ib_tuple_t* const,ib_tuple_t* const)
      ld: 0711-317 ERROR: Undefined symbol: ib_tuple_copy(ib_tuple_t*,ib_tuple_t* const)
      ld: 0711-317 ERROR: Undefined symbol: ib_tuple_get_n_cols(ib_tuple_t* const)
      ld: 0711-317 ERROR: Undefined symbol: ib_tuple_get_n_user_cols(ib_tuple_t* const)
      ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
      unittest/sql/CMakeFiles/explain_filename-t.dir/build.make:115: recipe for target 'unittest/sql/explain_filename-t' failed
      gmake[2]: *** [unittest/sql/explain_filename-t] Error 8
      CMakeFiles/Makefile2:1290: recipe for target 'unittest/sql/CMakeFiles/explain_filename-t.dir/all' failed
      gmake[1]: *** [unittest/sql/CMakeFiles/explain_filename-t.dir/all] Error 2
      Makefile:160: recipe for target 'all' failed
      gmake: *** [all] Error 2

      Attachments

        Activity

          johnnyrotten73 Chris added a comment -

          i narrowed down the linking problem, to a c++ name mangling inconsisteny. with a corresponding compiler option (switching to a very old name mangling pattern), the innodb code compiles without modification.

          any hints what could be a possible reason for the "Failing assertion: sync_wait_array == NULL"?

          johnnyrotten73 Chris added a comment - i narrowed down the linking problem, to a c++ name mangling inconsisteny. with a corresponding compiler option (switching to a very old name mangling pattern), the innodb code compiles without modification. any hints what could be a possible reason for the "Failing assertion: sync_wait_array == NULL"?

          Hi, I think that on your case compiler does not initialize global variables as expected.

          jplindst Jan Lindström (Inactive) added a comment - Hi, I think that on your case compiler does not initialize global variables as expected.

          wlad, could you review fix for this bug?

          svoj Sergey Vojtovich added a comment - wlad , could you review fix for this bug?

          Ok to push.

          wlad Vladislav Vaintroub added a comment - Ok to push.

          A bunch of fixes was pushed to 10.2: https://github.com/MariaDB/server/commit/71e11bce34339a69576321d6c40838fa65208dc7

          Since we don't have AIX around, we may have missed some fixes. Feel free to report new bug if compilation still fails.

          svoj Sergey Vojtovich added a comment - A bunch of fixes was pushed to 10.2: https://github.com/MariaDB/server/commit/71e11bce34339a69576321d6c40838fa65208dc7 Since we don't have AIX around, we may have missed some fixes. Feel free to report new bug if compilation still fails.

          People

            wlad Vladislav Vaintroub
            johnnyrotten73 Chris
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.