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

Problem while linking libavrorouter.so

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2.5, 2.2.15
    • 2.3.4
    • avrorouter, build
    • None
    • Ubuntu 14.04.5 LTS, Fedora 27

    Description

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

      ...
      [ 41%] Building C object server/modules/routing/avrorouter/CMakeFiles/avrorouter.dir/avro_file.c.o
      [ 42%] Building C object server/modules/routing/avrorouter/CMakeFiles/avrorouter.dir/avro_index.c.o
      [ 42%] Linking C shared library libavrorouter.so
      /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libavro.a(codec.o): In function `encode_snappy':
      codec.c:(.text+0x18f): undefined reference to `snappy_max_compressed_length'
      codec.c:(.text+0x28c): undefined reference to `snappy_compress'
      /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libavro.a(codec.o): In function `decode_snappy':
      codec.c:(.text+0x329): undefined reference to `snappy_uncompressed_length'
      codec.c:(.text+0x437): undefined reference to `snappy_uncompress'
      collect2: error: ld returned 1 exit status
      make[2]: *** [server/modules/routing/avrorouter/libavrorouter.so.1.0.0] Error 1
      make[1]: *** [server/modules/routing/avrorouter/CMakeFiles/avrorouter.dir/all] Error 2
      make: *** [all] Error 2
      

      I've executed the following according to the history:

      openxs@ao756:~/git/MaxScale/build$ fc -l
      ...
      1986     sudo apt-get update
      1987     sudo apt-get upgrade
      1988     cd git/MaxScale/
      1989     git pull
      1990     cd build/
      ...
      1994     sudo rm -rf *
      1995     ../BUILD/install_build_deps.sh
      1996     cmake .. -DCMAKE_INSTALL_PREFIX=/usr
      1997     time make
      

      Some details about the environment:

      openxs@ao756:~/git/MaxScale/build$ cd ..
      openxs@ao756:~/git/MaxScale$ git branch
        2.0
      * 2.2
      openxs@ao756:~/git/MaxScale$ git log -1
      commit 9291815bcd5081bbc1a055f2aa97475e19c363f8
      Author: Markus Mцєkelцє <markus.makela@mariadb.com>
      Date:   Sat Mar 31 20:21:24 2018 +0300
       
          Wait for monitor to start in mxs1719
       
          The test starts MaxScale and immediately connects to it. As the monitoring
          is asynchronous, we need to give it a few seconds to stabilize.
      openxs@ao756:~/git/MaxScale$ cat /etc/issue
      Ubuntu 14.04.5 LTS \n \l
       
      openxs@ao756:~/git/MaxScale$ uname -a
      Linux ao756 3.13.0-123-generic #172-Ubuntu SMP Mon Jun 26 18:04:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
      openxs@ao756:~/git/MaxScale/build$ dpkg -l | grep snappy
      ii  libsnappy-dev                                         1.1.0-1ubuntu1                                      amd64        fast compression/decompression library (development files)
      ii  libsnappy1                                            1.1.0-1ubuntu1                                      amd64        fast compression/decompression library
      openxs@ao756:~/git/MaxScale/build$
      

      I tried to follow https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-building-mariadb-maxscale-from-source-code/

      What am I doing wrong?

      Attachments

        Activity

          People

            markus makela markus makela
            valerii Valerii Kravchuk
            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.