Latest from hg on OSX

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Latest from hg on OSX

by John Swensen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Once compiled everything, I had and still have a problem resizing the figure
window, but I'm already in contact with Shai about that. I think there is still
a bug in the fltk sources but I currently cannot really figure out the problem -
so help is wanted ;)

But that's it already, all the sources are ok and can be compiled without error
as long as the dependencies do work pretty. The window appears and display of
the fltk/GL window is really great, thanks to Shai and Michael,

Regards,

   Thomas

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Latest from hg on OSX

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday, June 10, 2008, at 05:24PM, "Thomas Treichl" <Thomas.Treichl@...> wrote:

>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
>

Thomas,

Might the current hg compile with fltk-aqua 1.1.7-1001? ... or is 1.1.9 required? ... perhaps fltk-aqua won't work either and I'll need fltk-x11?

If fltk-aqua 1.1.7-1001 is all that is needed, it should be a fairly simple task to get the current hg version working using Fink for the dependencies.

Ben





Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ben Abbott schrieb:

> On Tuesday, June 10, 2008, at 05:24PM, "Thomas Treichl" <Thomas.Treichl@...> wrote:
>> 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
>>
>
> Thomas,
>
> Might the current hg compile with fltk-aqua 1.1.7-1001? ... or is 1.1.9 required? ... perhaps fltk-aqua won't work either and I'll need fltk-x11?
>
> If fltk-aqua 1.1.7-1001 is all that is needed, it should be a fairly simple task to get the current hg version working using Fink for the dependencies.

I don't know Ben, I'm always using the latest stable releases of source packages
which for fltk is 1.1.9. Don't know what is included in fltk-aqua? I would say
that if the test programs glpuzzle and gl_overlay display something then you
might have a good chance that the one as well as the other package can be taken.
I hope this helps,

   Thomas

Re: Latest from hg on OSX

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 11, 2008, at 3:10 AM, Thomas Treichl wrote:

> Ben Abbott schrieb:
>> On Tuesday, June 10, 2008, at 05:24PM, "Thomas Treichl" <Thomas.Treichl@...
>> > wrote:
>>> 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
>>>
>> Thomas, Might the current hg compile with fltk-aqua 1.1.7-1001? ...  
>> or is 1.1.9 required? ... perhaps fltk-aqua won't work either and  
>> I'll need fltk-x11?
>> If fltk-aqua 1.1.7-1001 is all that is needed, it should be a  
>> fairly simple task to get the current hg version working using Fink  
>> for the dependencies.
>
> I don't know Ben, I'm always using the latest stable releases of  
> source packages which for fltk is 1.1.9. Don't know what is included  
> in fltk-aqua? I would say that if the test programs glpuzzle and  
> gl_overlay display something then you might have a good chance that  
> the one as well as the other package can be taken. I hope this helps,
>
>  Thomas

Thanks for the response. At the moment I'm having trouble with Finks  
ftgl package. Once that is resolved I'll try build the current hg  
sources and report back.

Ben

Re: Latest from hg on OSX

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10-Jun-2008, Thomas Treichl wrote:

| 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.

