LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-31-2010, 09:59 AM   #1
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Rep: Reputation: 42
src2pkg and mysql


Getting a strange problem in the fake install section ( creating content in JAIL root ) of mysql:

Quote:
make[1]: Leaving directory `/tmp/mysql-5.1.47-src-1/scripts'
Making install in strings
make[1]: Entering directory `/tmp/mysql-5.1.47-src-1/strings'
make[2]: Entering directory `/tmp/mysql-5.1.47-src-1/strings'
test -z "/opt/mysql/lib/mysql" || /usr/libexec/src2pkg/bin/mkdir -p "/opt/mysql/lib/mysql"
/usr/libexec/src2pkg/bin/ginstall -c -m 644 'libmystrings.a' '/opt/mysql/lib/mysql/libmystrings.a'
ranlib '/opt/mysql/lib/mysql/libmystrings.a'
ranlib: could not create temporary file whilst writing archive: No more archived files
make[2]: *** [install-pkglibLIBRARIES] Error 1
make[2]: Leaving directory `/tmp/mysql-5.1.47-src-1/strings'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/tmp/mysql-5.1.47-src-1/strings'
make: *** [install-recursive] Error 1
Safe content creation - Successful!
Processing package content:
Correcting package permissions - Done
Stripping static archives - Using: strip -p --strip-debug Done
Checking for standard documents - Done
Found 'rc.*.new' file in CWD - Copying to PKG_DIR/etc/rc.d
NOTICE - No man-pages installed by Makefile
Found man-pages in SRC_DIR - Installing in PKG_DIR
Compressing man pages - Done
Verified slack-desc found - Inserting in package as PKG_DIR/install/slack-desc
Found doinst.sh in CWD - Inserting in the package directory
Rechecking package correctness -
Checking for misplaced dirs - Done
Rechecking package permissions -
Notice - Found directories with unusual owner, group or permissions:
750 mysql:mysql opt/mysql/var

Notice - Found files with unusual owner, group or permissions:
775 root:root etc/rc.d/mysql.server
Notice - These files and/or directories are listed for information only.
Corrections may not be needed, but you should check them to be sure.
Creating package: mysql-5.1.47-x86_64-1.txz
The strange thing is the package is still created even though the whole install is not done. As a result there are quite a few missing files. Std configure/make/make install works correctly.

I originally thought the machine was running out of disk space but that doesn't seem to be the issue. I did some googling and came across the possibility that this was permissions but I'm doing this as root so it should be ok.

I also saw that I didn't have -fPIC for a flag but added that and same problem. Any assistance appreciated.

Regards, Robby
 
Old 05-31-2010, 04:29 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Standard configure is ( from mysql.Slackbuild '13.1') :
Code:
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --with-mysqld-user=mysql \
  --with-unix-socket-path=/var/run/mysql/mysql.sock \
  --localstatedir=/var/lib/mysql \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --enable-assembler \
  --without-debug \
  --enable-thread-safe-client \
  --with-extra-charsets=complex \
  --with-ssl=/usr \
  --enable-largefile \
  --with-innodb \
  --with-readline \
  --build=$ARCH-slackware-linux
ftp://ftp.slackware.org.uk/slackware...urce/ap/mysql/
Use all the files. Replace mysql-5.1.46.tar.xz with mysql-5.1.47.tar.*z*

# 'sh mysql.Slackbuild' will build mysql-5.1.47-i486-2.txz
.....
 
Old 06-01-2010, 01:39 AM   #3
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Thanks for the reply knudfl, however I'm trying to solve the problem above building mysql with src2pkg. I know I can build mysql with the slackbuild but that is not my aim. Do you have any ideas on this error?

Quote:
ranlib '/opt/mysql/lib/mysql/libmystrings.a'
ranlib: could not create temporary file whilst writing archive: No more archived files
Regards, Robby
 
Old 06-01-2010, 04:24 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
First, try the build using -DEST or -UNION option and see if you still get that error.
 
Old 06-01-2010, 04:00 PM   #5
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Thanks Gilbert, I've been trying with UNION now and it seems to have sorted out the issue and packaged the app properly this time. The only problem now is post install with mysql_install_db not being able to install the system dbs but I think that may just be a perms issue. I'll do some testing with DEST as well just to see what happens there. Thanks for all your help.
 
