Octave 4.0 on Mac OS Yosemite (with gui!)

classic Classic list List threaded Threaded
53 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Alexander Hansen-2

On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:


On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:

On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:

On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:

The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.

Initially, I got ...


Hi Ben,

the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me

https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch

Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)

Sebastian

Sebastian,

I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!

Marius
--
Marius Schamschula

Hi Sabastian,

Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.

panic: Segmentation fault: 11 -- stopping myself

Were you and/or Marius able to print via osmesa.

Ben

Opps, I configured with the following options, and used Macports osmesa port.

            --without-x \
            --with-OSMesa \
            --with-OSMesa-includedir=/sw/include/mesa \
            --with-OSMesa-libdir=/sw/lib/mesa

$ fink list mesa
Information about 10253 packages read in 14 seconds.
 i   mesa                                 7.0.2-3                     3-D graphics library
     mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
     mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
 i   mesa-shlibs                          7.0.2-3                     3-D graphics library
 i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]

Ben


That’d be Fink’s osmesa. :-)

If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.

-- 
Alexander Hansen, Ph.D.
Fink User Liaison

Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

bpabbott
Administrator
On Oct 5, 2015, at 7:46 PM, Alexander Hansen <[hidden email]> wrote:

On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:

On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:

On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:

On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:

The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.

Initially, I got ...

Hi Ben,

the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me

https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch

Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)

Sebastian

Sebastian,

I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!

Marius
--
Marius Schamschula

Hi Sabastian,

Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.

panic: Segmentation fault: 11 -- stopping myself

Were you and/or Marius able to print via osmesa.

Ben

Opps, I configured with the following options, and used Macports osmesa port.

            --without-x \
            --with-OSMesa \
            --with-OSMesa-includedir=/sw/include/mesa \
            --with-OSMesa-libdir=/sw/lib/mesa

$ fink list mesa
Information about 10253 packages read in 14 seconds.
 i   mesa                                 7.0.2-3                     3-D graphics library
     mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
     mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
 i   mesa-shlibs                          7.0.2-3                     3-D graphics library
 i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]

Ben


That’d be Fink’s osmesa. :-)

If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.

-- 
Alexander Hansen, Ph.D.
Fink User Liaison

Hi Alex,

Opps. You are correct, I mis-typed. I’m using Fink, not macports … groan!

Does Fink’s mesa work with the OpenGL Carbon framework?

And what is the relationship between "system-pkgconfig-osmesa 8-1” and the mesa 7.0.2-3 package?

Ben



Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Alexander Hansen-2

> On Oct 5, 2015, at 16:51, Ben Abbott <[hidden email]> wrote:
>
>> On Oct 5, 2015, at 7:46 PM, Alexander Hansen <[hidden email]> wrote:
>>
>>> On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:
>>>
>>>> On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:
>>>>
>>>>> On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:
>>>>>
>>>>> On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:
>>>>>
>>>>>>> The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.
>>>>>>>
>>>>>>> Initially, I got ...
>>>>>>
>>>>>> Hi Ben,
>>>>>>
>>>>>> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>>>>>>
>>>>>> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>>>>>>
>>>>>> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)
>>>>>>
>>>>>> Sebastian
>>>>>
>>>>> Sebastian,
>>>>>
>>>>> I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!
>>>>>
>>>>> Marius
>>>>> --
>>>>> Marius Schamschula
>>>>
>>>> Hi Sabastian,
>>>>
>>>> Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.
>>>>
>>>> panic: Segmentation fault: 11 -- stopping myself
>>>>
>>>> Were you and/or Marius able to print via osmesa.
>>>>
>>>> Ben
>>>
>>> Opps, I configured with the following options, and used Macports osmesa port.
>>>
>>>             --without-x \
>>>             --with-OSMesa \
>>>             --with-OSMesa-includedir=/sw/include/mesa \
>>>             --with-OSMesa-libdir=/sw/lib/mesa
>>>
>>> $ fink list mesa
>>> Information about 10253 packages read in 14 seconds.
>>>  i   mesa                                 7.0.2-3                     3-D graphics library
>>>      mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
>>>      mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
>>>  i   mesa-shlibs                          7.0.2-3                     3-D graphics library
>>>  i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]
>>>
>>> Ben
>>>
>>
>> That’d be Fink’s osmesa. :-)
>>
>> If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.
>>
>> --
>> Alexander Hansen, Ph.D.
>> Fink User Liaison
>
> Hi Alex,
>
> Opps. You are correct, I mis-typed. I’m using Fink, not macports … groan!
>
> Does Fink’s mesa work with the OpenGL Carbon framework?
>
> And what is the relationship between "system-pkgconfig-osmesa 8-1” and the mesa 7.0.2-3 package?
>
> Ben
>
>
>

I don’t know much about it, but the last note from a maintainer said:  

Care needs to be taken to avoid system OpenGL,
 if you want to use Mesa3d, while compiling, like
 making sure that it's first in the linker's search
 path. Otherwise, you get runtime errors.

So my thought is that it isn’t compatible with OpenGL.framework

system-pkgconfig-osmesa isn’t related to the mesa package at all—it’s an indicator for the version of /opt/X11/lib/pkgconfig/osmesa.pc.

—Alex
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

bpabbott
Administrator
In reply to this post by bpabbott

On Oct 5, 2015, at 7:54 PM, Marius Schamschula <[hidden email]> wrote:

Ben,

On Oct 5, 2015, at 6:32 PM, Ben Abbott <[hidden email]> wrote:

On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:

On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:

The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.

Initially, I got ...


Hi Ben,

the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me

https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch

Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)

Sebastian

Sebastian,

I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!

Marius
--
Marius Schamschula

Hi Sabastian,

Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.

panic: Segmentation fault: 11 -- stopping myself

Were you and/or Marius able to print via osmesa.

Ben

I don’t get a seg fault. However, the field of the plot is all black for both visible “on" and “off", with the axis labels on the outside correctly showing…

Marius
--
Marius Schamschula

Marius,

That sounds like the gnuplot toolkit is active and you have gnuplot 5 installed.

Ben



Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

bpabbott
Administrator
In reply to this post by Alexander Hansen-2
> On Oct 5, 2015, at 8:01 PM, Alexander Hansen <[hidden email]> wrote:
>
>> On Oct 5, 2015, at 16:51, Ben Abbott <[hidden email]> wrote:
>>
>>> On Oct 5, 2015, at 7:46 PM, Alexander Hansen <[hidden email]> wrote:
>>>
>>>> On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:
>>>>
>>>>> On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:
>>>>>
>>>>>> On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:
>>>>>>
>>>>>> On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:
>>>>>>
>>>>>>>> The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.
>>>>>>>>
>>>>>>>> Initially, I got ...
>>>>>>>
>>>>>>> Hi Ben,
>>>>>>>
>>>>>>> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>>>>>>>
>>>>>>> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>>>>>>>
>>>>>>> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)
>>>>>>>
>>>>>>> Sebastian
>>>>>>
>>>>>> Sebastian,
>>>>>>
>>>>>> I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!
>>>>>>
>>>>>> Marius
>>>>>> --
>>>>>> Marius Schamschula
>>>>>
>>>>> Hi Sabastian,
>>>>>
>>>>> Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.
>>>>>
>>>>> panic: Segmentation fault: 11 -- stopping myself
>>>>>
>>>>> Were you and/or Marius able to print via osmesa.
>>>>>
>>>>> Ben
>>>>
>>>> Opps, I configured with the following options, and used Macports osmesa port.
>>>>
>>>>            --without-x \
>>>>            --with-OSMesa \
>>>>            --with-OSMesa-includedir=/sw/include/mesa \
>>>>            --with-OSMesa-libdir=/sw/lib/mesa
>>>>
>>>> $ fink list mesa
>>>> Information about 10253 packages read in 14 seconds.
>>>> i   mesa                                 7.0.2-3                     3-D graphics library
>>>>     mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
>>>>     mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
>>>> i   mesa-shlibs                          7.0.2-3                     3-D graphics library
>>>> i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]
>>>>
>>>> Ben
>>>>
>>>
>>> That’d be Fink’s osmesa. :-)
>>>
>>> If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.
>>>
>>> --
>>> Alexander Hansen, Ph.D.
>>> Fink User Liaison
>>
>> Hi Alex,
>>
>> Opps. You are correct, I mis-typed. I’m using Fink, not macports … groan!
>>
>> Does Fink’s mesa work with the OpenGL Carbon framework?
>>
>> And what is the relationship between "system-pkgconfig-osmesa 8-1” and the mesa 7.0.2-3 package?
>>
>> Ben
>
> I don’t know much about it, but the last note from a maintainer said:  
>
> Care needs to be taken to avoid system OpenGL,
> if you want to use Mesa3d, while compiling, like
> making sure that it's first in the linker's search
> path. Otherwise, you get runtime errors.

I’ll try changing that.

> So my thought is that it isn’t compatible with OpenGL.framework
>
> system-pkgconfig-osmesa isn’t related to the mesa package at all—it’s an indicator for the version of /opt/X11/lib/pkgconfig/osmesa.pc.
>
> —Alex

The contents are …

prefix=/opt/X11
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: osmesa
Description: Mesa Off-screen Rendering library
Requires:
Version: 8
Libs: -L${libdir} -lOSMesa
Libs.private: -lm -lpthread  
Cflags: -I${includedir}

Sounds like an obviously stupid question … but … Any chance the X11 stuff would work the Carbon framework, or is it X11 only?

Ben




Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Alexander Hansen-2

> On Oct 5, 2015, at 17:13, Ben Abbott <[hidden email]> wrote:
>
>> On Oct 5, 2015, at 8:01 PM, Alexander Hansen <[hidden email]> wrote:
>>
>>> On Oct 5, 2015, at 16:51, Ben Abbott <[hidden email]> wrote:
>>>
>>>> On Oct 5, 2015, at 7:46 PM, Alexander Hansen <[hidden email]> wrote:
>>>>
>>>>> On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:
>>>>>
>>>>>> On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:
>>>>>>
>>>>>>> On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:
>>>>>>>
>>>>>>> On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:
>>>>>>>
>>>>>>>>> The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.
>>>>>>>>>
>>>>>>>>> Initially, I got ...
>>>>>>>>
>>>>>>>> Hi Ben,
>>>>>>>>
>>>>>>>> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>>>>>>>>
>>>>>>>> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>>>>>>>>
>>>>>>>> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)
>>>>>>>>
>>>>>>>> Sebastian
>>>>>>>
>>>>>>> Sebastian,
>>>>>>>
>>>>>>> I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!
>>>>>>>
>>>>>>> Marius
>>>>>>> --
>>>>>>> Marius Schamschula
>>>>>>
>>>>>> Hi Sabastian,
>>>>>>
>>>>>> Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.
>>>>>>
>>>>>> panic: Segmentation fault: 11 -- stopping myself
>>>>>>
>>>>>> Were you and/or Marius able to print via osmesa.
>>>>>>
>>>>>> Ben
>>>>>
>>>>> Opps, I configured with the following options, and used Macports osmesa port.
>>>>>
>>>>>           --without-x \
>>>>>           --with-OSMesa \
>>>>>           --with-OSMesa-includedir=/sw/include/mesa \
>>>>>           --with-OSMesa-libdir=/sw/lib/mesa
>>>>>
>>>>> $ fink list mesa
>>>>> Information about 10253 packages read in 14 seconds.
>>>>> i   mesa                                 7.0.2-3                     3-D graphics library
>>>>>    mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
>>>>>    mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
>>>>> i   mesa-shlibs                          7.0.2-3                     3-D graphics library
>>>>> i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]
>>>>>
>>>>> Ben
>>>>>
>>>>
>>>> That’d be Fink’s osmesa. :-)
>>>>
>>>> If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.
>>>>
>>>> --
>>>> Alexander Hansen, Ph.D.
>>>> Fink User Liaison
>>>
>>> Hi Alex,
>>>
>>> Opps. You are correct, I mis-typed. I’m using Fink, not macports … groan!
>>>
>>> Does Fink’s mesa work with the OpenGL Carbon framework?
>>>
>>> And what is the relationship between "system-pkgconfig-osmesa 8-1” and the mesa 7.0.2-3 package?
>>>
>>> Ben
>>
>> I don’t know much about it, but the last note from a maintainer said:  
>>
>> Care needs to be taken to avoid system OpenGL,
>> if you want to use Mesa3d, while compiling, like
>> making sure that it's first in the linker's search
>> path. Otherwise, you get runtime errors.
>
> I’ll try changing that.
>
>> So my thought is that it isn’t compatible with OpenGL.framework
>>
>> system-pkgconfig-osmesa isn’t related to the mesa package at all—it’s an indicator for the version of /opt/X11/lib/pkgconfig/osmesa.pc.
>>
>> —Alex
>
> The contents are …
>
> prefix=/opt/X11
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
>
> Name: osmesa
> Description: Mesa Off-screen Rendering library
> Requires:
> Version: 8
> Libs: -L${libdir} -lOSMesa
> Libs.private: -lm -lpthread  
> Cflags: -I${includedir}
>
> Sounds like an obviously stupid question … but … Any chance the X11 stuff would work the Carbon framework, or is it X11 only?
>
> Ben