There is no need for the duplication.  You should only need to add -I
options to CPPFLAGS (the preprocessor is the only thing that should
need -I, and CPPFLAGS are included in the rules for building object
files that are defined in Octave's Makeconf file).

jwe

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton schrieb:
> On 10-Jun-2008, Thomas Treichl wrote:
>
> | 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.
>
> There is no need for the duplication.  You should only need to add -I
> options to CPPFLAGS (the preprocessor is the only thing that should
> need -I, and CPPFLAGS are included in the rules for building object
> files that are defined in Octave's Makeconf file).

Yes, ok, thanks.

I just found out that (I must once again correct my last email for the third
time now, sorry) we do need "-Wl,-framework -Wl,OpenGL" with LDFLAGS when
configuring the Octave sources because when linking gl-render.cc and others
together into liboctinterp.dylib it fails if not available. This framework is
currently not found automatically on a Mac platform, so I expect we could need a
test for that? If no volunteers then I'll try what I can do...

   Thomas

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thomas Treichl schrieb:

> John W. Eaton schrieb:
>> On 10-Jun-2008, Thomas Treichl wrote:
>>
>> | 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.
>>
>> There is no need for the duplication.  You should only need to add -I
>> options to CPPFLAGS (the preprocessor is the only thing that should
>> need -I, and CPPFLAGS are included in the rules for building object
>> files that are defined in Octave's Makeconf file).
>
> I just found out that (I must once again correct my last email for the
> third time now, sorry) we do need "-Wl,-framework -Wl,OpenGL" with
> LDFLAGS when configuring the Octave sources because when linking
> gl-render.cc and others together into liboctinterp.dylib it fails if not
> available. This framework is currently not found automatically on a Mac
> platform, so I expect we could need a test for that? If no volunteers
> then I'll try what I can do...
I have included a changeset which checks for Apple's OpenGL framework. But this
is not the only change that is needed, I also needed to add $(OPENGL_LIBS) into
src/Makefile.in line 277 OCTINTERP_LINK_DEPS. I am not sure if this is the right
place, but liboctinterp.dylib can be created now. If yes, then I can send
another changeset for this?

   Thomas

# HG changeset patch
# User Thomas Treichl <Thomas.Treichl@...>
# Date 1213212541 -7200
# Node ID 196460d34d22384a46952252bd3542fff8047256
# Parent  7609a985a052aa0eddd09b2f5193f85c4def08f1
Changes to the OCTAVE_OPENGL macro for MacOSX.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 2008-06-05  John W. Eaton  <jwe@...
+2008-06-11  Thomas Treichl  <Thomas.Treichl@...>
+
+ * aclocal.m4: Changes to the OCTAVE_OPENGL macro for MacOSX.
+
 2008-06-05  John W. Eaton  <jwe@...>
 
  * configure.in: Add FT2_CFLAGS to XTRA_CXXFLAGS, not CXXFLAGS.
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1056,8 +1056,6 @@ dnl
 dnl
 dnl Check for OpenGL. If found, define OPENGL_LIBS
 dnl
-dnl FIXME -- add tests for apple
-dnl
 AC_DEFUN([OCTAVE_OPENGL], [
 OPENGL_LIBS=
 case $canonical_host_type in
@@ -1093,6 +1091,16 @@ glEnable(GL_SMOOTH);], OPENGL_LIBS="-lop
       else
         AC_MSG_RESULT(no)
       fi
+      ;;
+    *-apple-darwin*)
+      vlib_flags="-Wl,-framework -Wl,OpenGL"
+      save_LIBS="$LIBS"; LIBS="$vlib_flags $LIBS"
+      AC_MSG_CHECKING([for glEnable in $vlib_flags])
+      AC_LINK_IFELSE([AC_LANG_CALL([], [glEnable])],
+                     [macosx_opengl_ok=yes; OPENGL_LIBS="$vlib_flags"],
+                     [macosx_opengl_ok=no; OPENGL_LIBS=""])
+      AC_MSG_RESULT($macosx_opengl_ok)
+      LIBS="$save_LIBS"
       ;;
     *)
       save_LDFLAGS="$LDFLAGS"

Parent Message unknown Re: Latest from hg on OSX

by Carlo de Falco-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 11/giu/08, at 14:32, octave-maintainers-request@... wrote:

> ------------------------------
>
> Message: 3
> Date: Tue, 10 Jun 2008 14:43:15 -0700
> From: Ben Abbott <bpabbott@...>
> Subject: Re: Latest from hg on OSX
> To: Thomas Treichl <Thomas.Treichl@...>
> Cc: Octave Maintainers List <octave-maintainers@...>
> Message-ID:
> <2935FB5E-011A-1000-E9E8-8400755E330C-Webmail-10013@...>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thomas,
>
> Might the current hg compile with fltk-aqua 1.1.7-1001? ... or is  
> 1.1.9 required? ... perhaps fltk-aqua won't work either and I'll  
> need fltk-x11?
>
> If fltk-aqua 1.1.7-1001 is all that is needed, it should be a fairly  
> simple task to get the current hg version working using Fink for the  
> dependencies.
>
> Ben

Hi,

I recently posted on the help-list as I had missed this thread...
I have been trying to build latest hg sources against fltk-aqua
from fink.

1) I am using the following flags:

./configure LDFLAGS="-L/sw/lib -framework OpenGL" CPPFLAGS="-I/sw/
include -FOpenGL" F77=gfortran FFLAGS="-ff2c" --prefix=/opt/octave/

2) I had to change
#include GL/gl.h    to     #include OpenGL/gl.h
and
#include GL/glu.h   to     #include OpenGL/glu.h
in gl-renderer.h

3) The build is completed but the resulting octave has problems
parsing some m-files. This was already mentioned in another thread,
a workaround seems to be adding some white space at the and of those
files

