Home > bash, Linux, MySQL, Slackware > Compile MariaDB 5.5.28 MySQL on Slackware i486-slackware-linux-gcc-3.3.4 with Cmake 2.8.10.1

Compile MariaDB 5.5.28 MySQL on Slackware i486-slackware-linux-gcc-3.3.4 with Cmake 2.8.10.1

1. install Cmake

wget  http://www.cmake.org/files/v2.8/cmake-2.8.10.1.tar.gz
tar xvfz cmake-2.8.10.1.tar.gz
cd cmake-2.8.10.1/
./configure
gmake -j3


2. install libaio

gmake -wget  http://www.kernel.org/pub/linux/kernel/people/bcrl/aio/libaio-0.3.92.tar.gz
tar xvfz libaio-0.3.92.tar.gz
cd libaio-0.3.92/
make prefix=/usr/
make prefix=/usr/ installj3 install

3. install MariaDB 5.5.28
go to https://downloads.mariadb.org/mariadb/5.5.28/ OR

wget https://downloads.mariadb.org/f/mariadb-5.5.28/kvm-tarbake-jaunty-x86/mariadb-5.5.28.tar.gz/from/http:/mariadb.ulak.net.tr/
tar xvf mariadb-5.5.28.tar.gz
cd mariadb-5.5.28/

the build will fail :

root@bubu:[Tue Nov 27 10:15:45]:[/opt/installs/mariadb-5.5.28]$ ./BUILD/compile-pentium-max
testing pentium3 ... ok
+++ /bin/rm -rf configure
+++ /bin/rm -rf CMakeCache.txt CMakeFiles/
+++ path=./BUILD
+++ . ./BUILD/autorun.sh
+++++ dirname ./BUILD/compile-pentium-max
++++ path=./BUILD
++++ cp ./BUILD/cmake_configure.sh ./BUILD/../configure
++++ chmod +x ./BUILD/../configure
+++ CC='ccache gcc'
+++ CFLAGS='-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -mcpu=pentium3 -O3 -fno-omit-frame-pointer -g  '
+++ CXX='ccache g++'
+++ CXXFLAGS='-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-unused-parameter -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentium3 -O3 -fno-omit-frame-pointer -g  '
+++ CXXLDFLAGS=
+++ ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-plugin-aria --with-aria-tmp-tables --with-readline --with-ssl --with-plugins=max --with-embedded-server --with-libevent --enable-local-infile
configure.pl : calling cmake /opt/installs/mariadb-5.5.28  -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DENABLE_ASSEMBLER=1 -DWITH_EXTRA_CHARSETS=complex -DENABLE_THREAD_SAFE_CLIENT=1 -DWITH_BIG_TABLES=1 -DWITH_PLUGIN_ARIA=1 -DWITH_ARIA_TMP_TABLES=1 -DWITH_READLINE=1 -DWITH_SSL=bundled -DWITH_MAX=1 -DWITH_EMBEDDED_SERVER=1 -DWITH_LIBEVENT=1 -DENABLE_LOCAL_INFILE=1
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/ccache
-- Check for working C compiler: /usr/bin/ccache -- broken
CMake Error at /usr/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/ccache" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/gmake "cmTryCompileExec591660954/fast"

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec591660954.dir/build.make
  CMakeFiles/cmTryCompileExec591660954.dir/build

  gmake[1]: Entering directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  /usr/local/bin/cmake -E cmake_progress_report
  /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec591660954.dir/testCCompiler.c.o

  /usr/bin/ccache gcc -Wall -Wextra -Wunused -Wwrite-strings
  -Wno-uninitialized -mcpu=pentium3 -O3 -fno-omit-frame-pointer -g -o
  CMakeFiles/cmTryCompileExec591660954.dir/testCCompiler.c.o -c
  /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp/testCCompiler.c

  cc1: error: unrecognized option `-Wextra'

  gmake[1]: Leaving directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  gmake[1]: *** [CMakeFiles/cmTryCompileExec591660954.dir/testCCompiler.c.o]
  Error 1

  gmake: *** [cmTryCompileExec591660954/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:70 (PROJECT)


-- Configuring incomplete, errors occurred!
+++ gmake -j 6
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 3.3.4
-- Check for working C compiler: /usr/bin/ccache
-- Check for working C compiler: /usr/bin/ccache -- broken
CMake Error at /usr/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/ccache" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/gmake "cmTryCompileExec3386681460/fast"

  gmake[1]: Entering directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3386681460.dir/build.make
  CMakeFiles/cmTryCompileExec3386681460.dir/build

  gmake[2]: Entering directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  /usr/local/bin/cmake -E cmake_progress_report
  /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec3386681460.dir/testCCompiler.c.o

  /usr/bin/ccache gcc -Wall -Wextra -Wunused -Wwrite-strings
  -Wno-uninitialized -mcpu=pentium3 -O3 -fno-omit-frame-pointer -g -o
  CMakeFiles/cmTryCompileExec3386681460.dir/testCCompiler.c.o -c
  /opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp/testCCompiler.c

  cc1: error: unrecognized option `-Wextra'

  gmake[2]: Leaving directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  gmake[2]: *** [CMakeFiles/cmTryCompileExec3386681460.dir/testCCompiler.c.o]
  Error 1

  gmake[1]: Leaving directory
  `/opt/installs/mariadb-5.5.28/CMakeFiles/CMakeTmp'

  gmake[1]: *** [cmTryCompileExec3386681460/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:70 (PROJECT)


-- Configuring incomplete, errors occurred!
gmake: *** [cmake_check_build_system] Error 1

REASON for the fail :
Since you use -Wall to report all warning, the two flags -Wall -Wextra are redundant.
However gcc treat them as errors and stop compiling.

FIX :

## make backup of of the Build script
cp -p    BUILD/SETUP.sh BUILD/SETUP.sh.ORIGINAL

# fix the Wextra issues 
root@bubu:[Tue Nov 27 10:19:41]:[/opt/installs/mariadb-5.5.28]$ sed -i 's/-Wextra//' BUILD/SETUP.sh

# Now run the build again, it will not fail, make sure your home directory has enough space for the ~/.ccache 
root@bubu:[Tue Nov 27 10:21:11]:[/opt/installs/mariadb-5.5.28]$ ./BUILD/compile-pentium-max 

Enjoy Slackware :)

About these ads
Categories: bash, Linux, MySQL, Slackware Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: