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

 
 

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

Submitter:  None
Submitted:  Thu 02 Dec 2010 04:35:55 PM UTC
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Alexander Klein Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * Mac OS
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-21 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2010-12-08 jwe StatusNone Need Info

    Back to the top


    Powered by Savane 3.9