bugGNU Octave - Bugs: bug #31753, lgamma_r and lgammaf_r not found...

 
 

bug #31753: lgamma_r and lgammaf_r not found at compile time

Submitted by:  None
Submitted on:  Thu 02 Dec 2010 04:35:55 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Alexander KleinOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 21 Feb 2011 02:22:20 AM UTC, comment #3:

The "fix" to use _REENTRANT has been documented in README.MacOS.

Rik <rik5>
Project Administrator
Wed 08 Dec 2010 09:36:59 AM UTC, comment #2:

John, your're right, the header file needs _REENTRANT to be defined in order to make the declarations available!

I built octave with gcc version 4.2.1 (Apple Inc. build 5664).

Here's the according snippet of math.h:

#ifdef _REENTRANT
#include <AvailabilityMacros.h>
// Available on OS X 10.6 and later.
extern float lgammaf_r ( float, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
extern double lgamma_r ( double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
extern long double lgammal_r ( long double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
#endif /* _REENTRANT */

Anonymous
Wed 08 Dec 2010 08:31:28 AM UTC, comment #1:

The configure test just checks to see whether the symbol exists in a library, but Octave requires a declaration. Probably it is expected to be in <math.h>. Does your system require special flags to make <math.h> provide a declaration for these functions?

What version of GCC are you using to build Octave?

John W. Eaton <jwe>
Project Administrator
Thu 02 Dec 2010 04:35:55 PM UTC, original submission:

Hi,

I'm just building Octave 3.2.4 on OSX 10.6.5, and although lgamma[f]_r is found by configure, it is not found at compile time:

checking for lgamma... yes
checking for lgammaf... yes
checking for lgamma_r... yes
checking for lgammaf_r... yes

g++ -c -I/usr/local/alternate/include -I/usr/X11/include/freetype2 -I/usr/X11/include -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 -I/usr/X11/include/freetype2 -I/usr/X11/include -D_THREAD_SAFE lo-specfun.cc -o pic/lo-specfun.o
lo-specfun.cc: In function 'Complex xlgamma(const Complex&)':
lo-specfun.cc:327: error: 'lgamma_r' was not declared in this scope
lo-specfun.cc: In function 'FloatComplex xlgamma(const FloatComplex&)':
lo-specfun.cc:394: error: 'lgammaf_r' was not declared in this scope

For the time being, commenting out the respective macro-definitions in config.h seems to fix the issue.

Kind regards,

Alex

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 21 Feb 2011 02:22:20 AM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Wed 08 Dec 2010 08:31:28 AM UTCjweStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1