Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 248 - Is libgsl a bit broken?
Summary: Is libgsl a bit broken?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gsl
Version: 5.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-12-01 12:31 UTC by paulmatthews
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1998-12-03 17:16:02 UTC
Embargoed:


Attachments (Terms of Use)

Description paulmatthews 1998-12-01 12:31:56 UTC
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
`gsl_fft_real_wavetable_alloc'
  /tmp/cca007241.o(.text+0x134): undefined reference to
`gsl_fft_real_init'
  /tmp/cca007241.o(.text+0x14d): undefined reference to
`gsl_fft_real'
  /tmp/cca007241.o(.text+0x15c): undefined reference to
`gsl_fft_real_wavetable_free'

Comment 1 paulmatthews 1998-12-02 02:42:59 UTC
[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 12:07:59 UTC
[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.