Looks like not:

$ otool -L /opt/X11/lib/libOSMesa.8.dylib
/opt/X11/lib/libOSMesa.8.dylib:
        /opt/X11/lib/libOSMesa.8.dylib (compatibility version 8.0.0, current version 8.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)



Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

bpabbott
Administrator
In reply to this post by bpabbott

> On Oct 5, 2015, at 8:13 PM, Ben Abbott <[hidden email]> wrote:
>
>> On Oct 5, 2015, at 8:01 PM, Alexander Hansen <[hidden email]> wrote:
>>
>>> On Oct 5, 2015, at 16:51, Ben Abbott <[hidden email]> wrote:
>>>
>>>> On Oct 5, 2015, at 7:46 PM, Alexander Hansen <[hidden email]> wrote:
>>>>
>>>>> On Oct 5, 2015, at 16:43, Ben Abbott <[hidden email]> wrote:
>>>>>
>>>>>> On Oct 5, 2015, at 7:32 PM, Ben Abbott <[hidden email]> wrote:
>>>>>>
>>>>>>> On Oct 5, 2015, at 5:31 PM, Marius Schamschula <[hidden email]> wrote:
>>>>>>>
>>>>>>> On Oct 5, 2015, at 3:05 PM, Dr. Sebastian Schöps <[hidden email]> wrote:
>>>>>>>
>>>>>>>>> The Qt libs for Mac OSX use native graphics, while osmesa support is part of X11. Perhaps this is a problem? Does homebrew have an OSMesa formula? I’ve just installed Fink’s package for osmesa and had to tinker a bit for configure to work.
>>>>>>>>>
>>>>>>>>> Initially, I got ...
>>>>>>>>
>>>>>>>> Hi Ben,
>>>>>>>>
>>>>>>>> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>>>>>>>>
>>>>>>>> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>>>>>>>>
>>>>>>>> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)
>>>>>>>>
>>>>>>>> Sebastian
>>>>>>>
>>>>>>> Sebastian,
>>>>>>>
>>>>>>> I applied the patch under Yosemite, it built w/o any issues, this time no "--without-OSMesa” needed!
>>>>>>>
>>>>>>> Marius
>>>>>>> --
>>>>>>> Marius Schamschula
>>>>>>
>>>>>> Hi Sabastian,
>>>>>>
>>>>>> Your patch allowed me to complete a build with osmesa enabled. However, when I tried to print for “visible” = “off” I encountered a seg-fault.
>>>>>>
>>>>>> panic: Segmentation fault: 11 -- stopping myself
>>>>>>
>>>>>> Were you and/or Marius able to print via osmesa.
>>>>>>
>>>>>> Ben
>>>>>
>>>>> Opps, I configured with the following options, and used Macports osmesa port.
>>>>>
>>>>>           --without-x \
>>>>>           --with-OSMesa \
>>>>>           --with-OSMesa-includedir=/sw/include/mesa \
>>>>>           --with-OSMesa-libdir=/sw/lib/mesa
>>>>>
>>>>> $ fink list mesa
>>>>> Information about 10253 packages read in 14 seconds.
>>>>> i   mesa                                 7.0.2-3                     3-D graphics library
>>>>>    mesa-libglw-openmotif4               7.8.2-1                     Xt / Motif OpenGL widgets
>>>>>    mesa-libglw-openmotif4-shlibs        7.8.2-1                     Xt / Motif OpenGL widgets
>>>>> i   mesa-shlibs                          7.0.2-3                     3-D graphics library
>>>>> i   system-pkgconfig-osmesa              8-1                         [virtual pkgconfig package representing osmesa]
>>>>>
>>>>> Ben
>>>>>
>>>>
>>>> That’d be Fink’s osmesa. :-)
>>>>
>>>> If I get a chance I’ll see about some modernization there to try to get a reasonable Octave 4.x into Fink.
>>>>
>>>> --
>>>> Alexander Hansen, Ph.D.
>>>> Fink User Liaison
>>>
>>> Hi Alex,
>>>
>>> Opps. You are correct, I mis-typed. I’m using Fink, not macports … groan!
>>>
>>> Does Fink’s mesa work with the OpenGL Carbon framework?
>>>
>>> And what is the relationship between "system-pkgconfig-osmesa 8-1” and the mesa 7.0.2-3 package?
>>>
>>> Ben
>>
>> I don’t know much about it, but the last note from a maintainer said:  
>>
>> Care needs to be taken to avoid system OpenGL,
>> if you want to use Mesa3d, while compiling, like
>> making sure that it's first in the linker's search
>> path. Otherwise, you get runtime errors.
>
> I’ll try changing that.

