[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave fails to build on 64-bit OSX w/ FLTK
From: |
Ben Abbott |
Subject: |
Re: Octave fails to build on 64-bit OSX w/ FLTK |
Date: |
Thu, 03 Feb 2011 07:54:13 -0500 |
On Feb 3, 2011, at 4:00 AM, Jarno Rajahalme wrote:
> I have reported this before, and I have a better fix that requires a change
> to FLTK (which I have proposed there), but in the meanwhile this needs to be
> addressed:
>
> There is a typedef/Class name clash between OSX system headers and Octave. It
> seems to me that this SHOULD affect 32-bit builds as well, but I have not
> tested that.
>
> OSX header
> /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Lists.h
> has this:
>
> typedef Point Cell;
>
> Which breaks Octave class declarations of type "class Cell;" resulting in
> compile error:
>
> ./ov.h: At global scope:
> ./ov.h:46: error: using typedef-name ‘Cell’ after ‘class’
>
> Fortunately the file Lists.h is not needed for using FLTK, at least not for
> 64-bit builds (*), so this compile error can be avoided by having the
> following in the CPPFLAGS when calling configure:
>
> "-D__LISTS__"
>
> This has the effect of not including the offending OSX include file when
> building octave. After this the build succeeds (3.3.91), with only the known
> mapper failure. I compiled with the Apple gcc-4.2, using my blas wrapper
> library and all other dependencies from macports (compiled with
> gcc43/gcc44/gcc45).
>
> At the minimum this should be addressed in README.MacOS
>
> Jarno
>
> (*) Comment from Lists.h:
>
> /*
> * List Manager
> *
> * Discussion:
> * The List Manager is deprecated in Mac OS X 10.5 and later, and is
> * not included in the 64-bit version of HIToolbox. Applications
> * should use the Data Browser instead of the List Manager.
> */
> typedef Point Cell;
> ...
Is there any reason not to include the -D__LISTS__ flag for both 32 and 64bit
builds?
Regarding README.MacOS, I can add this flag to the CPPFLAGS. If you'd like to
include some descriptive langauge, can you make a proposal?
Ben