Board index FlightGear Support Compiling

Please help..2.6 not compile

Building FlightGear from source, and in the need for help?

Please help..2.6 not compile

Postby Barambu2sa » Sat Feb 18, 2012 9:58 pm

Situation: Slackware64-current
gcc 4.6.2
i try simgear-2.6.0 and fg-2.6.0
and
simgear-git fg-git
Cmake give me this error

-- looking for static Simgear libraries
-- looking for version: 2.6.0
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find SimGear (missing: SIMGEAR_VERSION_OK) (Required is at least
version "2.6.0")

or

-- looking for static Simgear libraries
-- looking for version: 2.6.0
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find SimGear (missing: SIMGEAR_VERSION_OK) (Required is at least
version "2.7.0")

Of course i have simgear installed.
I use those slackbuilds


Code: Select all
#!/bin/sh

CWD=`pwd`
TMP=${TMP:-/tmp/txz}
PKG=$TMP/package-flightgear
NAME=flightgear
#VERSION=`date +%m%y`git
VERSION=2.6.0
TARGET=x86_64
ARCH=${ARCH:-x86_64}
BUILD=1mg

if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
 mkdir -p $PKG
fi

cd $TMP
#git clone git://gitorious.org/fg/flightgear.git $NAME





echo "+---------------------------------------+"
echo "| Starting SlackBuild  $NAME-$VERSION |"
echo "+---------------------------------------+"

tar -xf $CWD/$NAME-$VERSION.tar.bz2
cd $NAME-$VERSION
chown -R root:root .
CFLAGS="$SLKCFLAGS" \
mkdir build
cd build
cmake \
   -DCMAKE_INSTALL_PREFIX=/usr \
   -DCMAKE_C_FLAGS="$SLKCFLAGS" \
   -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
   .. || exit 1
make -j8
make
make install DESTDIR=$PKG

mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README Thanks \
 $PKG/usr/doc/$NAME-$VERSION
cd $CWD
cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

gzip -9 $PKG/usr/man/*/*
strip --strip-unneeded $PKG/usr/bin/*

cd $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz

if [ "$1" = "--cleanup" ]; then
 rm -rf $TMP
fi


Code: Select all
#!/bin/sh

CWD=`pwd`
TMP=${TMP:-/tmp/txz}
PKG=$TMP/package-simgear
NAME=simgear
#VERSION=`date +%m%y`git
VERSION=2.6.0
TARGET=x86_64
ARCH=${ARCH:-x86_64}
BUILD=1mg

if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
 mkdir -p $PKG
fi

cd $TMP
#git clone git://gitorious.org/fg/simgear.git $NAME
tar -xf $CWD/$NAME-$VERSION.tar.bz2
cd $NAME-$VERSION
chown -R root:root .
CFLAGS="$SLKCFLAGS" \
mkdir build
cd build

cmake \
   -DCMAKE_INSTALL_PREFIX=/usr \
   -DCMAKE_C_FLAGS="$SLKCFLAGS" \
   -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
   .. || exit 1

make -j8
make install DESTDIR=$PKG

mkdir -p $PKG/usr/doc/$NAME-$VERSION
cd $CWD
cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION

cd $PKG
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz

if [ "$1" = "--cleanup" ]; then
 rm -rf $TMP
fi


What can i do?
Barambu2sa
 
Posts: 288
Joined: Tue Mar 25, 2008 5:49 pm

Re: Please help..2.6 not compile

Postby Bjoern » Sun Feb 19, 2012 12:08 am

Make Flightgear with this flag:

Code: Select all
-DSIMGEAR_VERSION_OK=true


Works for me.
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux

Re: Please help..2.6 not compile

Postby Barambu2sa » Sun Feb 19, 2012 1:01 am

Works fine but...

Code: Select all
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::stamp()':
(.text+0x1b): undefined reference to `clock_gettime'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::stamp()':
(.text+0x4b): undefined reference to `clock_gettime'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepUntil(SGTimeStamp const&)':
(.text+0x99): undefined reference to `clock_getres'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepUntil(SGTimeStamp const&)':
(.text+0x10e): undefined reference to `clock_nanosleep'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepUntil(SGTimeStamp const&)':
(.text+0x1a3): undefined reference to `clock_gettime'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepUntil(SGTimeStamp const&)':
(.text+0x1fb): undefined reference to `clock_gettime'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepFor(SGTimeStamp const&)':
(.text+0x281): undefined reference to `clock_nanosleep'
/usr/lib64/gcc/x86_64-slackware-linux/4.6.2/../../../../lib64/libsgtiming.a(timestamp.cxx.o): In function `SGTimeStamp::sleepFor(SGTimeStamp const&)':
(.text+0x2bd): undefined reference to `clock_gettime'


:(
Barambu2sa
 
Posts: 288
Joined: Tue Mar 25, 2008 5:49 pm

Re: Please help..2.6 not compile

Postby ThorstenB » Sun Feb 19, 2012 3:50 pm

It complains about "missing SIMGEAR_VERSION_OK" because your simgear version is _not_ ok. Adding the define manually tricks the version check - but it doesn't solve the problem - you're still building with an incompatible simgear library (hence the missing symbols etc).

The git/next branches now contain the 2.7.0 development version. If you had built git/next some weeks ago, it still contained "2.6.0". You you may need to re-run cmake for simgear and completely rebuild and install simgear (make install), since simgear's version number changed.

If you're actually trying to build 2.6.0 (not 2.7.0 development), make sure you have the right git branch (the 2.6.0 branch), or the 2.6.0 source tar ball.
User avatar
ThorstenB
 
Posts: 160
Joined: Fri Nov 19, 2010 10:49 am
Location: Germany
Callsign: D-TB7
Version: GIT
OS: openSUSE

Re: Please help..2.6 not compile

Postby Barambu2sa » Sun Feb 19, 2012 5:03 pm

I compile it yesterday..no way.
Barambu2sa
 
Posts: 288
Joined: Tue Mar 25, 2008 5:49 pm

Re: Please help..2.6 not compile

Postby Barambu2sa » Sun Feb 19, 2012 6:03 pm

I found a "dirty" solution,compile it on Slackware 13.37(i'm using current..)
works fine.
:D
Barambu2sa
 
Posts: 288
Joined: Tue Mar 25, 2008 5:49 pm

Re: Please help..2.6 not compile

Postby Bjoern » Sun Feb 19, 2012 6:35 pm

ThorstenB wrote in Sun Feb 19, 2012 3:50 pm:The git/next branches now contain the 2.7.0 development version. If you had built git/next some weeks ago, it still contained "2.6.0". You you may need to re-run cmake for simgear and completely rebuild and install simgear (make install), since simgear's version number changed.


So that's why it didn't work last week.

SG and FG from "next" compile fine without the flag now though. Even using non-default installation paths. Nice.
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux


Return to Compiling

Who is online

Users browsing this forum: No registered users and 4 guests