as for item 2) I haven't seen any other mention of this problem in  
this thread
so I was wondering if I have done something wrong there...

HTH,
c.



Parent Message unknown Re: Latest from hg on OSX

by Carlo de Falco-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 11/giu/08, at 14:32, octave-maintainers-request@... wrote:

> ------------------------------
>
> Message: 3
> Date: Tue, 10 Jun 2008 14:43:15 -0700
> From: Ben Abbott <bpabbott@...>
> Subject: Re: Latest from hg on OSX
> To: Thomas Treichl <Thomas.Treichl@...>
> Cc: Octave Maintainers List <octave-maintainers@...>
> Message-ID:
> <2935FB5E-011A-1000-E9E8-8400755E330C-Webmail-10013@...>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thomas,
>
> Might the current hg compile with fltk-aqua 1.1.7-1001? ... or is  
> 1.1.9 required? ... perhaps fltk-aqua won't work either and I'll  
> need fltk-x11?
>
> If fltk-aqua 1.1.7-1001 is all that is needed, it should be a fairly  
> simple task to get the current hg version working using Fink for the  
> dependencies.
>
> Ben

Hi,

I recently posted on the help-list as I had missed this thread...
I have been trying to build latest hg sources against fltk-aqua
from fink.

1) I am using the following flags:

./configure LDFLAGS="-L/sw/lib -framework OpenGL" CPPFLAGS="-I/sw/
include -FOpenGL" F77=gfortran FFLAGS="-ff2c" --prefix=/opt/octave/

2) I had to change
#include GL/gl.h    to     #include OpenGL/gl.h
and
#include GL/glu.h   to     #include OpenGL/glu.h
in gl-renderer.h

3) The build is completed but the resulting octave has problems
parsing some m-files. This was already mentioned in another thread,
a workaround seems to be adding some white space at the and of those
files

as for item 2) I haven't seen any other mention of this problem in  
this thread
so I was wondering if I have done something wrong there...

HTH,
c.



Re: Latest from hg on OSX

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday, June 17, 2008, at 02:34PM, "Carlo de Falco" <carlo.defalco@...> wrote:

>
>On 11/giu/08, at 14:32, octave-maintainers-request@... wrote:
>> ------------------------------
>>
>> Message: 3
>> Date: Tue, 10 Jun 2008 14:43:15 -0700
>> From: Ben Abbott <bpabbott@...>
>> Subject: Re: Latest from hg on OSX
>> To: Thomas Treichl <Thomas.Treichl@...>
>> Cc: Octave Maintainers List <octave-maintainers@...>
>> Message-ID:
>> <2935FB5E-011A-1000-E9E8-8400755E330C-Webmail-10013@...>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Thomas,
>>
>> Might the current hg compile with fltk-aqua 1.1.7-1001? ... or is  
>> 1.1.9 required? ... perhaps fltk-aqua won't work either and I'll  
>> need fltk-x11?
>>
>> If fltk-aqua 1.1.7-1001 is all that is needed, it should be a fairly  
>> simple task to get the current hg version working using Fink for the  
>> dependencies.
>>
>> Ben
>
>Hi,
>
>I recently posted on the help-list as I had missed this thread...
>I have been trying to build latest hg sources against fltk-aqua
>from fink.
>
>1) I am using the following flags:
>
>./configure LDFLAGS="-L/sw/lib -framework OpenGL" CPPFLAGS="-I/sw/
>include -FOpenGL" F77=gfortran FFLAGS="-ff2c" --prefix=/opt/octave/
>
>2) I had to change
>#include GL/gl.h    to     #include OpenGL/gl.h
>and
>#include GL/glu.h   to     #include OpenGL/glu.h
>in gl-renderer.h
>
>3) The build is completed but the resulting octave has problems
>parsing some m-files. This was already mentioned in another thread,
>a workaround seems to be adding some white space at the and of those
>files
>
>as for item 2) I haven't seen any other mention of this problem in  
>this thread
>so I was wondering if I have done something wrong there...
>
>HTH,
>c.
>

You're ahead of me. I'm presently unable to get Fink's fltk-aqua to build :-(

I plan ask seek some help form the Fink team when I have the time. Once I am able to build the new dependencies I might be of more help.

Perhaps you can give me a hand with my difficulty?

Are your running Leopard? ... and is you Mac PPC or Intel based?

In either event, did you have a problem building fltk-aqua?

