Bug 248 - Is libgsl a bit broken?
Is libgsl a bit broken?
Product: Red Hat Linux
Classification: Retired
Component: gsl (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1998-12-01 07:31 EST by paulmatthews
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1998-12-03 12:16:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description paulmatthews 1998-12-01 07:31:56 EST
Is libgsl a bit broken, or is just me? For example if I try
to compile this simple program :

  #include <math.h>
  #include <gsl_errno.h>
  #include <gsl_fft_real.h>
  #include <gsl_fft_halfcomplex.h>

  void main()
   int i, n = 100;
   double data[n];
   gsl_fft_real_wavetable real_wavetable;

   for (i = 0; i < n; i++)
    data[i] = 0.0;

   for (i = n / 3; i < 2 * n / 3; i++)
    data[i] = 1.0;

   gsl_fft_real_wavetable_alloc( n, &real_wavetable );
   gsl_fft_real_init( n, &real_wavetable );
   gsl_fft_real( data, n, &real_wavetable );
   gsl_fft_real_wavetable_free( &real_wavetable );

using :

  gcc -lgslfft -lgslerr -lm -o fft fft.c

The following errors occur :

  /tmp/cca007241.o: In function `main':
  /tmp/cca007241.o(.text+0x0): multiple definition of `main'
  /usr/lib/libgslfft.a(benchmark.o)(.text+0x0): first
defined here
  ld: Warning: size of symbol `main' changed from 1056 to
481 in /tmp/cca007241.o
  /tmp/cca007241.o: In function `main':
  /tmp/cca007241.o(.text+0x121): undefined reference to
  /tmp/cca007241.o(.text+0x134): undefined reference to
  /tmp/cca007241.o(.text+0x14d): undefined reference to
  /tmp/cca007241.o(.text+0x15c): undefined reference to
Comment 1 paulmatthews 1998-12-01 21:42:59 EST
[Additional information] I downloaded the new gsl library from the gnu
site, compiled it up, rewrote the test program to fit the new api, and
it failed in exactly the same way.  Either they are doing something
consistently wrong, or I'm misssing something very obvious. If this is
a "your holding your mouth the wrong way" type of thing I'm going to
look silly...
Comment 2 paulmatthews 1998-12-02 07:07:59 EST
[ARRG] No it's me. Where's my gun.

gcc -o fft fft.c -lgslfft -lgslerr -lm

This works OK. It's where you put the libraries on the command line. I
can't believe I've never noticed this before.

Note You need to log in before you can comment on or make changes to this bug.