I tried …

export CPPFLAGS="-I/sw/include/mesa $CPPFLAGS"
export LDFLAGS="-L/sw/lib/mesa -lOSMesa $LDFLAGS”

./configure …

but I still get a seg-fault when tying to print using osmesa.

Ben



Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Sebastian Schöps
> I tried …
>
> export CPPFLAGS="-I/sw/include/mesa $CPPFLAGS"
> export LDFLAGS="-L/sw/lib/mesa -lOSMesa $LDFLAGS”
>
> ./configure …
>
> but I still get a seg-fault when tying to print using osmesa.


Me too :( I made the same error as Marius: I used gnuplot without noticing it.
I put here again what Mike suggested; just to make sure that we test the correct thing.

figure('visible','off');plot(1:10);img=__osmesa_print__(gcf);

Sadly this segfaults with system osmesa (Xquartz 2.7.8_rc1, mesa 10.4.7) and also with my homebrewed one (10.5.4), i.e., it's not Apple's fault.

otool -L __osmesa_print__.oct
__osmesa_print__.oct:
        ...
        /usr/local/lib/libOSMesa.8.dylib (compatibility version 9.0.0, current version 9.0.0)
        ...
        /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)

Did I understand correctly that OpenGL.framework might be the problem? Any other idea how to debug this?

Sebastian
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Sebastian Schöps
From: Sebastian
Date: Di. Okt. 06 2015 09:48:32
To: Ben Abbott
Subject: Re: Octave 4.0 on Mac OS Yosemite (with gui!)

