VectorLinux
July 29, 2014, 12:28:25 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Installation hell.  (Read 1618 times)
Hacker John
Member
*
Posts: 21


« on: October 14, 2009, 07:15:09 am »

I tried to install Gnucash 2.2.9 from the source files.  ./configure revealed that I needed GLIB 2.6.  I tried installing GLIB 2.6 from source.  Configure ran OK but make stopped with a very long list of galias errors. 

This is just one example.  With the sole exception of emacs, other attempted installs involve a never-ending hunt for dependencies where either attempts to install the dependencies or the main program result in either configure or make breaking down.  From the error messages, it looks like the C or C++ code has broken and these are stable releases.

eg K3d configuration tells me that it is OK to go ahead and "make" but when I do, it stops with node.cpp:45: error: 'hide' is not a member of 'sigc'.  I know enough to know that this is a problem with a C++ class but no idea how to fix a library that I didn't write.

I feel like I'm beating my head against a brick wall.  I want to compile as it gives me more up-to-date apps than packaging does but it seems impossible to even do this.

OK, rant over, could there be some over-arching mistake that I am making.  If configure completes OK, I can't have omitted any essential dependencies.  Is it me or are the source files defective?
Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #1 on: October 14, 2009, 09:40:37 am »

When I'm stuck I usually go to Slackbuilds.org and see how they have build there script to install the source code.
Here is a link to for gnucash.
http://slackbuilds.org/repository/12.2/business/gnucash/

This is the contents of thier readme file...

Code:
GNUCash is opensource accounting software.

This requires the following additional software, and it is suggested
that you build them in this order:

slib libofx ORbit2 GConf libtasn1 gnome-keyring gnome-mime-data libbonobo
gnome-vfs gail libgnomecanvas libgnome libbonoboui libgnomeui libgnomecups
libgnomeprint libgnomeprintui gtkhtml goffice

aqbanking is optional, but it's not available at SlackBuilds.org.

This is how they ran ./configure...

./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-ofx \
  --disable-aqbanking \
  --disable-sql \
  --disable-static \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG


This is the slackbuild itself...

Code:
#!/bin/sh

# Slackware build script for gnucash

# Copyright 2008  Vincent Batts, vbatts@hashbangbash.com, http://hashbangbash.com/
# 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.

PRGNAM=gnucash
VERSION=2.2.9
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

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

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"
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
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 {} \;

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-ofx \
  --disable-aqbanking \
  --disable-sql \
  --disable-static \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG

# Create the gconf defaults directory
mkdir -p $PKG/etc/gconf/gconf.xml.defaults

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

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

rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  ChangeLog* README* TODO AUTHORS COPYING \
  DOCUMENTERS HACKING INSTALL LICENSE NEWS \
    $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

# Handle the schemas and such (hopefully) properly
GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults"
for RAWNAME in $(find $PKG/etc/gconf/schemas -name "*.schemas") ; do
  SCHEMA=$(basename $RAWNAME)
  cat << EOF >> $PKG/install/doinst.sh
GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \
chroot . gconftool-2 --makefile-install-rule /etc/gconf/schemas/$SCHEMA 1>/dev/null
EOF
done
for RAWNAME in $(find $PKG/etc/gconf/schemas -name "*.entries") ; do
  ENTRY=$(basename $RAWNAME)
  cat << EOF >> $PKG/install/doinst.sh
GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \
chroot . gconftool-2 --direct \
  --config-source=$GCONF_CONFIG_SOURCE \
  --load /etc/gconf/schemas/$ENTRY 1>/dev/null
EOF
done
unset GCONF_CONFIG_SOURCE

cd $PKG
/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz


« Last Edit: October 14, 2009, 09:42:46 am by stretchedthin » Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
Hacker John
Member
*
Posts: 21


« Reply #2 on: October 16, 2009, 07:31:00 am »

Thanks for the very comprehensive reply.  I had another bash at compiling using glib 2.6.5.  Configure, make and make install all ran OK, or seemed to but when I ran configure in the GNUcash install folder, it still told me that it couldn't find glib 2.6.  Aaarrrgghh!

The slackbuilds page you linked to doesn't seem to list glib.  I think I may have to use an older version of GNUcash because I'm damned if I can make this one work.
Logged
The Headacher
Louder than you
Global Moderator
Vectorian
*****
Posts: 1545


I like the bass to go BOOM!


WWW
« Reply #3 on: October 18, 2009, 08:02:15 am »

when you install libraries, it's usually needed to configure them to install to /usr:

Code:
./configure --prefix=/usr

If you don't, they will go to /usr/local, which has caused problems like these for me. Basically, I tell everything I install from source to go to /usr.
Logged

Most music on my soundcloud page was arranged in programs running on VL.
Hacker John
Member
*
Posts: 21


« Reply #4 on: October 19, 2009, 06:26:16 am »

Do I need to ./configure --prefix=/usr with glib2.6, gnucash or both of them?
Logged
The Headacher
Louder than you
Global Moderator
Vectorian
*****
Posts: 1545


I like the bass to go BOOM!


WWW
« Reply #5 on: October 19, 2009, 09:47:58 am »

At least glib, since gnucash doesn't seem to find it with /usr/local/. But you can also reconfigure gnucash to use /usr, it won't hurt.
Logged

Most music on my soundcloud page was arranged in programs running on VL.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!