bugGNU Octave - Bugs: bug #52436, libOSMesa check

 
 

bug #52436: libOSMesa check

Submitter:  nicodemus <nicmus>
Submitted:  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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group 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>
Group Member
Fri 17 Nov 2017 10:13:12 PM UTC, original submission:  

Hi with the following code


figure(1,'visible','off')
plot([0 1],[0 1])
print('fig.png','-dpng')


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
https://bbs.archlinux.org/viewtopic.php?pid=1749881#p1749881
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

/usr/include/GL/gl.h
...
#define GL_DEPTH_BITS 0x0D56
...
#define GL_STENCIL_BITS 0x0D57


/usr/include/GL/osmesa.h
...
#define OSMESA_MAJOR_VERSION 11
#define OSMESA_MINOR_VERSION 2
#define OSMESA_PATCH_VERSION 0


nicodemus <nicmus>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group 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.13-d3ae.
    Corresponding source code