Ben

Re: Latest from hg on OSX

by shaiay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...> wrote:

> 2) I had to change
> #include GL/gl.h    to     #include OpenGL/gl.h
> and
> #include GL/glu.h   to     #include OpenGL/glu.h
> in gl-renderer.h

Michael,

I think the fltk team have figured out a cross platform way of
including the OpenGL headers:

http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h

maybe we should adopt it?

Shai

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shai Ayal schrieb:

> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...> wrote:
>
>> 2) I had to change
>> #include GL/gl.h    to     #include OpenGL/gl.h
>> and
>> #include GL/glu.h   to     #include OpenGL/glu.h
>> in gl-renderer.h
>
> Michael,
>
> I think the fltk team have figured out a cross platform way of
> including the OpenGL headers:
>
> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>
> maybe we should adopt it?

I wonder where this OpenGL directory comes from or where it should be placed? I
searched my Mac for that OpenGL directory but couldn't find it. I have used
Apple's original GL framework, the headers are in /usr/X11R6/include/GL and the
libs can be accessed by '-framework OpenGL'. There are no changes necessary from
my point of view. Somebody please posts the output from

   bash~$ sudo find / -iname OpenGL

and

   bash~$ sudo find / -iname gl.h

Thanks,
   Thomas

Re: Latest from hg on OSX

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday, June 17, 2008, at 03:39PM, "Thomas Treichl" <Thomas.Treichl@...> wrote:

>Shai Ayal schrieb:
>> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...> wrote:
>>
>>> 2) I had to change
>>> #include GL/gl.h    to     #include OpenGL/gl.h
>>> and
>>> #include GL/glu.h   to     #include OpenGL/glu.h
>>> in gl-renderer.h
>>
>> Michael,
>>
>> I think the fltk team have figured out a cross platform way of
>> including the OpenGL headers:
>>
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>>
>> maybe we should adopt it?
>
>I wonder where this OpenGL directory comes from or where it should be placed? I
>searched my Mac for that OpenGL directory but couldn't find it. I have used
>Apple's original GL framework, the headers are in /usr/X11R6/include/GL and the
>libs can be accessed by '-framework OpenGL'. There are no changes necessary from
>my point of view. Somebody please posts the output from
>
>   bash~$ sudo find / -iname OpenGL
>
>and
>
>   bash~$ sudo find / -iname gl.h
>
>Thanks,
>   Thomas
>

PPC (G5) based Mac running Tiger

$ sudo find / -iname OpenGL
Password:
/Applications/MATLAB71/sys/opengl
/Developer/Examples/OpenGL
/Developer/qt/examples/demo/opengl
/Developer/qt/examples/opengl
/Developer/qt/src/opengl
/Developer/qt/tools/designer/examples/opengl
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/sw/share/doc/kde/en/kinfocenter/opengl
/sw/share/doc/qt3/examples/demo/opengl
/sw/share/doc/qt3/examples/opengl
/sw/share/doc/qt4-x11/examples/opengl
/System/Library/Frameworks/OpenGL.framework/OpenGL
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/usr/local/lib/fpc/2.2.0/units/powerpc-darwin/opengl
/usr/local/share/examples/fpc-2.2.0/opengl
$ sudo find / -iname gl.h
Password:
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/GL/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL/gl.h
/sw/include/FL/gl.h
/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/usr/X11R6/include/GL/gl.h

Ben

p.s. Intel running Leopard to follow soon.



Re: Latest from hg on OSX

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday, June 17, 2008, at 03:39PM, "Thomas Treichl" <Thomas.Treichl@...> wrote:

>Shai Ayal schrieb:
>> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...> wrote:
>>
>>> 2) I had to change
>>> #include GL/gl.h    to     #include OpenGL/gl.h
>>> and
>>> #include GL/glu.h   to     #include OpenGL/glu.h
>>> in gl-renderer.h
>>
>> Michael,
>>
>> I think the fltk team have figured out a cross platform way of
>> including the OpenGL headers:
>>
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>>
>> maybe we should adopt it?
>
>I wonder where this OpenGL directory comes from or where it should be placed? I
>searched my Mac for that OpenGL directory but couldn't find it. I have used
>Apple's original GL framework, the headers are in /usr/X11R6/include/GL and the
>libs can be accessed by '-framework OpenGL'. There are no changes necessary from
>my point of view. Somebody please posts the output from
>
>   bash~$ sudo find / -iname OpenGL
>
>and
>
>   bash~$ sudo find / -iname gl.h
>
>Thanks,
>   Thomas
>

