View Issue Details

IDProjectCategoryView StatusLast Update
0031651FPCPackagespublic2017-04-09 18:57
ReporterMichalis Kamburelis Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platformi386OSMac OS X 
Product Version3.0.0 
Summary0031651: GLX library location is wrong on Mac OS X Sierra
DescriptionThe Glx unit contains a hardcoded path to the library on Mac OS X:

  OurLibGL := LoadLibrary('/usr/X11R6/lib/libGL.dylib');

On macOS Sierra with XQuartz 2.7.11, the directory is X11, not X11R6. (It *seems* that the upgrade from Mac OS X El Capitan -> macOS Sierra causes this change, not upgrade of XQuartz. But I cannot say for sure.)

As a consequence, the FPC programs using Glx unit think that the glx library is missing.

Attaching a trivial patch to packages/opengl/src/glx.pp that fixes it.

(Tested with FPC 3.0.2, which cannot be selected in the bugtracker. I looked at GLX unit sources in trunk http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/opengl/src/glx.pp?view=log and they are the same, so they still have this bug.)
Tagspatch
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Michalis Kamburelis

2017-04-09 18:49

reporter  

glx_macosx_sierra.patch (455 bytes)   
Index: glx.pp
===================================================================
--- glx.pp	(revision 35701)
+++ glx.pp	(working copy)
@@ -676,6 +676,9 @@
   OurLibGL := libGl;
 {$else darwin}
   OurLibGL := LoadLibrary('/usr/X11R6/lib/libGL.dylib');
+  if OurLibGL = 0 then
+    { On macOS Sierra with XQuartz 2.7.11, the directory is X11, not X11R6 }
+    OurLibGL := LoadLibrary('/usr/X11/lib/libGL.dylib');
 {$endif darwin}
 
   if OurLibGL = 0 then
glx_macosx_sierra.patch (455 bytes)   

Jonas Maebe

2017-04-09 18:57

manager   ~0099526

There is a bug in the XQuartz installer that sometimes does not create the X11R6 symlink. It also happened sometimes on previous OS X releases, see https://lists.apple.com/archives/x11-users/2015/Oct/msg00010.html

Issue History

Date Modified Username Field Change
2017-04-09 18:49 Michalis Kamburelis New Issue
2017-04-09 18:49 Michalis Kamburelis File Added: glx_macosx_sierra.patch
2017-04-09 18:49 Michalis Kamburelis Tag Attached: patch
2017-04-09 18:57 Jonas Maebe Note Added: 0099526
2017-04-09 18:57 Jonas Maebe Status new => resolved
2017-04-09 18:57 Jonas Maebe Resolution open => no change required
2017-04-09 18:57 Jonas Maebe Assigned To => Jonas Maebe