[MXS-695] MaxScale does not build on Debian 8 following build from source instructions Created: 2016-04-26  Updated: 2016-05-31  Resolved: 2016-05-31

Status: Closed
Project: MariaDB MaxScale
Component/s: build
Affects Version/s: 1.4.1
Fix Version/s: 2.0.0

Type: Bug Priority: Major
Reporter: martin brampton (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian 8.3


Sprint: 2016-10

 Description   

Fails to build with the default MaxScale code, but this is the develop branch. The default branch should be master.

With master branch selected, cmake fails:

– RabbitMQ library not found.
– Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.1k")
– Valgrind not found.
– Dynamic MySQL client library not found.
– Static MySQL client library not found.
CMake Error at cmake/FindMySQL.cmake:11 (message):
Cannot find the mysql_version.h header
Call Stack (most recent call first):
CMakeLists.txt:37 (find_package)

– Configuring incomplete, errors occurred!
See also "/root/MaxScale/build/CMakeFiles/CMakeOutput.log".
See also "/root/MaxScale/build/CMakeFiles/CMakeError.log".

Command used for cmake:
cmake .. -DMYSQL_EMBEDDED_INCLUDE_DIR=/root/mariadb-10.0.24-linux-x86_64/include/mysql -DMYSQL_EMBEDDED_LIBRARIES=/root/mariadb-10.0.24-linux-x86_64/lib/libmysqld.a -DERRMSG=/root/mariadb-10.0.24-linux-x86_64/share/english/errmsg.sys -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=Y

Unclear why mysql_version.h cannot be found, as it is shown to be at:
root@debian8:~/MaxScale/build# locate mysql_version.h
/root/mariadb-10.0.24-linux-x86_64/include/mysql/mysql_version.h

which is the given include directory.



 Comments   
Comment by Timofey Turenko [ 2016-04-27 ]

Debian build script https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/build_deb_local.sh

Packages to be installed before build:
dpkg-dev git
cmake
gcc g++ ncurses-dev bison build-essential libssl-dev libaio-dev perl make libtool
libcurl4-openssl-dev
libpcre3-dev
flex
tcl
libeditline-dev
uuid-dev

Rabbit-mq toi be built from source:
mkdir rabbit
cd rabbit
git clone https://github.com/alanxz/rabbitmq-c.git
cd rabbitmq-c
git checkout v0.7.1
cmake . -DCMAKE_C_FLAGS=-fPIC -DBUILD_SHARED_LIBS=N -DCMAKE_INSTALL_PREFIX=/usr
sudo make install

MariaDB library goes from tarball:

  • download tarball from mariadb.org (script dowloads it from our Jenkins server to accelerate the process)
  • unpack:
    sudo tar xzvf $mariadbd_file -C /usr/ --strip-components=1

build process:

mkdir _build
cd _build
cmake .. $cmake_flags -DERRMSG=/usr/share/english/errmsg.sys -DMYSQL_EMBEDDED_LIBRARIES=/usr/lib/
export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier
make
export LD_LIBRARY_PATH=$(for i in `find $PWD/ -name '.so'`; do echo $(dirname $i); done|sort|uniq|xargs|sed -e 's/[[:space:]]/:/g')
make package

Markus, could you please check and update documentation?

Comment by markus makela [ 2016-05-31 ]

Build instructions updated.

Generated at Thu Feb 08 04:01:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.