Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Feh 2.9.1 Compile Error #122

Closed
ghost opened this Issue · 4 comments

1 participant

@ghost

Hi,

I'm running Slackware 14.0x x86 with only Openbox as my DE and this is the build script I use to compile it;


#!/bin/sh
#

PRGNAM=feh
VERSION=${VERSION:-2.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_sar}

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

DOCS="COPYING"

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 {} \;

make curl=0 xinerama=0 \
CFLAGS="$SLKCFLAGS" \
PREFIX=/usr
make install \
DESTDIR=$PKG \
PREFIX=/usr \
man_dir=$PKG/usr/man \
doc_dir=$PKG/usr/doc/$PRGNAM-$VERSION \
example_dir=$PKG/usr/doc/$PRGNAM-$VERSION/examples

find $PKG -print0 | xargs -0 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

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

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


When I tried to compile 2.9.1 this was the output at the terminal;

make[1]: Entering directory /tmp/sar/feh-2.9.1/src'
sed 's/^\(.*\)$/"\1\\n"/' < help.raw > help.inc
cc -MM collage.c events.c exif.c exif_canon.c exif_nikon.c feh_png.c filelist.c getopt.c getopt1.c imlib.c index.c keyevents.c list.c main.c md5.c menu.c multiwindow.c options.c signals.c slideshow.c thumbnail.c timers.c utils.c wallpaper.c winwidget.c > deps.mk
make[1]: Leaving directory
/tmp/sar/feh-2.9.1/src'
make[1]: Entering directory /tmp/sar/feh-2.9.1/src'
cc -O2 -march=i486 -mtune=i686 -c -o collage.o collage.c
collage.c: In function 'init_collage_mode':
collage.c:68:11: error: 'PACKAGE' undeclared (first use in this function)
collage.c:68:11: note: each undeclared identifier is reported only once for each function it appears in
collage.c:69:6: error: expected ')' before string constant
collage.c:72:6: error: too few arguments to function 'fputs'
collage.c:78:6: error: expected ')' before string constant
collage.c:81:6: error: too few arguments to function 'fputs'
collage.c:111:7: error: expected ')' before string constant
collage.c:202:28: error: expected ')' before string constant
make[1]: *** [collage.o] Error 1
make[1]: Leaving directory
/tmp/sar/feh-2.9.1/src'
make: *** [build-src] Error 2

THANKS

@derf
Owner
@ghost

Ahh ok, so I changed it like this and it's working.

Look good now?

THANKS

CFLAGS="$SLKCFLAGS" \
make curl=0 xinerama=0 \
PREFIX=/usr
make install \
DESTDIR=$PKG \
PREFIX=/usr \
man_dir=$PKG/usr/man \
doc_dir=$PKG/usr/doc/$PRGNAM-$VERSION \
example_dir=$PKG/usr/doc/$PRGNAM-$VERSION/examples
THANKS

@derf
Owner

That looks good, yes.

@derf derf closed this
@ghost

Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.