LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices

Reply
 
Search this Thread
Old 12-29-2013, 03:52 AM   #1
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 190

Rep: Reputation: 9
mysql on slackware arm


I wanted to install mysql on my slackware arm 14.1 but I noticed that there is no shuch package for the 14.1 release but 14.0 still has it.

What happened ? mariadb replaces mysql ?

But I'm building zoneminder and it's requireing mysqlclient and that's not packaged even for 14.0!
It's actually looking for :
configure.ac:AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))

I had a look at the sources but I couldn't figure out how to build it.
I tried building from scract (to see if it get's built anyway) but that's failing too (make[1]: *** [libmysql/CMakeFiles/clientlib.dir/rule] Error 2)
Any idea how to work around the problem ?

Last edited by louigi600; 12-29-2013 at 08:13 AM.
 
Old 12-29-2013, 04:46 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 162

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by louigi600 View Post
I wanted to install mysql on my slackware arm 14.1 but I noticed that there is no shuch package for the 14.1 release but 14.0 still has it.

What happened ? mariadb replaces mysql ?
Yes - it was replaced about 8 months before the release of 14.1.
See the announcement on www.slackware.com
 
Old 12-29-2013, 09:48 AM   #3
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 190

Original Poster
Rep: Reputation: 9
Ok ... but how do I solve other software looking for libmysqlclient.a ?
Should I wait untill zoneminder ditributes something that has mariadb as default db ?
 
Old 12-29-2013, 12:54 PM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 162

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by louigi600 View Post
Ok ... but how do I solve other software looking for libmysqlclient.a ?
Should I wait untill zoneminder ditributes something that has mariadb as default db ?
MariaDB provies this static library, but mariadb.SlackBuild removes it as it enlarges the package unnecessarily.
If you really need this, you can edit mariadb.SlackBuild and rebuild mariadb.
 
Old 01-01-2014, 02:10 AM   #5
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 190

Original Poster
Rep: Reputation: 9
I'm trying that by using the build scripts as hint to build it manually ... but I get this error when i make:
Code:
root@nas:/usr/src/mariadb/mariadb-5.5.32/build# make
[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  0%] Built target abi_check
[  3%] Built target readline
[  3%] Building C object unittest/mytap/CMakeFiles/mytap.dir/tap.c.o
In file included from /usr/src/mariadb/mariadb-5.5.32/unittest/mytap/tap.h:23:0,
                 from /usr/src/mariadb/mariadb-5.5.32/unittest/mytap/tap.c:21:
/usr/src/mariadb/mariadb-5.5.32/include/my_global.h:831:22: error: static declaration of 'log2' follows non-static declaration
 static inline double log2(double x)
                      ^
make[2]: *** [unittest/mytap/CMakeFiles/mytap.dir/tap.c.o] Error 1
make[1]: *** [unittest/mytap/CMakeFiles/mytap.dir/all] Error 2
make: *** [all] Error 2
root@nas:/usr/src/mariadb/mariadb-5.5.32/build#
Previously cmake went fine withe these options:
Code:
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
  -DBUILD_CONFIG=mysql_release \
  -DFEATURE_SET="community" \
  -DINSTALL_LAYOUT="RPM" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
  -DINSTALL_SBINDIR=libexec \
  -DINSTALL_INCLUDEDIR=include/mysql \
  -DINSTALL_MYSQLSHAREDIR=share/mysql \
  -DINSTALL_SQLBENCHDIR= \
  -DINSTALL_MYSQLTESTDIR=mysql-test \
  -DINSTALL_MANDIR=man \
  -DINSTALL_PLUGINDIR="lib${LIBDIRSUFFIX}/mysql/plugin" \
  -DINSTALL_SCRIPTDIR=bin \
  -DINSTALL_SUPPORTFILESDIR=share/mysql \
  -DINSTALL_MYSQLDATADIR="/var/lib/mysql" \
  -DINSTALL_DOCREADMEDIR="doc/mariadb-5.5.32" \
  -DINSTALL_DOCDIR="doc/mariadb-5.5.32" \
  -DMYSQL_DATADIR="/var/lib/mysql" \
  -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" \
  -DWITH_EXTRA_CHARSETS=complex \
  -DWITH_INNOBASE_STORAGE_ENGINE=1 \
  -DWITH_READLINE=ON \
  -DWITH_SSL=system \
  -DWITH_ZLIB=system \
  -DUSE_ARIA_FOR_TMP_TABLES=ON \
  -DMANUFACTURER="Slackware" \
  ..
did I miss some dependencies, do I still have some broken links in some packages or what ?
 
Old 01-01-2014, 09:27 AM   #6
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 40

Rep: Reputation: 14
Quote:
Originally Posted by louigi600 View Post
did I miss some dependencies, do I still have some broken links in some packages or what ?
Louigi... the easiest thing to do is use the mariadb.SlackBuild script to build a Slackware ARM package. Then you can simply install the mariadb package. I did this using a RPi running Slackware ARM 14.1 to compile on and it works perfectly for me. This is what I did...

Code:
root@linux:/# cd /tmp
root@linux:/tmp# wget http://slackbuilds.org/slackbuilds/14.0/system/mariadb.tar.gz
root@linux:/tmp# tar -zxvf mariadb.tar.gz
root@linux:/tmp# cd mariadb/
root@linux:/tmp/mariadb# chmod a+x mariadb.SlackBuild
... and then I edited the VERSION= value within the mariadb.SlackBuild script (5.5.34 - the latest version), and modified the script a little to automatically download the source version tar.gz (if it isn't already present) and make a MD5 checksum for the newly created mariadb package file. Here's the code I used...

Code:
#!/bin/sh

# Copyright 2008, 2009, 2010, 2012  Patrick J. Volkerding, Sebeka, Minnesota, USA
# Copyright 2011-2012  Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Build and install MySQL on Slackware
# by:  David Cantrell <david@slackware.com>
# MySQL version maintained by:  Patrick Volkerding <volkerdi@slackware.com>
# MariaDB version maintained by:  Heinz Wiesinger <pprkut@liwjatan.at>

PRGNAM=mariadb
VERSION=5.5.34
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

echo " "
echo "########################################"
echo "#### $PRGNAM.SlackBuild"
echo "#### Version: $VERSION"
echo "########################################"
echo " "

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ ! -f "$CWD/$PRGNAM-$VERSION.tar.gz" ]; then
  wget https://downloads.mariadb.org/interstitial/$PRGNAM-$VERSION/kvm-tarbake-jaunty-x86/$PRGNAM-$VERSION.tar.gz/from/http://mirrors.coreix.net/mariadb -O $PRGNAM-$VERSION.tar.gz || exit 1
fi

if [ "${EMBEDDED:-no}" = "no" ]; then
  embed="OFF"
else
  embed="ON"
fi

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
elif [ "$ARCH" = "arm" ]; then
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

mkdir build
cd build
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
  -DBUILD_CONFIG=mysql_release \
  -DFEATURE_SET="community" \
  -DINSTALL_LAYOUT="RPM" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
  -DINSTALL_SBINDIR=libexec \
  -DINSTALL_INCLUDEDIR=include/mysql \
  -DINSTALL_MYSQLSHAREDIR=share/mysql \
  -DINSTALL_SQLBENCHDIR= \
  -DINSTALL_MYSQLTESTDIR=mysql-test \
  -DINSTALL_MANDIR=man \
  -DINSTALL_PLUGINDIR="lib${LIBDIRSUFFIX}/mysql/plugin" \
  -DINSTALL_SCRIPTDIR=bin \
  -DINSTALL_SUPPORTFILESDIR=share/mysql \
  -DINSTALL_MYSQLDATADIR="/var/lib/mysql" \
  -DINSTALL_DOCREADMEDIR="doc/$PRGNAM-$VERSION" \
  -DINSTALL_DOCDIR="doc/$PRGNAM-$VERSION" \
  -DMYSQL_DATADIR="/var/lib/mysql" \
  -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" \
  -DWITH_EXTRA_CHARSETS=complex \
  -DENABLED_LOCAL_INFILE=ON \
  -DWITH_EMBEDDED_SERVER=$embed \
  -DWITH_READLINE=ON \
  -DWITH_SSL=system \
  -DWITH_ZLIB=system \
  -DUSE_ARIA_FOR_TMP_TABLES=ON \
  -DMANUFACTURER="Slackware" \
  ..

make
make install DESTDIR=$PKG

# Leave build directory:
cd ..

# remove static client libraries
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient.a
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient_r.a
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqld.a

# The ./configure option to omit this has gone away, so we'll omit it
# the old-fashioned way.  It's all in the source tarball if you need it.
rm -rf $PKG/usr/sql-bench

# Do not include the test suite:
rm -rf $PKG/usr/mysql-test

# This is the directory where databases are stored
mkdir -p $PKG/var/lib/mysql
chown mysql.mysql $PKG/var/lib/mysql
chmod 0750 $PKG/var/lib/mysql

# This is where the socket is stored
mkdir -p $PKG/var/run/mysql
chown mysql.mysql $PKG/var/run/mysql
chmod 0755 $PKG/var/run/mysql

# Add init script:
mkdir -p $PKG/etc/rc.d
# This is intentionally chmod 644.
cat $CWD/rc.mysqld > $PKG/etc/rc.d/rc.mysqld.new
rm -rf $PKG/etc/init.d

# Install mysqlaccess.conf
install -m 644 scripts/mysqlaccess.conf $PKG/etc/mysqlaccess.conf.new

# Mark config files under /etc as .new
mv $PKG/etc/my.cnf $PKG/etc/my.cnf.new
mv $PKG/etc/logrotate.d/mysql $PKG/etc/logrotate.d/mysql.new
for i in client mysql-clients server; do
  mv $PKG/etc/my.cnf.d/$i.cnf $PKG/etc/my.cnf.d/$i.cnf.new
done

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
/bin/md5sum $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} > $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}.md5

