bugGNU Octave - Bugs: bug #52436, libOSMesa check


bug #52436: libOSMesa check

Submitted by:  nicodemus <nicmus>
Submitted on:  Fri 17 Nov 2017 10:13:12 PM UTC  
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.2.1 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 02 Feb 2018 07:29:32 PM UTC, comment #4: 

I'm closing as a duplicate of bug #50479 since you have confirmed you are using libglvnd.

Mike Miller <mtmiller>
Project Administrator
Thu 23 Nov 2017 07:51:23 AM UTC, comment #3: 

Hi, it appears that on my system there were several opengl libraries installed.

In particular it seems from the output of glxinfo that only mesa is installed:

    OpenGL version string: 3.0 Mesa 17.2.5

however I checked for libglvnd which is also there and actually is the one which provides libGL.so

    pacman -Qo /usr/lib/libGL.so
    -| /usr/lib/libGL.so is owned by libglvnd 1.0.0-1

so I tried preloading the mesa driver

    export LD_PRELOAD=/usr/lib/libGLX_mesa.so

and it works!

Thank you for the suggestions.

nicodemus <nicmus>
Sat 18 Nov 2017 06:12:34 PM UTC, comment #2: 

OSMesa also does not currently work with libglvnd, which many distributions are starting to use.  See also: bug #50479

John W. Eaton <jwe>
Project Administrator
Sat 18 Nov 2017 08:46:28 AM UTC, comment #1: 

Hi nicodemus, please see also here: http://wiki.octave.org/OSMesa

Are you using MESA based GPU drivers or proprietary drivers from Nvidia or AMD? (have a look at glxinfo)

If yes you've very likely different libGL.so on your system. Locate the MESA one (not from Nvidia) and preload it before starting Octave:

for example

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGL.so

Andreas Weber <andy1978>
Project Member
Fri 17 Nov 2017 10:13:12 PM UTC, original submission:  

Hi with the following code

plot([0 1],[0 1])

Octave fails with
   error: _osmesa_print_: Depth and stencil doesn't match, are you sure you are using OSMesa >= 9.0?

I'm running octave on Archlinux with mesa 17.2.5-1 installed.

I already post a bug in
As suggested there, it seems to be a bug in octave file _osmesa_print_.cc

  153   // Test for a bug in OSMesa with version < 9.0
  154   //
  155   // Unfortunately the macros OSMESA_MAJOR_VERSION and OSMESA_MINOR_VERSION
  156   // weren't updated between many releases and can't be used for detection.
  157   // (Version 8.0 until 9.1.4 all return MAJOR 6, MINOR 5)
  158   GLint z, s;
  159   glGetIntegerv (GL_DEPTH_BITS, &z);
  160   glGetIntegerv (GL_STENCIL_BITS, &s);
  161   if (z != 16 || s != 0)
  162     error ("__osmesa_print__: Depth and stencil doesn't match,"
  163            " are you sure you are using OSMesa >= 9.0?");

On my system I have

#define GL_DEPTH_BITS 0x0D56
#define GL_STENCIL_BITS 0x0D57


nicodemus <nicmus>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by nicmus (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-02 mtmiller Dependencies- => Depends on bugs #50479
    2018-02-02 mtmiller StatusNone => Duplicate
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5