Intel based Mac running Leopard (10.5.3)

$ sudo find / -iname OpenGL
Password:
/Developer/Examples/OpenGL
/Developer/Examples/Python/PyObjC/Cocoa/OpenGL
/Developer/Examples/Qt/opengl
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/sw/share/doc/kde/en/kinfocenter/opengl
/sw/share/doc/qt3/examples/demo/opengl
/sw/share/doc/qt3/examples/opengl
/sw/share/doc/qt4-x11/examples/opengl
/System/Library/Frameworks/OpenGL.framework/OpenGL
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/Users/bpabbott/Development/mercurial/octave/.hg/store/data/src/graphics/opengl
bens-macbook:~ bpabbott$ sudo find / -iname gl.h
Password:
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL/gl.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/gl.h
/sw/include/FL/gl.h
/sw/include/mesa/GL/gl.h
/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/usr/X11/include/GL/gl.h
/usr/X11R6 1/include/GL/gl.h

Ben

p.s. If useful I can supply PPC (G4) results for Leopard as well.

Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ben Abbott schrieb:

> On Tuesday, June 17, 2008, at 03:39PM, "Thomas Treichl" <Thomas.Treichl@...> wrote:
>> Shai Ayal schrieb:
>>> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...> wrote:
>>>> 2) I had to change
>>>> #include GL/gl.h    to     #include OpenGL/gl.h
>>>> and
>>>> #include GL/glu.h   to     #include OpenGL/glu.h
>>>> in gl-renderer.h
>>> Michael,
>>>
>>> I think the fltk team have figured out a cross platform way of
>>> including the OpenGL headers:
>>>
>>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
>>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>>>
>>> maybe we should adopt it?
>> I wonder where this OpenGL directory comes from or where it should be placed? I
>> searched my Mac for that OpenGL directory but couldn't find it. I have used
>> Apple's original GL framework, the headers are in /usr/X11R6/include/GL and the
>> libs can be accessed by '-framework OpenGL'. There are no changes necessary from
>> my point of view. Somebody please posts the output from
>>
>>   bash~$ sudo find / -iname OpenGL
>>
>> and
>>
>>   bash~$ sudo find / -iname gl.h
>>
>> Thanks,
>>   Thomas
>>
>
> Intel based Mac running Leopard (10.5.3)
>
<STRIP>

> bens-macbook:~ bpabbott$ sudo find / -iname gl.h
> Password:
> /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
> /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
> /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL/gl.h
> /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
> /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/gl.h
> /sw/include/FL/gl.h
> /sw/include/mesa/GL/gl.h
> /System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
> /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
> /usr/X11/include/GL/gl.h
> /usr/X11R6 1/include/GL/gl.h
>
> Ben
>
> p.s. If useful I can supply PPC (G4) results for Leopard as well.

Thanks Ben, not necessary - that's enough. I can see the same output that I can
also see on my Mac. But I still do not understand why it should be necessary to
#include <OpenGL/gl.h> instead of #include <GL/gl.h> on a Mac platform? I think
we need Carlo's output of

   bash~$ sudo find / -iname gl.h

I also tried to replace the #include <GL/gl.h> with #include <OpenGL/gl.h> and
the same for the glu.h. Next I tried the -FOpenGL flag with CPPFLAGS. All with
the same result: a compilation error. So, might there be some mismatch of GL
headers? BTW, I'm posting my output from my Intel 10.4.9 system (that, BTW, I
try to keep as clean as possible):

/Applications/Octave.app/Contents/Resources/include/FL/gl.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/GL/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL/gl.h
/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/usr/X11R6/include/GL/gl.h

Thomas

Re: Latest from hg on OSX

by Carlo de Falco-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 17/giu/08, at 20:39, Thomas Treichl wrote:

> Shai Ayal schrieb:
>> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco <carlo.defalco@...
>> > wrote:
>>> 2) I had to change
>>> #include GL/gl.h    to     #include OpenGL/gl.h
>>> and
>>> #include GL/glu.h   to     #include OpenGL/glu.h
>>> in gl-renderer.h
>> Michael,
>> I think the fltk team have figured out a cross platform way of
>> including the OpenGL headers:
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>> maybe we should adopt it?
>
> I wonder where this OpenGL directory comes from or where it should  
> be placed? I searched my Mac for that OpenGL directory but couldn't  
> find it. I have used Apple's original GL framework, the headers are  
> in /usr/X11R6/include/GL and the libs can be accessed by '-framework  
> OpenGL'. There are no changes necessary from my point of view.  
> Somebody please posts the output from
>
>  bash~$ sudo find / -iname OpenGL
>
> and
>
>  bash~$ sudo find / -iname gl.h
>
> Thanks,
>  Thomas

