Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-04-2011, 09:44 PM
|
#1
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Rep:
|
compiling 32bit programs in slackware64
Hi there!
I'm trying to compile avahi, but i need it in 32 bit to install aldebaran's choregraphe 1.3.3 . I have a multilib slackware64, i had read alien bob's instructions on compiling 32 bit, looks easy. And i was wondering if this modified script is ok, or it needs something more.
Quote:
PRGNAM=avahi
VERSION=0.6.30
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
#Edicion variable ARCH
#ARCH=x86_64
ARCH=${ARCH:-x86_64}
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}
# Support for mono
if [ "${MONO:-no}" = "no" ]; then
MONO="--disable-mono"
else
MONO="--enable-mono"
fi
warn_accounts() {
echo " You must have an avahi user and group to run this script. "
echo " Something like this should suffice for most systems: "
echo " # groupadd -g 214 avahi"
echo " # useradd -u 214 -g 214 -c "Avahi" -d /dev/null -s /bin/false avahi"
exit 1
}
# Bail if user and/or group isn't valid on your system
if ! grep -q "^avahi:" /etc/passwd; then
warn_accounts
fi
if ! grep -q "^avahi:" /etc/group ; then
warn_accounts
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=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
--disable-monodoc \
--disable-autoipd \
--enable-python-dbus \
--enable-pygtk\
--enable-glib \
--enable-dbus \
--enable-python \
--enable-gtk \
--disable-gtk3 \
--enable-qt4 \
--disable-qt3 \
--enable-core-docs \
--enable-compat-howl \
--enable-compat-libdns_sd \
--with-dbus-sys=/etc/dbus-1/system.d \
--with-avahi-user=avahi \
--with-avahi-group=avahi \
--with-avahi-priv-access-group=netdev \
--with-distro=slackware \
--program-prefix= \
--program-suffix= \
--build=$ARCH-slackware-linux \
$MONO
make
make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
mv $PKG/etc/rc.d/rc.avahidaemon $PKG/etc/rc.d/rc.avahidaemon.new
mv $PKG/etc/rc.d/rc.avahidnsconfd $PKG/etc/rc.d/rc.avahidnsconfd.new
mv $PKG/etc/avahi/avahi-daemon.conf $PKG/etc/avahi/avahi-daemon.conf.new
mv $PKG/etc/dbus-1/system.d/avahi-dbus.conf \
$PKG/etc/dbus-1/system.d/avahi-dbus.conf.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE docs/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
Because Aldebaran's choregraphe installer says "wrong ELF class: ELFCLASS64" Wonder if i mixed the libraries
Any idea or comment is welcome 
|
|
|
|
08-04-2011, 10:01 PM
|
#2
|
|
Senior Member
Registered: Jul 2011
Distribution: Slackware64-14.0, LFS-7.3, FreeBSD 9.1
Posts: 1,096
Rep: 
|
Try using "ARCH=i486 ./avahi.SlackBuild" with the vanilla SlackBuild script and see if it will build the 32-bit version that way. Only use "ARCH=x86_64" when you're doing a 64-bit build.
|
|
|
|
08-04-2011, 10:36 PM
|
#3
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Original Poster
Rep:
|
Hi ReaperX7
I tried to run the command you say, but it says "bash ./avahi.SlackBuild Permission denied" Wonder why, i'm running it with root user... 
|
|
|
|
08-04-2011, 10:59 PM
|
#4
|
|
Senior Member
Registered: Jul 2011
Distribution: Slackware64-14.0, LFS-7.3, FreeBSD 9.1
Posts: 1,096
Rep: 
|
Probably a permissions error. It's happens when you modify some files at times. Try running "chmod +x avahi.SlackBuild" and trying it again. Usually it's the permission to allow the file to be ran as an executable that gets weird and causes this. You can also Right Click it in the Desktop Environment, click the Permissions tab, and checking the box labeled "Executable".
|
|
|
|
08-05-2011, 12:34 AM
|
#5
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Original Poster
Rep:
|
Hi again ReaperX7.
I used the command "ARCH=i486 ./avahi.SlackBuild" with the vanilla SlackBuild script (i think the vanilla script is the original one from SlackBuilds) and it stops, an error message appears and says that C compiler cannot make executables.
The config.log says that the confdefs.h failed, that program generates a lot of data ..
Thanks for replying. I will continue looking tomorrow.
Any ideas, comments or suggestions are welcome.
Good night
|
|
|
|
08-05-2011, 03:11 AM
|
#6
|
|
Member
Registered: May 2006
Location: France
Distribution: Slackware 32/64+multilib
Posts: 117
Rep:
|
Hello,
Quote:
Originally Posted by animeresistance
I used the command "ARCH=i486 ./avahi.SlackBuild" with the vanilla SlackBuild script (i think the vanilla script is the original one from SlackBuilds) and it stops, an error message appears and says that C compiler cannot make executables.
The config.log says that the confdefs.h failed, that program generates a lot of data ..
Thanks for replying. I will continue looking tomorrow.
Any ideas, comments or suggestions are welcome.
Good night
|
As explained in Alien's wiki, when you need to compile 32-bit software, you first have to configure your shell environment using the command below:
Code:
. /etc/profile.d/32dev.sh
Cheers
--
SeB
|
|
|
|
08-05-2011, 05:34 PM
|
#7
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Original Poster
Rep:
|
Oh thanks ..
I read Alien Bob blog before, but i think i was too tired and frustated that i made a mistake, now it works.
Thanks a lot guys.
But how do i put the "solved" flag ?
|
|
|
|
08-05-2011, 05:35 PM
|
#8
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Original Poster
Rep:
|
i found it ... hehehehe 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:21 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|