NetBSD Problem Report #46249
From stix@stix.id.au Fri Mar 23 02:15:40 2012
Return-Path: <stix@stix.id.au>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 8655763B946
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Mar 2012 02:15:40 +0000 (UTC)
Message-Id: <20120323010240.514F020F@stix.id.au>
Date: Fri, 23 Mar 2012 12:02:40 +1100 (EST)
From: stix@stix.id.au
Reply-To: stixpjr@gmail.com
To: gnats-bugs@gnats.NetBSD.org
Subject: Fix SDL dlopen of libGL.dylib on Mac OS X 10.6.8
X-Send-Pr-Version: 3.95
>Number: 46249
>Category: pkg
>Synopsis: Fix SDL dlopen of libGL.dylib on Mac OS X 10.6.8
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: macos-pkg-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 23 02:20:01 +0000 2012
>Last-Modified: Mon May 30 05:20:01 +0000 2016
>Originator: Paul Ripke
>Release: Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
>Organization:
Paul Ripke
I love deadlines. I like the whooshing sound they make as they fly by.
-- Douglas Adams
>Environment:
System: Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Architecture: i386
Machine: i386
>Description:
SDL programs fail on Mac OS X/Darwin with:
bash$ mame
Ignoring MAME exception: Unable to load opengl library: /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dyli
b: Failed loading /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib: dlopen(/usr/X11/lib//System/Library
/Frameworks/OpenGL.framework/Libraries/libGL.dylib, 2): image not found
>How-To-Repeat:
Run a program linked against SDL which uses opengl.
>Fix:
The following patch fixes it for me, allowing dlopen of absolute paths, since
libGL.dylib is:
/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib
Index: devel/SDL/Makefile
===================================================================
RCS file: /Volumes/netbsd/cvsroot/pkgsrc/devel/SDL/Makefile,v
retrieving revision 1.104
diff -u -d -r1.104 Makefile
--- devel/SDL/Makefile 3 Mar 2012 12:54:16 -0000 1.104
+++ devel/SDL/Makefile 13 Mar 2012 00:48:37 -0000
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.103 2012/02/20 15:07:46 jdc Exp $
DISTNAME= SDL-1.2.15
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= devel games
MASTER_SITES= http://www.libsdl.org/release/
Index: devel/SDL/distinfo
===================================================================
RCS file: /Volumes/netbsd/cvsroot/pkgsrc/devel/SDL/distinfo,v
retrieving revision 1.62
diff -u -d -r1.62 distinfo
--- devel/SDL/distinfo 20 Feb 2012 14:57:06 -0000 1.62
+++ devel/SDL/distinfo 13 Mar 2012 01:13:03 -0000
@@ -3,7 +3,7 @@
SHA1 (SDL-1.2.15.tar.gz) = 0c5f193ced810b0d7ce3ab06d808cbb5eef03a2c
RMD160 (SDL-1.2.15.tar.gz) = d4802a090cb4a24eeb0c8ce5690802f596d394c3
Size (SDL-1.2.15.tar.gz) = 3920622 bytes
-SHA1 (patch-aa) = 5a3b922c1ad64837d2bc1461723e4f34622b481f
+SHA1 (patch-aa) = dc586c9b7cb35365d7b71298d6adff2e665eab7e
SHA1 (patch-ac) = a5a04b04bffd24787282de3fa719809ba63193dd
SHA1 (patch-src_audio_sun_SDL__sunaudio.c) = e2bbc5577a397e418c3fb565428b8fc558089802
SHA1 (patch-src_video_wscons_SDL__wsconsevents.c) = e1595611542f3ffaebfe32ee611596c18c06be5e
Index: devel/SDL/patches/patch-aa
===================================================================
RCS file: /Volumes/netbsd/cvsroot/pkgsrc/devel/SDL/patches/patch-aa,v
retrieving revision 1.14
diff -u -d -r1.14 patch-aa
--- devel/SDL/patches/patch-aa 8 Oct 2006 18:40:23 -0000 1.14
+++ devel/SDL/patches/patch-aa 13 Mar 2012 01:11:57 -0000
@@ -1,8 +1,8 @@
$NetBSD$
---- src/loadso/dlopen/SDL_sysloadso.c.orig 2006-05-01 01:02:37.000000000 -0700
-+++ src/loadso/dlopen/SDL_sysloadso.c
-@@ -31,9 +31,32 @@
+--- src/loadso/dlopen/SDL_sysloadso.c.orig 2012-01-19 17:30:06.000000000 +1100
++++ src/loadso/dlopen/SDL_sysloadso.c 2012-03-13 12:11:17.000000000 +1100
+@@ -31,9 +31,33 @@
#include "SDL_loadso.h"
@@ -11,6 +11,7 @@
+ static const char * const libdirs[] = {
+ PREFIX "/lib/",
+ X11BASE "/lib/",
++ "",
+ };
+ unsigned i;
+ void *handle;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->macosx-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 23 Mar 2012 02:55:25 +0000
Responsible-Changed-Why:
Problem on Mac OS X.
Responsible-Changed-From-To: macosx-pkg-people->macos-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 23 Mar 2012 04:12:32 +0000
Responsible-Changed-Why:
just fix roll name.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/46249: Fix SDL dlopen of libGL.dylib on Mac OS X 10.6.8
Date: Mon, 30 May 2016 05:15:47 +0000
On Fri, Mar 23, 2012 at 02:20:01AM +0000, stix@stix.id.au wrote:
> Ignoring MAME exception: Unable to load opengl library: /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dyli
> b: Failed loading /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib: dlopen(/usr/X11/lib//System/Library
> /Frameworks/OpenGL.framework/Libraries/libGL.dylib, 2): image not found
>
> >How-To-Repeat:
>
> Run a program linked against SDL which uses opengl.
>
> >Fix:
>
> The following patch fixes it for me, allowing dlopen of absolute paths, since
> libGL.dylib is:
> /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib
> + static const char * const libdirs[] = {
> + PREFIX "/lib/",
> + X11BASE "/lib/",
> ++ "",
> + };
Wouldn't it be better to have something like
#ifdef __APPLE__
"/System/Library/Frameworks/",
#endif
rather than blanketly accepting anything, which seems like it might
lead to security hassles?
--
David A. Holland
dholland@netbsd.org
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.