Latest from hg on OSX

Thomas Treichl Thomas.Treichl at gmx.net
Tue Jun 10 16:16:12 CDT 2008


Thomas Treichl schrieb:
> John Swensen schrieb:
>> Has anyone got Octave to compile from the repository on OSX?  I keep 
>> getting OpenGL errors.  First I was getting a compile error that it 
>> couldn't find gl.h and glu.h.  So, I tried to add CXXFLAGS pointing to 
>> either the OSX Framework or /sw/include/mesa.  Either way, I get link 
>> errrors that it can't find all the opengl functions.  I tried to use 
>> LDFLAGS to point to either the OSX framework of /sw/lib/mesa, but 
>> can't get rid of the link error.  Any suggestions?
>>
>> John Swensen   
> 
> Hi John,
> 
> I'm running Octave with fltk/GL a few days now. It was a little bit 
> tricky to make the fltk/GL libs working, but now I have a nice FLTK 
> window displaying graphs.
> 
> I downloaded two new source packages that we need on MacOSX -> fltk 
> 1.1.9 and ftgl 2.1.2. I compiled both from source against MacOSX's 
> OpenGL libs.
> 
> For fltk I had to use the configure flags "--enable-shared 
> --enable-quartz --enable-gl" - I also tried other flags but without 
> better results. I also needed to remove the optimization flag 
> "-ftree-vectorize" from my C-,CPP-,CXXFLAGS - with this flag the fltk/GL 
> engine doesn't work. No changes necessary for LDFLAGS here. Once you 
> have compiled fltk, make sure that in the fltk/test directory the 
> programs gl_overlay and glpuzzle display the graphs - otherwise you 
> won't have a chance to compile fltk/GL with Octave.
> 
> For ftgl I had to call "autoreconf" before "configure". I also needed to 
> add "-I/usr/X11R6/include" to my C-,CPP-,CXXFLAGS and "-framework 
> OpenGL" to my LDFLAGS. Then the steps configure, make, make install work 
> very well.
> 
> Finally, I also added "-I/usr/X11R6/include" to my C-,CPP-,CXXFLAGS 
> before configuring the Octave sources and "-Wl,-framework -Wl,OpenGL" to 
> the LDFLAGS. I must say here that I haven't tried to configure the 
> Octave sources without these flags - I think I must check this out, 
> ideally they should automatically be found by the configure script on a 
> Mac system.

I checked it, "-I/usr/X11R6/include" is necessary, "-Wl,-framework -Wl,OpenGL" 
can be neglected for Octave.

And I forgot to say that I also needed to compile a new freetype2 because the 
one that comes with OSX 10.4.9 is too old. Maybe this is not necessary with OSX 
10.5.2. No FLAGS necessary for the configure step of freetype2, it compiles fine.

Regards,

   Thomas


More information about the Octave-maintainers mailing list