echo " "
echo "$PRGNAM.SlackBuild $VERSION ... Done: $(date '+%d %b %Y %R:%S')"

exit 0
If you need the libmysqlclient libraries including just #comment out the following section, as drmozes suggested, before you run this script...

Code:
# remove static client libraries
#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient.a
#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient_r.a
#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqld.a
To build the package just run the script...

Code:
root@linux:/tmp/mariadb# ./mariadb.SlackBuild
When the package has been built it's put in the /tmp/ dir. Now it's very easy to install...

Code:
root@linux:/tmp/mariadb# cd ../
root@linux:/tmp/# installpkg mariadb-5.5.34-arm-1_SBo.tgz
There you have it.

Last edited by Penthux; 01-01-2014 at 09:29 AM. Reason: typo URL
 
Old 01-01-2014, 01:46 PM   #7
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 190

Original Poster
Rep: Reputation: 9
I build clashNG with stripped down versions of the slackbuild scripts ... I'm sure there's some other odd thing that is probably related to the trouble I had adding packages to the chroot build system. After all I'm using almost the exact same cmake options to configure it.
I went as far as reinstalling every package that was not on the miniroot the build system came from just to make sure I had no more broken links ... but I was still getting
/usr/src/mariadb/mariadb-5.5.32/include/my_global.h:831:22: error: static declaration of 'log2' follows non-static declaration
static inline double log2(double x)

