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

Sebastian Schöps

>> Mike Miller-4 wrote
>>> There was a recent change that figures for the manual are built by the
>>> default toolkit, which means qt if available, then fltk if available,
>>> then gnuplot. But there is no check ensuring that you also have osmesa
>>> present and working. I could see that as a worthy enhancement, fall back
>>> to gnuplot if no osmesa.
>>>
>>> --
>>> mike
>>
>> That would be great. Getting osmesa seems to be problematic on several
>> platforms (also ubuntu as seen in the other recent thread)
>
> Agreed. I would also like to be able to figure out how to use the osmesa support provided by XQuartz. Does anyone know if there are known issues, or are we just doing something wrong (not setting LDFLAGS or LIBS correctly?).
>
> Ben

I did some experiments with osmesa but so far without success. homebrew has a dedicated formula for osmesa (https://github.com/Homebrew/homebrew-x11/blob/master/mesalib-glw.rb) but it disables gl-osmesa which seems to be the most important part.

new question: do you guys have also problems with the titlebar icons? Please see screenshot here https://dl.dropboxusercontent.com/u/2079838/octave4_yosemite_icons.png 

Sebastian
Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator

> On Jul 25, 2015, at 11:07 AM, Dr. Sebastian Schöps <[hidden email]> wrote:
>
>
>>> Mike Miller-4 wrote
>>>> There was a recent change that figures for the manual are built by the
>>>> default toolkit, which means qt if available, then fltk if available,
>>>> then gnuplot. But there is no check ensuring that you also have osmesa
>>>> present and working. I could see that as a worthy enhancement, fall back
>>>> to gnuplot if no osmesa.
>>>>
>>>> --
>>>> mike
>>>
>>> That would be great. Getting osmesa seems to be problematic on several
>>> platforms (also ubuntu as seen in the other recent thread)
>>
>> Agreed. I would also like to be able to figure out how to use the osmesa support provided by XQuartz. Does anyone know if there are known issues, or are we just doing something wrong (not setting LDFLAGS or LIBS correctly?).
>>
>> Ben
>
> I did some experiments with osmesa but so far without success. homebrew has a dedicated formula for osmesa (https://github.com/Homebrew/homebrew-x11/blob/master/mesalib-glw.rb) but it disables gl-osmesa which seems to be the most important part.

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

checking osmesa.h usability... no
checking osmesa.h presence... no
checking for osmesa.h... no
checking GL/osmesa.h usability... yes
checking GL/osmesa.h presence... yes
checking for GL/osmesa.h... yes
checking for OSMesaCreateContext in -lOSMesa... no
configure: WARNING: OSMesa library not found.  Offscreen rendering with OpenGL will be disabled.

I then addeded "-L/sw/lib/mesa“ to the LDFLAGS and "-I/sw/include/mesa” to the CPPFLAGS. After than configure found and was able to use the OSMesa library. When done, configure reported …

        OSMesa libraries:            -lOSMesa

My build fails due to errors like ...

        /sw/include/mesa/GL/osmesa.h:249:1: error: unknown type name 'GLAPI'
        GLAPI GLboolean GLAPIENTRY

Perhaps the osmesa included with XQuartz is creating a problem?

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

Does anyone have any insight?

> new question: do you guys have also problems with the titlebar icons? Please see screenshot here https://dl.dropboxusercontent.com/u/2079838/octave4_yosemite_icons.png 

Yes, I also see the icon problem.



Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator
> On Jul 25, 2015, at 4:19 PM, Ben Abbott <[hidden email]> wrote:
>
>> On Jul 25, 2015, at 11:07 AM, Dr. Sebastian Schöps <[hidden email]> wrote:
>>
>>>> Mike Miller-4 wrote
>>>>> There was a recent change that figures for the manual are built by the
>>>>> default toolkit, which means qt if available, then fltk if available,
>>>>> then gnuplot. But there is no check ensuring that you also have osmesa
>>>>> present and working. I could see that as a worthy enhancement, fall back
>>>>> to gnuplot if no osmesa.
>>>>>
>>>>> --
>>>>> mike
>>>>
>>>> That would be great. Getting osmesa seems to be problematic on several
>>>> platforms (also ubuntu as seen in the other recent thread)
>>>
>>> Agreed. I would also like to be able to figure out how to use the osmesa support provided by XQuartz. Does anyone know if there are known issues, or are we just doing something wrong (not setting LDFLAGS or LIBS correctly?).
>>>
>>> Ben
>>
>> I did some experiments with osmesa but so far without success. homebrew has a dedicated formula for osmesa (https://github.com/Homebrew/homebrew-x11/blob/master/mesalib-glw.rb) but it disables gl-osmesa which seems to be the most important part.
>
> 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 ...
>
> checking osmesa.h usability... no
> checking osmesa.h presence... no
> checking for osmesa.h... no
> checking GL/osmesa.h usability... yes
> checking GL/osmesa.h presence... yes
> checking for GL/osmesa.h... yes
> checking for OSMesaCreateContext in -lOSMesa... no
> configure: WARNING: OSMesa library not found.  Offscreen rendering with OpenGL will be disabled.
>
> I then addeded "-L/sw/lib/mesa“ to the LDFLAGS and "-I/sw/include/mesa” to the CPPFLAGS. After than configure found and was able to use the OSMesa library. When done, configure reported …
>
> OSMesa libraries:            -lOSMesa
>
> My build fails due to errors like ...
>
> /sw/include/mesa/GL/osmesa.h:249:1: error: unknown type name 'GLAPI'
> GLAPI GLboolean GLAPIENTRY
>
> Perhaps the osmesa included with XQuartz is creating a problem?
>
>            --with-OSMesa-includedir=/sw/include/mesa \
>            --with-OSMesa-libdir=/sw/lib/mesa \
>
> Does anyone have any insight?

ls -1 /sw/lib/mesa/libOSMesa*
/sw/lib/mesa/libOSMesa.6.5.dylib
/sw/lib/mesa/libOSMesa.6.dylib
/sw/lib/mesa/libOSMesa.a
/sw/lib/mesa/libOSMesa.dylib

Apparently, my version is OSMesa is 6.5. The wiki indicates I need > 9.0

http://wiki.octave.org/OSMesa

It seems unlikely that the compile error is related, but if I’m able to get the OSMesa part of build, problems will remain.

Ben
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 bpabbott
bpabbott wrote
Agreed. I would also like to be able to figure out how to use the osmesa support provided by XQuartz. Does anyone know if there are known issues, or are we just doing something wrong (not setting LDFLAGS or LIBS correctly?).

Ben
XQuartz ships with an old version of mesa. However, I was able to compile octave with mesa-10.5.4 on Yosemite using the patches from macports and some additional tweaks. However, the resulting plots are always black :(  
Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator

> On Jul 29, 2015, at 9:29 AM, Sebastian Schöps <[hidden email]> wrote:
>
> bpabbott wrote
>> Agreed. I would also like to be able to figure out how to use the osmesa
>> support provided by XQuartz. Does anyone know if there are known issues,
>> or are we just doing something wrong (not setting LDFLAGS or LIBS
>> correctly?).
>>
>> Ben
>
> XQuartz ships with an old version of mesa. However, I was able to compile
> octave with mesa-10.5.4 on Yosemite using the patches from macports and some
> additional tweaks. However, the resulting plots are always black :(  

I don’t know how OSMesa works, but can the version intended for X11 also work with non-X11 Qt?

Ben


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 bpabbott
bpabbott wrote
Agreed. I would also like to be able to figure out how to use the osmesa support provided by XQuartz. Does anyone know if there are known issues, or are we just doing something wrong (not setting LDFLAGS or LIBS correctly?).
I finally managed to use osmesa from xquartz with some ugly tricks, i.e., using full include path instead of relative (xquartz might be guilty). However, the results remains the same: plots are entirely black? Is that expected? can anyone help?

Sebastian
Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator
> On Aug 2, 2015, at 08:16, Sebastian Schöps <[hidden email]> wrote:
>
> bpabbott wrote
>> Agreed. I would also like to be able to figure out how to use the osmesa
>> support provided by XQuartz. Does anyone know if there are known issues,
>> or are we just doing something wrong (not setting LDFLAGS or LIBS
>> correctly?).
>
> I finally managed to use osmesa from xquartz with some ugly tricks, i.e.,
> using full include path instead of relative (xquartz might be guilty).
> However, the results remains the same: plots are entirely black? Is that
> expected? can anyone help?
>
> Sebastian

Would you provide the environment variables you set and the options used to configure?

Also, you previously mentioned you were able to build the most recent OSMesa. Would you also tell us the environment variables set and the options used to configure OSMesa?

Ben
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Schöps
1) Octave with homegrown Mesa:

I compiled mesa-10.5.4 using the sources from
ftp://ftp.freedesktop.org/pub/mesa/10.5.4/mesa-10.5.4.tar.gz
which is the most recent one that is in Macports. I used their patches:
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/0001-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/1001-darwin-Fix-install-name-of-libOSMesa.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5001-swrast-Build-fix-for-darwin.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5002-darwin-Suppress-type-conversion-warnings-for-GLhandl.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5003-applegl-Provide-requirements-of-_SET_DrawBuffers.patch?format=txt

and the following configure switches
./configure --prefix=/usr/local  --disable-silent-rules --disable-xvmc --disable-glx --disable-dri --disable-openvg --with-dri-drivers=swrast --with-gallium-drivers="" --disable-shared-glapi --disable-egl --with-egl-platforms="" --enable-osmesa --enable-gallium-llvm=no

Then I used the standard flags to compile octave, i.e., I added "--with-OSMesa-includedir=/usr/local/include"
and "--with-OSMesa-libdir=/usr/local/lib" to configure.

(Actually I used homebrew, you can find my build script here: https://gist.github.com/schoeps/45235e1dce52df45e323)

2) Octave with Mesa from XQuartz 2.7.8_rc1:
This was quite messy since I did not manage to make octave find the includes properly. However, I did the following ugly trick: I hardcoded the path of "osmesa.h" in "libinterp/dldfcn/__osmesa_print__.cc" to "/opt/X11/include/GL/osmesa.h" (and the same for "GL/osmesa.h"). This finally allowed octave to find osmesa but then it complained about missing gl.h. The only way I found was to change "<GL/gl.h>" to "<gl.h>" in "/opt/X11/include/GL/osmesa.h". This allowed to compile Octave after being configured with "--with-OSMesa-includedir=/opt/X11/include --with-OSMesa-libdir=/opt/X11/lib" using LDFLAGS "-L/opt/X11/lib" and CFLAGS "-I/opt/X11/include". I am not sure why all this was necessary; it might be a bug in the Xquartz includes or in the compile script of Octave.

Anyway, images that I save with "print" from Octave 4 on Yosemite are entirely black (I will check if the bug is also present when disabling osmesa).
Reply | Threaded
Open this post in threaded view
|

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

Mike Miller-4
On Mon, Aug 03, 2015 at 03:54:44 -0700, Sebastian Schöps wrote:
> Anyway, images that I save with "print" from Octave 4 on Yosemite are
> entirely black (I will check if the bug is also present when disabling
> osmesa).

To be clear, is this with graphics_toolkit set to qt?

And are you printing on-screen figures, or figures with "visible" set to
false? The osmesa library is only used for the latter (I'm *not* ruling
out that it could be causing a problem somehow).

The osmesa support was brought in by Andreas Weber, I don't know if
he'll be able to help much with OSX though (like myself).

From one of his earlier messages on the topic:

>> If someone wants a direct capture he can still use
>> img = __osmesa_print__ (gcf);
>> imwrite (img, "out.png");
>>
>> which is also a good addition for debugging purposes to bypass gl2ps and
>> ghostscript.

Might be interesting to try that.

--
mike

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 Aug 3, 2015, at 6:54 AM, Sebastian Schöps <[hidden email]> wrote:
>
> 1) Octave with homegrown Mesa:
>
> I compiled mesa-10.5.4 using the sources from
> ftp://ftp.freedesktop.org/pub/mesa/10.5.4/mesa-10.5.4.tar.gz
> which is the most recent one that is in Macports. I used their patches:
> https://trac.macports.org/browser/trunk/dports/x11/mesa/files/0001-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch?format=txt
> https://trac.macports.org/browser/trunk/dports/x11/mesa/files/1001-darwin-Fix-install-name-of-libOSMesa.patch?format=txt
> https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5001-swrast-Build-fix-for-darwin.patch?format=txt
> https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5002-darwin-Suppress-type-conversion-warnings-for-GLhandl.patch?format=txt
> https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5003-applegl-Provide-requirements-of-_SET_DrawBuffers.patch?format=txt
>
> and the following configure switches
> ./configure --prefix=/usr/local  --disable-silent-rules --disable-xvmc
> --disable-glx --disable-dri --disable-openvg --with-dri-drivers=swrast
> --with-gallium-drivers="" --disable-shared-glapi --disable-egl
> --with-egl-platforms="" --enable-osmesa --enable-gallium-llvm=no

I’m using Fink and encounter the error below.

        configure: error: Python mako module v0.3.4 or higher not found

I do have the mako module installed via Fink. But the configure script isn’t seeing the Fink python (/sw/bin/python2.7).

Ben
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
Mike Miller-4 wrote
On Mon, Aug 03, 2015 at 03:54:44 -0700, Sebastian Schöps wrote:
> Anyway, images that I save with "print" from Octave 4 on Yosemite are
> entirely black (I will check if the bug is also present when disabling
> osmesa).

To be clear, is this with graphics_toolkit set to qt?

And are you printing on-screen figures, or figures with "visible" set to
false? The osmesa library is only used for the latter (I'm *not* ruling
out that it could be causing a problem somehow).

The osmesa support was brought in by Andreas Weber, I don't know if
he'll be able to help much with OSX though (like myself).

From one of his earlier messages on the topic:

>> If someone wants a direct capture he can still use
>> img = __osmesa_print__ (gcf);
>> imwrite (img, "out.png");
>>
>> which is also a good addition for debugging purposes to bypass gl2ps and
>> ghostscript.

Might be interesting to try that.

--
mike
Thanks Mike. Although the configure script indicated that osmesa should be working, it does not:

error: __osmesa_print__: support for offscreen rendering was disabled when Octave was built
 
the "black square" problem comes from gnuplot 5 that was used by octave (without telling me) instead of osmesa. So I will have to start debugging osmesa again :(
Reply | Threaded
Open this post in threaded view
|

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

brian zeng
In reply to this post by Sebastian Schöps
I tried for many times on my mac,but failed . I my a beginner so I can't figure out the problem.
I can install 3.8.2 via brew, but not 4.0.
Is there another way to install 4.0 on Yosemite?
These are the error messages:

warning: `/usr/local/lib/libarpack.la' seems to be moved
  CXXLD    dldfcn/__delaunayn__.la
  CXXLD    dldfcn/__eigs__.la
  CXXLD    dldfcn/__fltk_uigetfile__.la
  CXXLD    dldfcn/__glpk__.la

Undefined symbols for architecture x86_64:
  "_SuiteSparse_config", referenced from:
      Famd(octave_value_list const&, int) in dldfcn_amd_la-amd.o
  "_SuiteSparse_free", referenced from:
      _amd_order in libamd.a(amd_i_order.o)
  "_SuiteSparse_malloc", referenced from:
      _amd_order in libamd.a(amd_i_order.o)
ld: symbol(s) not found for architecture x86_64
config.log
Reply | Threaded
Open this post in threaded view
|

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

Jordi Gutiérrez Hermoso-2
On Wed, 2015-08-12 at 23:04 -0700, brian zeng wrote:
> I my a beginner so I can't figure out the problem.

Nobody else can either. Octave 4.0 does not currently work on Mac OS
X. Unless you want to spend a lot of time learning how to build
Octave, I suggest you wait until someone else fixes it.

- Jordi G. H.



Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator
> On Aug 13, 2015, at 1:25 PM, Jordi Gutiérrez Hermoso <[hidden email]> wrote:
>
> On Wed, 2015-08-12 at 23:04 -0700, brian zeng wrote:
>> I my a beginner so I can't figure out the problem.
>
> Nobody else can either. Octave 4.0 does not currently work on Mac OS
> X. Unless you want to spend a lot of time learning how to build
> Octave, I suggest you wait until someone else fixes it.
>
> - Jordi G. H.

Hi Jordi,

I am now able to build on Mac OS 10.10 (Yosemite) using Fink package management for the dependencies. I am able to run the GUI, including the qt toolkit, but off screen printing (osmesa) does not work.

A few patches are needed, and I’m hoping to find the time to push some of them, but haven’t yet found the time.

Sebastian Schops has managed to build on Homebew. Perhaps he’ll have time to help Brian.

Ben


Reply | Threaded
Open this post in threaded view
|

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

Sebastian Schöps
> Sebastian Schops has managed to build on Homebew. Perhaps he’ll have time to help Brian.

homebrew users can try this formula: https://github.com/Homebrew/homebrew-science/pull/2660. I suggest to ask specific question regarding this formula and regarding homebrew at github.

@Ben: Any progress with the GUI glitches on the Mac (positioning of buttons and titles in the panel bars)?

Sebastian


Reply | Threaded
Open this post in threaded view
|

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

bpabbott
Administrator
> On Aug 17, 2015, at 11:39 AM, Dr. Sebastian Schöps <[hidden email]> wrote:
>
>> Sebastian Schops has managed to build on Homebew. Perhaps he’ll have time to help Brian.
>
> homebrew users can try this formula: https://github.com/Homebrew/homebrew-science/pull/2660. I suggest to ask specific question regarding this formula and regarding homebrew at github.
>
> @Ben: Any progress with the GUI glitches on the Mac (positioning of buttons and titles in the panel bars)?
>
> Sebastian

No. I haven’t looked in to the icons. That’s low on my priority list. There’s some activity in patching Octave’s sources to eliminate the need for individuals to do it themselves. I’m optimistic the patches related to clang3.5, ov-classdef, and the includes using the <foobar.h> style instead of “foobar.h” will soon be taken care of.

Ben
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 bpabbott
> 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
Reply | Threaded
Open this post in threaded view
|

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

Marius Schamschula-5
Sebastian,

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

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

Marius
--
Marius Schamschula




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

123