Thomas

as far as I understand
-framework OpenGL and -FOpenGL
on darwin are shortcuts for
-L/System/Library/Frameworks/OpenGL.framework/Libraries
and
-I/System/Library/Frameworks/OpenGL.framework/Headers
and from the apple gcc manpage

"An example include looks like "#include <Framework/header.h>", where
  Framework denotes the name of the framework and header.h is found in
  the "PrivateHeaders" or "Headers" directory."

so I beleive that
#include <OpenGL/gl.h>
includes
-I/System/Library/Frameworks/OpenGL.framework/Headers/gl.h

and indeed FL/gl.h from fltk uses the same include clause:

#  ifdef __APPLE__
#    include <OpenGL/gl.h>
#  else
#    include <GL/gl.h>
#  endif

c.


Re: Latest from hg on OSX

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Carlo de Falco schrieb:

>
> On 17/giu/08, at 20:39, Thomas Treichl wrote:
>
>> Shai Ayal schrieb:
>>> On Tue, Jun 17, 2008 at 9:18 PM, Carlo de Falco
>>> <carlo.defalco@...> wrote:
>>>> 2) I had to change
>>>> #include GL/gl.h    to     #include OpenGL/gl.h
>>>> and
>>>> #include GL/glu.h   to     #include OpenGL/glu.h
>>>> in gl-renderer.h
>>> Michael,
>>> I think the fltk team have figured out a cross platform way of
>>> including the OpenGL headers:
>>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/gl.h
>>> http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.8/FL/glu.h
>>> maybe we should adopt it?
>>
>> I wonder where this OpenGL directory comes from or where it should be
>> placed? I searched my Mac for that OpenGL directory but couldn't find
>> it. I have used Apple's original GL framework, the headers are in
>> /usr/X11R6/include/GL and the libs can be accessed by '-framework
>> OpenGL'. There are no changes necessary from my point of view.
>> Somebody please posts the output from
>>
>>  bash~$ sudo find / -iname OpenGL
>>
>> and
>>
>>  bash~$ sudo find / -iname gl.h
>>
>> Thanks,
>>  Thomas
>
> Thomas
>
> as far as I understand
> -framework OpenGL and -FOpenGL
> on darwin are shortcuts for
> -L/System/Library/Frameworks/OpenGL.framework/Libraries
> and
> -I/System/Library/Frameworks/OpenGL.framework/Headers
> and from the apple gcc manpage
>
> "An example include looks like "#include <Framework/header.h>", where
>  Framework denotes the name of the framework and header.h is found in
>  the "PrivateHeaders" or "Headers" directory."
>
> so I beleive that
> #include <OpenGL/gl.h>
> includes
> -I/System/Library/Frameworks/OpenGL.framework/Headers/gl.h
>
> and indeed FL/gl.h from fltk uses the same include clause:
>
> #  ifdef __APPLE__
> #    include <OpenGL/gl.h>
> #  else
> #    include <GL/gl.h>
> #  endif

Ok for me, but then I vote for a configure-test which automatically sets up
"all" necessary Mac-specific compiler and linker options and ignores all the
other UNIX options.
My thought always has been to keep as much UNIX as possible for Mac too and to
not make the codes depend on too many platform specials, eg. like the Mac-only
-FOpenGL option and an #include <Framework/whatever.h> or similar.

   Thomas

Re: Latest from hg on OSX

by Carlo de Falco-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 17/giu/08, at 23:01, Thomas Treichl wrote:

> Ok for me, but then I vote for a configure-test which automatically  
> sets up "all" necessary Mac-specific compiler and linker options and  
> ignores all the other UNIX options.
> My thought always has been to keep as much UNIX as possible for Mac  
> too and to not make the codes depend on too many platform specials,  
> eg. like the Mac-only -FOpenGL option and an #include <Framework/
> whatever.h> or similar.
>
> Thomas

Then, what about including FL/gl.h and FL/glu.h and rely on fltk to  
chose where to find OpenGL library and headers?
c.

< Prev | 1 - 2 | Next >