Fwd: attempt to build on Mac OS 10.6 (Snow Leopard)
Lenore Horner
LenoreHorner at sbcglobal.net
Mon Aug 31 19:00:54 PDT 2009
(Forwarding Octave list exchange as they try to figure out why Octave
won't build except with g95. The previously said it must be a MP
fault.)
Begin forwarded message:
> From: Ben Abbott <bpabbott at mac.com>
> Date: August 30, 2009 10:58:12 PM CDT
> To: "John W. Eaton" <jwe at octave.org>
> Cc: Lenore Horner <lhorner at siue.edu>, octave maintainers mailing
> list <maintainers at octave.org>
> Subject: Re: attempt to build on Mac OS 10.6 (Snow Leopard)
>
>
> On Aug 30, 2009, at 11:48 PM, John W. Eaton wrote:
>
>> On 30-Aug-2009, John W. Eaton wrote:
>>
>> | On 30-Aug-2009, Ben Abbott wrote:
>> |
>> | | Thanks Joel. WIth Mac OS 10.6, I now get as far as ...
>> | |
>> | | g++-4 -c -I/sw/include -I/sw/include/freetype2 -I/sw/lib/flex/
>> include -
>> | | I/sw/include -fPIC -I. -I.. -I../liboctave -I../src -I../
>> libcruft/
>> | | misc -DHAVE_CONFIG_H -mieee-fp -I/sw/include/freetype2 -I/sw/
>> include -
>> | | I/usr/X11/include -Wall -W -Wshadow -Wold-style-cast -Wformat
>> -g -O2
>> | | -D_THREAD_SAFE lo-specfun.cc -o pic/lo-specfun.o
>> | | lo-specfun.cc: In function $,1rx(BComplex xlgamma(const
>> Complex&)$,1ry(B:
>> | | lo-specfun.cc:327: error: $,1rx(Blgamma_r$,1ry(B was not
>> declared in this scope
>> | | lo-specfun.cc: In function $,1rx(BFloatComplex xlgamma(const
>> FloatComplex&)$,1ry(B:
>> | | lo-specfun.cc:394: error: $,1rx(Blgammaf_r$,1ry(B was not
>> declared in this scope
>> | | make[2]: *** [pic/lo-specfun.o] Error 1
>> | | make[1]: *** [liboctave] Error 2
>> | | make: *** [all] Error 2
>> |
>> | Your system apparently has lgamma_r, but maybe something needs to
>> be
>> | defined for it to be declared? On my system (Debian, using GNU
>> libc)
>> | it is declared in math.h (actually, in bits/mathcalls.h, which is
>> | unconditionally included in math.h. It's declaration apparently
>> | requires __USE_MISC to be defined, but apparently it is by default.
>> | Of course, the details on OS X may be completely different, but
>> maybe
>> | you could start by searching for declarations of lgamma in
>> | /usr/include?
>>
>> Oh, I just found the page
>>
>> http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/lgamma_r.3.html
>>
>> Which says that you need to define _REENTRANT before including math.h
>> in order for lgamma_r to be declared. What happens if you make the
>> following change?
>>
>> diff --git a/liboctave/lo-specfun.cc b/liboctave/lo-specfun.cc
>> --- a/liboctave/lo-specfun.cc
>> +++ b/liboctave/lo-specfun.cc
>> @@ -25,6 +25,12 @@
>> #include <config.h>
>> #endif
>>
>> +#if !defined (_REENTRANT)
>> +#define _REENTRANT
>> +#endif
>> +#include <cmath>
>> +#undef _REENTRANT
>> +
>> #include "Range.h"
>> #include "CColVector.h"
>> #include "CMatrix.h"
>>
>>
>> If we include this change in Octave, then maybe we should restrict it
>> to OS X systems? Ugh. Is there a better way?
>>
>> jwe
>
> I've run ./configure with you change, and make has now progressed
> past lo-specfun.o
>
> Thanks
> Ben
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090831/554aa830/attachment.html>
More information about the macports-users
mailing list