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

Fails to compile on platforms that require libatomic

Details

    Attachments

      Issue Links

        Activity

          Ok, some progress finally with the AIX build. This commit: https://github.com/MariaDB/server/pull/1515/commits/fc1884e45fb209e639636292ed4e9a326a015f63 makes the libatomic check unnecessary.

          What I've discovered is by default, AIX compiler builds 32 bit apps, which don't have __sync_xxx_8 methods, which leads to compilation failure. Setting -maix64 will make the process succeed.

          cvicentiu Vicențiu Ciorbaru added a comment - Ok, some progress finally with the AIX build. This commit: https://github.com/MariaDB/server/pull/1515/commits/fc1884e45fb209e639636292ed4e9a326a015f63 makes the libatomic check unnecessary. What I've discovered is by default, AIX compiler builds 32 bit apps, which don't have __sync_xxx_8 methods, which leads to compilation failure. Setting -maix64 will make the process succeed.
          cvicentiu Vicențiu Ciorbaru added a comment - - edited

          The patch that is now in debian should however be incorporated into MariaDB, as it solved a compilation failure for mips.

          cvicentiu Vicențiu Ciorbaru added a comment - - edited The patch that is now in debian should however be incorporated into MariaDB, as it solved a compilation failure for mips.

          Perhaps related failure on risc64:

          [ 78%] Building CXX object storage/mroonga/CMakeFiles/mroonga.dir/lib/mrn_column_name.cpp.o
          cd "/<<PKGBUILDDIR>>/builddir/storage/mroonga" && /usr/bin/riscv64-linux-gnu-g++  -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -D_FILE_OFFSET_BITS=64 -Dmroonga_EXPORTS -I"/<<PKGBUILDDIR>>/wsrep-lib/include" -I"/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26" -I"/<<PKGBUILDDIR>>/builddir/include" -I"/<<PKGBUILDDIR>>/builddir/storage/mroonga" -I"/<<PKGBUILDDIR>>/storage/mroonga" -I"/<<PKGBUILDDIR>>/storage/mroonga/lib" -I"/<<PKGBUILDDIR>>/include" -I"/<<PKGBUILDDIR>>/sql" -I"/<<PKGBUILDDIR>>/regex" -I"/<<PKGBUILDDIR>>" -I"/<<PKGBUILDDIR>>/storage/mroonga/vendor/groonga/include"  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -fPIC   -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -o CMakeFiles/mroonga.dir/lib/mrn_column_name.cpp.o -c "/<<PKGBUILDDIR>>/storage/mroonga/lib/mrn_column_name.cpp"
          /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function `rocksdb::SpinMutex::lock()':
          ./builddir/storage/rocksdb/./storage/rocksdb/rocksdb/util/mutexlock.h:117: undefined reference to `__atomic_compare_exchange_1'
          /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function `std::__atomic_base<bool>::compare_exchange_weak(bool&, bool, std::memory_order, std::memory_order)':
          /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1'
          /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1'
          /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1'
          /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1'
          /usr/bin/ld: librocksdblib.a(memtable.cc.o):/usr/include/c++/9/bits/atomic_base.h:457: more undefined references to `__atomic_compare_exchange_1' follow
          collect2: error: ld returned 1 exit status
          

          Full log at https://launchpadlibrarian.net/510328436/buildlog_ubuntu-focal-riscv64.mariadb-10.5_1%3A10.5.0~ubuntu20.04.1~1607367090.7c53006b6a1+10.5_BUILDING.txt.gz

          otto Otto Kekäläinen added a comment - Perhaps related failure on risc64: [ 78%] Building CXX object storage/mroonga/CMakeFiles/mroonga.dir/lib/mrn_column_name.cpp.o cd "/<<PKGBUILDDIR>>/builddir/storage/mroonga" && /usr/bin/riscv64-linux-gnu-g++ -DDBUG_TRACE -DHAVE_CONFIG_H -DMRN_GROONGA_EMBEDDED -DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED -DMYSQL_DYNAMIC_PLUGIN -DWITH_GROONGA_NORMALIZER_MYSQL=1 -D_FILE_OFFSET_BITS=64 -Dmroonga_EXPORTS -I"/<<PKGBUILDDIR>>/wsrep-lib/include" -I"/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26" -I"/<<PKGBUILDDIR>>/builddir/include" -I"/<<PKGBUILDDIR>>/builddir/storage/mroonga" -I"/<<PKGBUILDDIR>>/storage/mroonga" -I"/<<PKGBUILDDIR>>/storage/mroonga/lib" -I"/<<PKGBUILDDIR>>/include" -I"/<<PKGBUILDDIR>>/sql" -I"/<<PKGBUILDDIR>>/regex" -I"/<<PKGBUILDDIR>>" -I"/<<PKGBUILDDIR>>/storage/mroonga/vendor/groonga/include" -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -fPIC -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -o CMakeFiles/mroonga.dir/lib/mrn_column_name.cpp.o -c "/<<PKGBUILDDIR>>/storage/mroonga/lib/mrn_column_name.cpp" /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function `rocksdb::SpinMutex::lock()': ./builddir/storage/rocksdb/./storage/rocksdb/rocksdb/util/mutexlock.h:117: undefined reference to `__atomic_compare_exchange_1' /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function `std::__atomic_base<bool>::compare_exchange_weak(bool&, bool, std::memory_order, std::memory_order)': /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1' /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1' /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1' /usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:457: undefined reference to `__atomic_compare_exchange_1' /usr/bin/ld: librocksdblib.a(memtable.cc.o):/usr/include/c++/9/bits/atomic_base.h:457: more undefined references to `__atomic_compare_exchange_1' follow collect2: error: ld returned 1 exit status Full log at https://launchpadlibrarian.net/510328436/buildlog_ubuntu-focal-riscv64.mariadb-10.5_1%3A10.5.0~ubuntu20.04.1~1607367090.7c53006b6a1+10.5_BUILDING.txt.gz
          otto Otto Kekäläinen added a comment - Related: https://github.com/MariaDB/server/pull/1716 https://github.com/MariaDB/server/pull/1717
          danblack Daniel Black added a comment -

          AIX adding -pthread to cflags is largely the same effect as #1717 so it sounds like the right way to go.

          danblack Daniel Black added a comment - AIX adding -pthread to cflags is largely the same effect as #1717 so it sounds like the right way to go.
          danblack Daniel Black added a comment -

          pthread pushed to 10.3

          Will process https://github.com/MariaDB/server/pull/1716 the libatomic bit next.

          danblack Daniel Black added a comment - pthread pushed to 10.3 Will process https://github.com/MariaDB/server/pull/1716 the libatomic bit next.

          People

            cvicentiu Vicențiu Ciorbaru
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            6 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.