>
>> I tried …
>>
>> export CPPFLAGS="-I/sw/include/mesa $CPPFLAGS"
>> export LDFLAGS="-L/sw/lib/mesa -lOSMesa $LDFLAGS”
>>
>> ./configure …
>>
>> but I still get a seg-fault when tying to print using osmesa.
>
>
> Me too :( I made the same error as Marius: I used gnuplot without noticing it.
> I put here again what Mike suggested; just to make sure that we test the correct thing.
>
> figure('visible','off');plot(1:10);img=__osmesa_print__(gcf);
>
> Sadly this segfaults with system osmesa (Xquartz 2.7.8_rc1, mesa 10.4.7) and also with my homebrewed one (10.5.4), i.e., it's not Apple's fault.
>
> otool -L __osmesa_print__.oct
> __osmesa_print__.oct:
> ...
> /usr/local/lib/libOSMesa.8.dylib (compatibility version 9.0.0, current version 9.0.0)
> ...
> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
>
> Did I understand correctly that OpenGL.framework might be the problem? Any other idea how to debug this?
>
> Sebastian

Update: Indeed there is no segfault if opengl is disabled. However, the result is a black square.


Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

bpabbott
Administrator
In reply to this post by Sebastian Schöps
> On Oct 6, 2015, at 3:48 AM, Sebastian <[hidden email]> wrote:
>
>> I tried …
>>
>> export CPPFLAGS="-I/sw/include/mesa $CPPFLAGS"
>> export LDFLAGS="-L/sw/lib/mesa -lOSMesa $LDFLAGS”
>>
>> ./configure …
>>
>> but I still get a seg-fault when tying to print using osmesa.
>
>
> Me too :( I made the same error as Marius: I used gnuplot without noticing it.
> I put here again what Mike suggested; just to make sure that we test the correct thing.
>
> figure('visible','off');plot(1:10);img=__osmesa_print__(gcf);
>
> Sadly this segfaults with system osmesa (Xquartz 2.7.8_rc1, mesa 10.4.7) and also with my homebrewed one (10.5.4), i.e., it's not Apple's fault.
>
> otool -L __osmesa_print__.oct
> __osmesa_print__.oct:
> ...
> /usr/local/lib/libOSMesa.8.dylib (compatibility version 9.0.0, current version 9.0.0)
> ...
> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
>
> Did I understand correctly that OpenGL.framework might be the problem? Any other idea how to debug this?
>
> Sebastian

I suspect that the OSMesa that accompanies X11 will not play well with Carbon’s OpenGL.

In any event, the possibilities are;

(1) Use X11 based Qt, OpenGL, and OSMesa
(2)  Use Carbon based Qt, OpenGL, and Carbon compatible OSMesa
(3) Use Carbon based Qt, OpenGL, and use Carbon’s offscreen rendering on Mac OS X.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_offscreen/opengl_offscreen.html

We are currently struggling with (2). In the least that combination is tricky, but maybe it isn’t feasible?

Option (3) is most attractive for Mac OS X users. But I don’t know if anyone in the development community has the experience to take that on (I don’t).

Ben
Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Mike Miller-4
In reply to this post by Sebastian Schöps
On Mon, Oct 05, 2015 at 22:05:12 +0200, "Dr. Sebastian Schöps" wrote:
> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>
> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>
> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)

Hi Sebastian, would you mind posting this (and future patches) to the
patch tracker for more visibility? I see nothing wrong at a glance with
applying this patch to the default branch, but it is easily lost in
these long Mac-specific threads.

Thanks,

--
mike

Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Mike Miller-4
In reply to this post by bpabbott
On Tue, Oct 06, 2015 at 08:41:19 -0400, Ben Abbott wrote:
> I suspect that the OSMesa that accompanies X11 will not play well with Carbon’s OpenGL.

This sounds very similar to the current situation of Linux users with
Nvidia hardware. The standard OSMesa library works well with Mesa
OpenGL, but segfaults when used within Octave with Nvidia's OpenGL.

One workaround that has worked for some is to force Mesa OpenGL to be
preferred at runtime (using LD_PRELOAD) but another may be to ensure
that OSMesa uses its own embedded copy of Mesa OpenGL rather than the
shared OpenGL used by the rest of the system.

> In any event, the possibilities are;
>
> (1) Use X11 based Qt, OpenGL, and OSMesa
> (2)  Use Carbon based Qt, OpenGL, and Carbon compatible OSMesa
> (3) Use Carbon based Qt, OpenGL, and use Carbon’s offscreen rendering on Mac OS X.
>
> https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_offscreen/opengl_offscreen.html
>
> We are currently struggling with (2). In the least that combination is tricky, but maybe it isn’t feasible?
>
> Option (3) is most attractive for Mac OS X users. But I don’t know if anyone in the development community has the experience to take that on (I don’t).

You might try using a combination of native OpenGL for on-screen
plotting and Mesa OpenGL with OSMesa for off-screen. I believe this lies
in how OSMesa is configured and built. A recent proposed update of Mesa
[1] for Ubuntu is testing this concept.

[1]: https://launchpad.net/ubuntu/+source/mesa/10.1.3-0ubuntu0.5

--
mike

Reply | Threaded
Open this post in threaded view
|

Re: Octave 4.0 on Mac OS Yosemite (with gui!)

Sebastian Schöps
In reply to this post by Mike Miller-4
> On Mon, Oct 05, 2015 at 22:05:12 +0200, "Dr. Sebastian Schöps" wrote:
>> the problem seems to be the order of includes in __osmesa_print__. I did not yet fully understand why. However, I have created a small patch that fixes the problem for me
>>
>> https://gist.githubusercontent.com/schoeps/3bc5ae93f7580ef88d7a/raw/osmesa.patch
>>
>> Can you try it, please? (OS X 10.11, Xquartz 2.7.8_rc1)
>
> Hi Sebastian, would you mind posting this (and future patches) to the
> patch tracker for more visibility? I see nothing wrong at a glance with
> applying this patch to the default branch, but it is easily lost in
> these long Mac-specific threads.

Of course not, it's here now:

https://savannah.gnu.org/patch/index.php?8761


123