You are not logged in.

#1 2005-04-22 17:10:58

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,488

subsim 'dangerdeep' package problem with scons and fftw

I am a lousy coder, and I fear more lousy on package creation.

Trying to create a package for the famous gpl submarine game dangerdeep, I run into some problems.
[list][*]dangerdeep is coded to use scons. I can't get scons to use a dictionary prefix. If anyone can help me here, I would like to have the game in /opt/games/dangerdeep or /opt/dangerdeep. I found no parameters for scons to teach it, and every changes in Sconstruct where ignored.
[*] Allthough I think I fullfilled all dependencies, I recieve an compiling error:

==> Entering fakeroot environment
==> Making package: dangerdeep  (Fr Apr 22 18:59:06 CEST 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Found dangerdeep-0.0.19.tar.gz in build dir
==> Validating source files with MD5sums
    dangerdeep-0.0.19.tar.gz ... Passed
==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf dangerdeep-0.0.19.tar.gz
==> Removing existing pkg/ directory...
==> Starting build()...
Compiling for Unix/Posix/Linux Environment
Install binary path: /usr/local/bin
Install data path: /usr/local/share/dangerdeep
Using data dir: /usr/local/share/dangerdeep
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for C header file SDL.h... yes
Checking for C header file SDL_image.h... yes
Checking for C header file SDL_net.h... yes
Checking for C header file SDL_mixer.h... yes
Checking for C header file fftw3.h... yes
Looking for build directory for platform 'linux2'
Exact match not found, finding closest guess
Found directory build/linux, will build there
g++ -o build/linux/crosssection build/linux/crosssection.o build/linux/global_data.o build/linux/sound.o -Lbuild/linux -Lsrc -ldftdmedia -ltinyxml -loglext -lGL -lGLU -lSDL -lSDL_image -lSDL_mixer -lSDL_net -lfftw3
/usr/bin/ld: cannot find -lfftw3
collect2: ld gab 1 als Ende-Status zurück
scons: *** [build/linux/crosssection] Error 1
==> ERROR: Build Failed.  Aborting...
pkgname=dangerdeep
pkgver=0.0.19
pkgrel=1
pkgdesc="Danger from the deep (aka dangerdeep) is a Free / Open Source World War II german submarine simulation."
url="http://dangerdeep.sourceforge.net/"
license="GPL"
depends=(scons sdl sdl_image sdl_net fftw libpng libjpeg zlib)
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://mesh.dl.sourceforge.net/sourceforge/dangerdeep/$pkgname-$pkgver.tar.gz)
md5sums=(b1dcc97066aa370a22e0ad768181590c)

build() {
  cd $startdir/src/
  scons -Q  || return 1
  scons DESTDIR=$startdir/pkg install
}

Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2005-04-22 17:24:41

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: subsim 'dangerdeep' package problem with scons and fftw

this line:

g++ -o build/linux/crosssection build/linux/crosssection.o build/linux/global_data.o build/linux/sound.o -Lbuild/linux -Lsrc -ldftdmedia -ltinyxml -loglext -lGL -lGLU -lSDL -lSDL_image -lSDL_mixer -lSDL_net -lfftw3 

should have alot more -L settings (that's how it finds libraries... uppercase L for directories, lowercase for lib name) - so -L/usr/lib should probably be there... among other things.... can you link the SConstruct somewhere so I can take a peek at it? try doing:
$ CPPFLAGS="-L/usr/include" scons
or something to that effect...

Offline

#3 2005-04-22 17:37:28

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,488

Re: subsim 'dangerdeep' package problem with scons and fftw

Thank you for the tip. I don't understand nothing, but I tried:

CPPFLAGS="-L/usr/include" scons
scons: Reading SConscript files ...
Compiling for Unix/Posix/Linux Environment
Install binary path: /usr/local/bin
Install data path: /usr/local/share/dangerdeep
Using data dir: /usr/local/share/dangerdeep
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for C header file SDL.h... yes
Checking for C header file SDL_image.h... yes
Checking for C header file SDL_net.h... yes
Checking for C header file SDL_mixer.h... yes
Checking for C header file fftw3.h... yes
Looking for build directory for platform 'linux2'
Exact match not found, finding closest guess
Found directory build/linux, will build there
scons: done reading SConscript files.
scons: Building targets ...
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/ai.o src/ai.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/airplane.o src/airplane.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/cfg.o src/cfg.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/coastmap.o src/coastmap.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/command.o src/command.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/convoy.o src/convoy.cpp
src/convoy.cpp: In constructor `convoy::convoy(game&, TiXmlElement*)':
src/convoy.cpp:179: Warnung: converting to `int' from `double'
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/crosssection.o src/crosssection.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DDATADIR="/usr/local/share/dangerdeep/" -I/usr/include/SDL -c -o build/linux/global_data.o src/global_data.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/sound.o src/sound.cpp
src/sound.cpp: In static member function `static void sound::mix_audio(void*, Uint8*, int)':
src/sound.cpp:34: Warnung: comparison between signed and unsigned integer expressions
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/font.o src/font.cpp
src/font.cpp: In constructor `font::font(const std::string&, unsigned int)':
src/font.cpp:84: Warnung: Variable »codeleftbr« wird nicht verwendet
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/image.o src/image.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/model.o src/model.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/system.o src/system.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/texture.o src/texture.cpp
ar r build/linux/libdftdmedia.a build/linux/font.o build/linux/image.o build/linux/model.o build/linux/system.o build/linux/texture.o
ranlib build/linux/libdftdmedia.a
ar: creating build/linux/libdftdmedia.a
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/tinyxml/tinystr.o src/tinyxml/tinystr.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/tinyxml/tinyxml.o src/tinyxml/tinyxml.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/tinyxml/tinyxmlerror.o src/tinyxml/tinyxmlerror.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/tinyxml/tinyxmlparser.o src/tinyxml/tinyxmlparser.cpp
ar r build/linux/libtinyxml.a build/linux/tinyxml/tinystr.o build/linux/tinyxml/tinyxml.o build/linux/tinyxml/tinyxmlerror.o build/linux/tinyxml/tinyxmlparser.o
ranlib build/linux/libtinyxml.a
ar: creating build/linux/libtinyxml.a
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/oglext/OglExt.o src/oglext/OglExt.cpp
g++ -Wall -g -O2 `sdl-config --cflags` -DVERSION="0.0.19" -I/usr/include/SDL -c -o build/linux/oglext/RenderingContext.o src/oglext/RenderingContext.cpp
ar r build/linux/liboglext.a build/linux/oglext/OglExt.o build/linux/oglext/RenderingContext.o src/oglext/RenderingContext.hpp
ranlib build/linux/liboglext.a
ar: creating build/linux/liboglext.a
g++ -o build/linux/crosssection build/linux/crosssection.o build/linux/global_data.o build/linux/sound.o -Lbuild/linux -Lsrc -ldftdmedia -ltinyxml -loglext -lGL -lGLU -lSDL -lSDL_image -lSDL_mixer -lSDL_net -lfftw3
/usr/bin/ld: cannot find -lfftw3
collect2: ld gab 1 als Ende-Status zurück
scons: *** [build/linux/crosssection] Error 1
scons: building terminated because of errors.

Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#4 2005-04-22 18:36:47

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: subsim 'dangerdeep' package problem with scons and fftw

it's about our fftw distribution which doesn't come with double precision libraries.

once I tried that PKGBUILD, which might help on that, but be aware it can break other packages!

# $Id: PKGBUILD,v 1.2 2004/04/19 06:24:57 dorphell Exp $
# Maintainer: damir <damir@archlinux.org>
pkgname=fftw
pkgver=3.0.1
pkgrel=2
pkgdesc="FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size."
url="http://www.fftw.org/"
depends=('glibc')
provides=('fftw3')
source=(http://www.fftw.org/$pkgname-$pkgver.tar.gz)
md5sums=('76cd21ecc9a7bed6343566c473c36477')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --enable-float  --enable-double-float
  make || return 1
  make prefix=$startdir/pkg/usr install
  make clean
  ./configure --prefix=/usr
  make || return 1
  make prefix=$startdir/pkg/usr install
}

-neri

Offline

#5 2005-04-22 18:51:49

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,488

Re: subsim 'dangerdeep' package problem with scons and fftw

neri wrote:

it's about our fftw distribution which doesn't come with double precision libraries.

You say so... I will try it out.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#6 2005-04-23 12:34:31

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,488

Re: subsim 'dangerdeep' package problem with scons and fftw

When I try to compile the game with double precision fftw libs, the whole system locks. sad


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB