Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4771

Problem while linking libnosqlprotocol.so

    XMLWordPrintable

Details

    Description

      I hit a problem while building current MaxScale 23.02 from GitHub source on Ubuntu 20.04. Every time I get linking error like this:

      Scanning dependencies of target nosqlprotocol
      [ 57%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/clientconnection.cc.o
      [ 57%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/configuration.cc.o
      [ 57%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosql.cc.o
      [ 57%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlbase.cc.o
      [ 57%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlcommand.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlcommands.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlconfig.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlcontext.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlcrypto.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlcursor.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqldatabase.cc.o
      [ 58%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlprotocol.cc.o
      [ 59%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlscram.cc.o
      [ 59%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlupdateoperator.cc.o
      [ 59%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/nosqlusermanager.cc.o
      [ 59%] Building CXX object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/protocolmodule.cc.o
      [ 59%] Building C object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/checksum.c.o
      [ 59%] Building C object server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/crc32-x86.c.o
      [ 59%] Linking CXX shared library libnosqlprotocol.so
      /usr/bin/ld: ../../../../mongo-c-driver/build/src/libmongoc/libmongoc-static-1.0.a(mongoc-compression.c.o): in function `mongoc_compressor_max_compressed_length':
      /home/*/maria/build/mongo-c-driver/src/src/libmongoc/src/mongoc/mongoc-compression.c:45: undefined reference to `snappy_max_compressed_length'
      /usr/bin/ld: ../../../../mongo-c-driver/build/src/libmongoc/libmongoc-static-1.0.a(mongoc-compression.c.o): in function `mongoc_uncompress':
      /home/*/maria/build/mongo-c-driver/src/src/libmongoc/src/mongoc/mongoc-compression.c:161: undefined reference to `snappy_uncompress'
      /usr/bin/ld: ../../../../mongo-c-driver/build/src/libmongoc/libmongoc-static-1.0.a(mongoc-compression.c.o): in function `mongoc_compress':
      /home/*/maria/build/mongo-c-driver/src/src/libmongoc/src/mongoc/mongoc-compression.c:240: undefined reference to `snappy_compress'
      collect2: error: ld returned 1 exit status
      make[2]: *** [server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/build.make:385: server/modules/protocol/NoSQL/libnosqlprotocol.so.1.0.0] Error 1
      make[1]: *** [CMakeFiles/Makefile2:5282: server/modules/protocol/NoSQL/CMakeFiles/nosqlprotocol.dir/all] Error 2
      make: *** [Makefile:141: all] Error 2
      
      

      I followed the steps in Quickstart from Building MariaDB MaxScale from Source Code to install it.

      git clone https://github.com/mariadb-corporation/MaxScale
      mkdir build
      cd build
      ../MaxScale/BUILD/install_build_deps.sh
      cmake ../MaxScale -DCMAKE_INSTALL_PREFIX=/usr
      make
      
      

      Some details about the environment:

      $ uname -a
      Linux * 5.17.0+ #9 SMP Wed Sep 20 22:45:49 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
       
      $ dpkg -l | grep snappy
      ii  libsnappy-dev:arm64                         1.1.8-1build1                                        arm64        fast compression/decompression library (development files)
      ii  libsnappy1v5:arm64                          1.1.8-1build1                                        arm64        fast compression/decompression library
      

      Attachments

        Activity

          People

            markus makela markus makela
            xiaoniu Xiaotong Niu
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.