even if I did the exact same setup as per the build scripts.

I decided to give the latest version a go and sure enough it's now 32% into the build (and hoping it will finis OK).
The odd thing is that Stuart builds 5.5.32 for slackware arm 14.1 without any patches.

Last edited by louigi600; 01-01-2014 at 07:27 PM.
 
Old 01-01-2014, 11:44 PM   #8
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 190

Original Poster
Rep: Reputation: 9
Hum ... I suspect that my GoFlexNet can't compile that with the resources it has (128Mib ram and no swap):
[ 62%] Building CXX object sql/CMakeFiles/sql.dir/sql_parse.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [sql/CMakeFiles/sql.dir/sql_parse.cc.o] Error 4
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2
root@nas:/usr/src/mariadb/mariadb-5.5.34#

But at least I was able to build the libmysqlclient
I'm tempted to get a Trimslice or a Matrix mini pc for doing this sort of thing native.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation of bareos on arm-architecture: Missing MySQL-Header/Libs triztan Programming 0 09-21-2013 04:46 AM
The Slackware ARM Question of the day: why xf86-video-s3-0.6.5-arm-4.tgz ?!? Darth Vader Slackware 2 09-15-2013 09:23 PM
does any body compiled MySql for embedded arm linux systems golden_boy615 Linux - Software 1 05-10-2011 07:57 PM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration