[GRASS5] Re: [DebianGIS] grass and 64bit

To successfully compile GRASS on 64bit platforms, the required
FFTW2 library has to be compiled with -fPIC flag:

    #applies to FFTW2, not GRASS:
    cd fftw-2.1.5/
    CFLAGS="-fPIC" ./configure
    make
    make install

Now we (theoretically) can compile GRASS with TclTk 8.4, maybe someone
who knows how can help to bring FFTW into the modern era as well, i.e.
to use fftw3 not fftw2.

#ifdef 's to remain backwards compat with v.2 ?

Hamish

Hamish wrote:

> To successfully compile GRASS on 64bit platforms, the required
> FFTW2 library has to be compiled with -fPIC flag:
>
> #applies to FFTW2, not GRASS:
> cd fftw-2.1.5/
> CFLAGS="-fPIC" ./configure
> make
> make install

This is true on any platform if FFTW is a static library and the GRASS
libraries (specifically libgrass_gmath) are dynamic libraries. In
practice, the safest option is to always use -fPIC for both static and
shared libraries. Static libraries compiled without -fPIC can only be
used directly by executables, and not by shared libraries.

Now we (theoretically) can compile GRASS with TclTk 8.4, maybe someone
who knows how can help to bring FFTW into the modern era as well, i.e.
to use fftw3 not fftw2.

#ifdef 's to remain backwards compat with v.2 ?

If we don't care about supporting FFTW 2.x, the changes to
lib/gmath/fft.c to use 3.x instead are trivial.

Supporting both 2.x and 3.x would be quite a bit more work due to the
necessary configure.in changes.

--
Glynn Clements <glynn@gclements.plus.com>

> #ifdef 's to remain backwards compat with v.2 ?

If we don't care about supporting FFTW 2.x, the changes to
lib/gmath/fft.c to use 3.x instead are trivial.

Supporting both 2.x and 3.x would be quite a bit more work due to the
necessary configure.in changes.

To help decide that from the "is GRASS the only one still using v2?" angle,
here's an informal poll of the Debian packages that use fftw2 and fftw3
currently. (Debian/Stable; thus may be slightly out of date)

FFTW3 wins the `wc -l` test, package relevance is more subjective.

# reverse dependancy check:

$ apt-cache rdepends fftw2
fftw2
Reverse Depends:
|libgrass
|grass
|tela
  sfftw2
|rezound
|rezound
|python2.4-scipy
|python2.3-scipy
|python2.2-scipy
|pdl
  p4fftwgel2
|mpb-mpi
|mpb
|linwsjt
|libwvstreams4.0-fft
|libsndobj2
|libgrass
  k7fftwgel2
  k6fftwgel2
|grass
|gramofile
|grace6
|grace
|gmfsk
|glfer
  galan
  fftw-docs
  fftw-dev
|extace
|cassbeam

Note GRASS is listed twice as it exists both in the main archive and in
the DebianGIS repository.

# single precision version of FFTW2
$ apt-cache rdepends sfftw2
sfftw2
Reverse Depends:
  sfftw-dev
|paul
    k6fftwgel2
    k7fftwgel2
|glame
    k6fftwgel2
    k7fftwgel2
|ams
    k6fftwgel2
    k7fftwgel2

$ apt-cache rdepends fftw3
fftw3
Reverse Depends:
  octave-gpc
  zynaddsubfx
  wstools
  tessa-mpi
  tessa
  swh-plugins
  snd-gtk-alsa
  snd-gtk
  octave2.1
  octave-statdataml
  octave-sp
  octave-plplot
  octave-forge
  nip2
  mffm-fftw1
  mffm-fftw-dev
  linpsk
  libvips10
  libvips-tools
  libgnuradio-core0
  labplot
  jamin
  imms
  gwc
  gr-audio-oss
  gkrellmss
  freqtweak
  fftw3-doc
  fftw3-dev
  ctsim-pentium4
  ctsim-athlon
  ctsim
  brutefir
  ale

Hamish