Testing Frogatto from Git


#1

Hi!
I’m using Linux and am trying to build Frogatto for x86_64. I keep getting this error when I run the make command:

$ make CXXFLAGS="-O2 -fPIC" Building: src/IMG_savepng.cpp In file included from src/stats.hpp:22:0, from src/IMG_savepng.cpp:61: src/geometry.hpp: In member function 'SDL_Rect rectf::sdl_rect() const': src/geometry.hpp:127:62: error: narrowing conversion of 'rectf::x()' from 'int' to 'Sint16' inside { } src/geometry.hpp:127:62: error: narrowing conversion of 'rectf::y()' from 'int' to 'Sint16' inside { } src/geometry.hpp:127:62: error: narrowing conversion of 'rectf::w()' from 'int' to 'Uint16' inside { } src/geometry.hpp:127:62: error: narrowing conversion of 'rectf::h()' from 'int' to 'Uint16' inside { } cc1plus: warnings being treated as errors At global scope: cc1plus: error: unrecognized command line option "-Wno-narrowing" make: *** [src/IMG_savepng.o] Error 1

#2

Does it compile without the options?


#3

So we should add to the documentation that we need SDL 2.0 - do you have it? Furthermore, sdl_image 2.0 is also required, alongside some others that I can’t remember now.


#4

I have tried compile without the options and still getting the same error.
I have sdl-1.2.14. I will try update it to sdl-2.0.
Thanks.


#5

Now I have SDL2-2.0.0, SDL2_image-2.0.0, SDL2_mixer-2.0.0, SDL2_net-2.0.0, SDL2_ttf-2.0.12 on my Slackware 13.37.0 x86_64.

I write silly script to build package.

#!/bin/sh

# Slackware build script for frogatto

PRGNAM=frogatto
VERSION=git

# Check if we have the tarball
if [ ! -r $PRGNAM-$VERSION.tar.bz2 ]; then
  echo "$PRGNAM-$VERSION.tar.bz2 not found"
  git clone git://github.com/frogatto/frogatto.git || exit 1
  git clone git://github.com/anura-engine/anura.git || exit 1
  find . -name ".*" -print0 | xargs -0 rm -rf 2> /dev/null
  mv frogatto anura/modules || exit 1
  mv anura $PRGNAM-$VERSION || exit 1
  tar -cvjpf $PRGNAM-$VERSION.tar.bz2 $PRGNAM-$VERSION
fi

BUILD=${BUILD:-1}
TAG=${TAG:-_sbs}

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/sbs}
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

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION || exit 1
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 \
  OPTIMIZE=no \
  USE_CCACHE=no \
  CXXFLAGS="$SLKCFLAGS" \
  LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" || exit 1

Now I get another error message.

Building: src/IMG_savepng.cpp Building: src/achievements.cpp Building: src/animation_creator.cpp Building: src/animation_preview_widget.cpp Building: src/animation_widget.cpp Building: src/asserts.cpp Building: src/b2d_ffl.cpp Building: src/background.cpp Building: src/background_task_pool.cpp Building: src/bar_widget.cpp Building: src/base64.cpp Building: src/blur.cpp Building: src/border_widget.cpp Building: src/button.cpp src/button.cpp: In lambda function: src/button.cpp:252:54: error: cannot call member function 'virtual void gui::widget::set_dim(int, int)' without object src/button.cpp: In lambda function: src/button.cpp:254:54: error: cannot call member function 'virtual void gui::widget::set_dim(int, int)' without object cc1plus: warnings being treated as errors At global scope: cc1plus: error: unrecognized command line option "-Wno-narrowing" make: *** [src/button.o] Error 1