unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: sdl: Allow dlopen for OpenGL.
@ 2015-03-18  5:13 宋文武
  2015-03-18 22:55 ` David Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: 宋文武 @ 2015-03-18  5:13 UTC (permalink / raw)
  To: guix-devel

Fixes a regression introduced in 666aa99.
Reported by Felipe López and David Thompso.

* gnu/packages/sdl.scm (sdl)[inputs]: Add glu.
  [arguments]<#:configure-flags>: Replace '--disable-sdl-dlopen' with
  '--disable-alsa-shared --disable-pulseaudio-shared --disable-x11-shared'.
---
 gnu/packages/sdl.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 03aa56d..fd555f9 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -60,8 +60,11 @@
     (build-system gnu-build-system)
     (arguments
      '(;; Explicitly link against shared libraries instead of dlopening them.
-       ;; For X11, ALSA, PulseAudio, etc.
-       #:configure-flags '("--disable-sdl-dlopen")
+       ;; For X11, ALSA, and PulseAudio.
+       ;; OpenGL library is still dlopened at runtime.
+       #:configure-flags '("--disable-alsa-shared"
+                           "--disable-pulseaudio-shared"
+                           "--disable-x11-shared")
 
        #:tests? #f)) ; no check target
     (propagated-inputs
@@ -71,6 +74,7 @@
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
+              ("glu" ,glu)
               ("alsa-lib" ,alsa-lib)
               ("pulseaudio" ,pulseaudio)))
     (synopsis "Cross platform game development library")
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-18  5:13 [PATCH] gnu: sdl: Allow dlopen for OpenGL 宋文武
@ 2015-03-18 22:55 ` David Thompson
  2015-03-19  8:50   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: David Thompson @ 2015-03-18 22:55 UTC (permalink / raw)
  To: 宋文武, guix-devel

宋文武 <iyzsong@gmail.com> writes:

> Fixes a regression introduced in 666aa99.
> Reported by Felipe López and David Thompso.

Unfortunately, this doesn't solve the issue.  I need to dig deeper into
the SDL source to figure out exactly why it's still failing.

I use the following crude command to test, run from a git checkout of Sly[0].

    guix environment -l package.scm -E "guile -c \"(use-modules ((sdl sdl) #:prefix sdl:)) (sdl:init 'video) (pk 'window (sdl:set-video-mode 320 240 24 'opengl))\""

(any package that has guile-sdl as an input will do, but there are none
in the distro yet)

When the test fails, the output is:

    ;;; (window #f)

If I remove the 'opengl flag, a window is succesfully opened:

    ;;; (window #<SDL-Surface 320x240 24 bpp>)

We'll find the culprit, eventually! :)

[0] https://gitorious.org/sly/sly

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-18 22:55 ` David Thompson
@ 2015-03-19  8:50   ` Ludovic Courtès
  2015-03-20  0:51     ` David Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-19  8:50 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> skribis:

> I use the following crude command to test, run from a git checkout of Sly[0].
>
>     guix environment -l package.scm -E "guile -c \"(use-modules ((sdl sdl) #:prefix sdl:)) (sdl:init 'video) (pk 'window (sdl:set-video-mode 320 240 24 'opengl))\""

Do you run it on GuixSD or on an FHS distro?  In the latter case, it
might end up loading a shared object from the host distro, which could
fail for a variety of reasons.

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-19  8:50   ` Ludovic Courtès
@ 2015-03-20  0:51     ` David Thompson
  2015-03-21  7:48       ` 宋文武
  0 siblings, 1 reply; 5+ messages in thread
From: David Thompson @ 2015-03-20  0:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> David Thompson <dthompson2@worcester.edu> skribis:
>
>> I use the following crude command to test, run from a git checkout of Sly[0].
>>
>>     guix environment -l package.scm -E "guile -c \"(use-modules ((sdl sdl) #:prefix sdl:)) (sdl:init 'video) (pk 'window (sdl:set-video-mode 320 240 24 'opengl))\""
>
> Do you run it on GuixSD or on an FHS distro?  In the latter case, it
> might end up loading a shared object from the host distro, which could
> fail for a variety of reasons.

This is on Debian.  I haven't had the opportunity to try on GuixSD yet.

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-20  0:51     ` David Thompson
@ 2015-03-21  7:48       ` 宋文武
  0 siblings, 0 replies; 5+ messages in thread
From: 宋文武 @ 2015-03-21  7:48 UTC (permalink / raw)
  To: David Thompson, Ludovic Courtès; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> writes:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> David Thompson <dthompson2@worcester.edu> skribis:
>>
>>> I use the following crude command to test, run from a git checkout of Sly[0].
>>>
>>>     guix environment -l package.scm -E "guile -c \"(use-modules ((sdl sdl) #:prefix sdl:)) (sdl:init 'video) (pk 'window (sdl:set-video-mode 320 240 24 'opengl))\""
>>
>> Do you run it on GuixSD or on an FHS distro?  In the latter case, it
>> might end up loading a shared object from the host distro, which could
>> fail for a variety of reasons.
>
> This is on Debian.  I haven't had the opportunity to try on GuixSD
> yet.
Sorry for the late reply.

I got it work with Sly on GuixSD by set LD_LIBRARY_PATH to
/gnu/store/xxx-mesa/lib. So IMO this should fix the regression.

To avoid loading a GL driver from the host distro, we can
link sdl with mesa explicitly.


Updated patches sent to ML.



>
> -- 
> David Thompson
> Web Developer - Free Software Foundation - http://fsf.org
> GPG Key: 0FF1D807
> Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-21  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18  5:13 [PATCH] gnu: sdl: Allow dlopen for OpenGL 宋文武
2015-03-18 22:55 ` David Thompson
2015-03-19  8:50   ` Ludovic Courtès
2015-03-20  0:51     ` David Thompson
2015-03-21  7:48       ` 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).