LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-11-2012, 05:06 PM   #1
ivanp84
LQ Newbie
 
Registered: Jan 2010
Location: Belgrade, Serbia
Distribution: Slackware64
Posts: 11

Rep: Reputation: 0
Lightbulb GNU Octave compile error and fix without recompile


Dear Slackware fellows, tonight I discovered a problem during GNU Octave built with SB script. From GNU Octave site I downloaded the most recent stable, which is v3.4.3, and for that I reedited VERSION variable in SB (from slackbuilds.org). After more than 30 min of compiling, an error appeared, because for some reason my roots PATH variable hadn't TeX bins path, so make couldn't compile docs. To skip recompiling all prior source, I have decided to comment parts of the SB script connected with preparations and configurations steps, so the script could just continue make process. First, of course, updated PATH as PATH=$PATH:/usr/share/texmf/bin. And this is how it looks like, if someone faces same problem and want to escape entire Octave recompiling... As mentioned, this script just continues process if original script fails with TeX.

Ivan

Code:
#!/bin/sh

# Slackware build script for octave
# Written by Kyle Guinn <elyk03@gmail.com>

PRGNAM="octave"
VERSION=${VERSION:-3.4.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

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}

DOCS="AUTHORS BUGS COPYING ChangeLog INSTALL* NEWS README"

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"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

# Default to use ImageMagick (shipped with Slackware) instead of
# GraphicsMagick so that octave will have at least some sort of image
# reading capabilities.  ImageMagick limits images to 16bpp, but if you're
# running a multilib environment, it might be easier to accept this limit
# rather than to compile GraphicsMagick.  (thanks to Joni Martikainen)
WITH_MAGICK=${WITH_MAGICK:-ImageMagick} # alternatively, "GraphicsMagick"

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 .
#chmod -R u+w,go+r-w,a-st .

# Several configure checks look for headers in the 'amd' directory
# instead of 'cxsparse', 'camd', 'colamd', and 'ccolamd' directories
# as liboctave/oct-sparse.h expects.  Fix the typos and reconfigure.
# Note that camd.h doesn't appear to be included anywhere, but is used
# to determine if the CAMD library is present.
#sed -i -e 's| amd/cs\.h| cxsparse/cs.h|' \
#       -e 's| amd/camd\.h| camd/camd.h|' \
#       -e 's| amd/colamd\.h| colamd/colamd.h|' \
#       -e 's| amd/ccolamd\.h| ccolamd/ccolamd.h|' configure.ac
#autoreconf -vif
# If you have amd.h in some non-default location (e.g. /usr/include/amd/amd.h)
# now the check for umfpack.h will fail because umfpack.h includes "amd.h"
# instead of "amd/amd.h".  The --with-amd-includedir option below fixes this.

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
FFLAGS="$SLKCFLAGS" \
#./configure \
#  --prefix=/usr \
#  --libdir=/usr/lib${LIBDIRSUFFIX} \
#  --sysconfdir=/etc \
#  --localstatedir=/var \
#  --mandir=/usr/man \
#  --infodir=/usr/info \
#  --docdir=/usr/doc/$PRGNAM-$VERSION \
#  --enable-shared \
#  --disable-static \
#  --enable-strict-warning-flags \
#  --with-magick=$WITH_MAGICK \
#  --with-amd-includedir=/usr/include/amd \
#  --build=$ARCH-slackware-linux

make
make install-strip DESTDIR=$PKG

find $PKG/usr/man -type f -exec gzip -9 {} \;

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $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}
 
Old 02-11-2012, 08:29 PM   #2
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 241

Rep: Reputation: 49
Looks like you were using `su` instead of `su -`.

http://slackbuilds.org/faq/#su
http://slackbuilds.org/howto/#su
 
Old 02-12-2012, 04:54 AM   #3
ivanp84
LQ Newbie
 
Registered: Jan 2010
Location: Belgrade, Serbia
Distribution: Slackware64
Posts: 11

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by elyk View Post
Looks like you were using `su` instead of `su -`.

http://slackbuilds.org/faq/#su
http://slackbuilds.org/howto/#su
Yes, that was the problem. GNU Octave will be main tool in my new project, I have some experimental data, so I decided to compile as soon as possible, and then to have time to play around with Metatool. So just reedited SB script to reach correct version, and then got root privileges with su. But after TeX related err appeared, I concluded that could save some time if PATH and SB were changed in the manner shown in the first post. And then found that it could be cool to share that experience with LQ slackware fellows.
 
  


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
LXer: Interview: Jesper Schmidt Hansen, author of GNU Octave Beginner’s Guide LXer Syndicated Linux News 0 10-20-2011 01:20 AM
LXer: Resources for learning GNU Octave LXer Syndicated Linux News 0 08-13-2011 01:20 AM
Can someone help me understand how to fix my recompile with -fPIC error ? Bascom49 Linux - Software 3 12-26-2009 05:57 AM
Installation of octave giving errors dont know how to fix jwheel83 Linux - General 1 10-09-2006 04:22 AM
gphoto2 2.2.0 compile error fix pdw_hu Slackware 2 06-20-2006 06:38 AM

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

All times are GMT -5. The time now is 09:02 PM.

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