Old 06-02-2010, 01:41 AM   #6
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Ok I've tried all methods now ( except REAL ) and I seem to get the best results with UNION. At least here everything seems to be packaged. Under all circumstances though, mysql_install_db seems to not install the system dbs correctly afterwards with differing results. Some errors are definitely perms issues however the following errors seems to be something else:

Quote:
Install Default DBs
Installing MySQL system tables...
OK
Filling help tables...
ERROR: 1034 Incorrect key file for table 'help_keyword'; try to repair it
100602 0:52:35 [ERROR] Aborting

100602 0:52:35 [Note] /opt/mysql/libexec/mysqld: Shutdown complete
Even my old compile script seems to be giving this issue above ( with the help files ). Using Pat's slackbuild, I don't get any problems with the db install stage. Doing some more testing ...
 
Old 06-02-2010, 07:26 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
See if any of this helps -my mysql.src2pkg script:
Code:
#!/bin/bash
## src2pkg script for: 	mysql
## src2pkg Copyright 2005-2007 Gilbert Ashley <amigo@ibilio.org>
# Adapted from the mysql.SlackBuild by David Cantrell <david@slackware.com>

SOURCE_NAME='mysql-5.0.51.tar.gz'
NAME='mysql'
VERSION='5.0.51'
ARCH='i486'
BUILD='1'
PRE_FIX='/usr'
# Any extra options go here
EXTRA_CONFIGS='--with-mysqld-user=mysql --with-unix-socket-path=/var/run/mysql/mysql.sock \
	--localstatedir=/var/lib/mysql --with-extra-charsets=complex --without-debug \
	--without-bench --sysconfdir=/etc/mysql --enable-assembler --libexecdir=/usr/sbin \
	--enable-static --with-zlib=/usr/lib --with-openssl=/etc/ssl \
	--with-openssl-includes=/usr/include --with-openssl-libs=/usr/lib \
	--with-big-tables --with-example-storage-engine \
	--with-archive-storage-engine --with-blackhole-storage-engine \
	--enable-thread-safe-client'
	
STD_FLAGS='-O2 -funroll-loops -fomit-frame-pointer -march=i486 -mtune=i686'

DOCLIST='COPYING MIRRORS README ChangeLog Docs/INSTALL-BINARY '
# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# do_all_processes can substitute these 16 steps:

pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source
compile_source
fake_install

# most of this manual code comes from the SlackBuild for mysql by David Cantrell

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

mkdir -p $PKG_DIR/etc/mysql
( cd $SRC_DIR/support-files
  cp my-huge.cnf my-large.cnf my-medium.cnf my-small.cnf $PKG/etc/mysql )

# this is the directory where databases are stored
mkdir -p $PKG_DIR/var/lib/mysql
chown mysql.mysql $PKG_DIR/var/lib/mysql
chmod 750 $PKG_DIR/var/lib/mysql

# this is where the socket is stored
mkdir -p $PKG_DIR/var/run/mysql
chown mysql.mysql $PKG_DIR/var/run/mysql
chmod 755 $PKG_DIR/var/run/mysql

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

# Add some handy library symlinks:
if [ -r $PKG_DIR/usr/lib/mysql/libmysqlclient.so.15 ]; then
  ( cd $PKG_DIR/usr/lib
    rm -f libmysqlclient.so libmysqlclient.so.15
    ln -sf mysql/libmysqlclient.so .
    ln -sf mysql/libmysqlclient.so.15 .
  )
fi
if [ -r $PKG_DIR/usr/lib/mysql/libmysqlclient_r.so.15 ]; then
  ( cd $PKG_DIR/usr/lib
    rm -f libmysqlclient_r.so libmysqlclient_r.so.15
    ln -sf mysql/libmysqlclient_r.so .
    ln -sf mysql/libmysqlclient_r.so.15 .
  )
fi

fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process
 
Old 06-02-2010, 12:54 PM   #8
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Sorry no go on that - I think it's something in the newer 5.1.x mysql that might cause this. After about 50 attempts I've just decided to go with the slackbuild to save some time. Appreciate your help.
 
  


Reply



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
[ANNOUNCE] src2pkg-2.0 and src2pkg-ng-0.0.1 gnashley Slackware 11 12-21-2009 11:41 AM
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration