Skip Menu |

This queue is for tickets about the AI-FANN CPAN distribution.

Report information
The Basics
Id: 33434
Status: rejected
Worked: 10 min
Priority: 0/
Queue: AI-FANN

People
Owner: Nobody in particular
Requestors: MBETHKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.08
Fixed in: (no value)



Subject: XS code does not compile with most FANN versions
I tried to compile AI::FANN using the CPAN shell with two different versions of libfann and got similar compiler errors from different places each time. This is using perl 5.8.8 on Debian Lenny/x86: Using libfann1 1.2.0-1 included with Debian (also tried with the download from http://prdownloads.sourceforge.net/fann/libfann1_1.2.0-1_i386.deb?download): CPAN.pm: Going to build S/SA/SALVA/AI-FANN-0.08.tar.gz Checking if your kit is complete... Looks good Writing Makefile for AI::FANN /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap FANN.xs > FANN.xsc && mv FANN.xsc FANN.c cc -c -I. -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.08\" -DXS_VERSION=\"0.08\" -fPIC "-I/usr/lib/perl/5.8/CORE" morefann.c morefann.c: In function ‘fann_train_data_set’: morefann.c:43: error: ‘FANN_E_INDEX_OUT_OF_BOUND’ undeclared (first use in this function) morefann.c:43: error: (Each undeclared identifier is reported only once morefann.c:43: error: for each function it appears in.) cp lib/AI/FANN.pm blib/lib/AI/FANN.pm make: *** [morefann.o] Error 1 Version 2.0.0-1 from SourceForge: CPAN.pm: Going to build S/SA/SALVA/AI-FANN-0.08.tar.gz Checking if your kit is complete... Looks good Writing Makefile for AI::FANN /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap FANN.xs > FANN.xsc && mv FANN.xsc FANN.c cc -c -I. -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.08\" -DXS_VERSION=\"0.08\" -fPIC "-I/usr/lib/perl/5.8/CORE" morefann.c cp lib/AI/FANN.pm blib/lib/AI/FANN.pm Running Mkbootstrap for AI::FANN () chmod 644 FANN.bs cp FANN.bs blib/arch/auto/AI/FANN/FANN.bs chmod 644 blib/arch/auto/AI/FANN/FANN.bs cc -c -I. -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.08\" -DXS_VERSION=\"0.08\" -fPIC "-I/usr/lib/perl/5.8/CORE" FANN.c In file included from FANN.xs:13: constants.h:49: error: ‘FANN_SIN_SYMMETRIC’ undeclared here (not in a function) constants.h:50: error: ‘FANN_COS_SYMMETRIC’ undeclared here (not in a function) constants.h:51: error: ‘FANN_SIN’ undeclared here (not in a function) constants.h:52: error: ‘FANN_COS’ undeclared here (not in a function) make: *** [FANN.o] Error 1 It seems all the header file are being found (of course I installed the corresponding -dev .debs) but the symbols aren't defined anywhere. I can't find them anywhere in my /usr/include.
From: matthias.bethke [...] 1und1.de
Turns out a little commenting in constants.h fixed it when using fann2: 20c20 < "FANN_SIN_SYMMETRIC", --- Show quoted text
> /*"FANN_SIN_SYMMETRIC",
23c23 < "FANN_COS", --- Show quoted text
> "FANN_COS",*/
49c49 < FANN_SIN_SYMMETRIC, --- Show quoted text
> /*FANN_SIN_SYMMETRIC,
52a53 Show quoted text
> */
I'm not sure about the runtime impact of this but at least it compiles now. I'll do some testing now but, well, I'm new to FANN...
AI::FANN 0.08 requires libfann 2.0.1beta to work and I am not planning to make it compatible with older versions. Actually a new libfann stable version should be available soon and my idea is to release a new version of AI::FANN then. AI::FANN 0.07 works with libfann 2.0.0, and no bugs or other enhancements were done between these module versions. Cheers,