unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL.
@ 2015-03-21  7:47 宋文武
  2015-03-21  7:47 ` [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver 宋文武
  2015-03-21 21:25 ` [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: 宋文武 @ 2015-03-21  7:47 UTC (permalink / raw)
  To: guix-devel

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

* 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] 7+ messages in thread

* [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver.
  2015-03-21  7:47 [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL 宋文武
@ 2015-03-21  7:47 ` 宋文武
  2015-03-21 21:26   ` Ludovic Courtès
  2015-03-21 21:25 ` [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: 宋文武 @ 2015-03-21  7:47 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/sdl.scm (sdl)[arguments]<#:configure-flags>: Add
  'LDFLAGS=-lGL'.
---
 gnu/packages/sdl.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index fd555f9..2c90d31 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -64,7 +64,9 @@
        ;; OpenGL library is still dlopened at runtime.
        #:configure-flags '("--disable-alsa-shared"
                            "--disable-pulseaudio-shared"
-                           "--disable-x11-shared")
+                           "--disable-x11-shared"
+                           ;; Explicity link with mesa as OpenGL driver.
+                           "LDFLAGS=-lGL")
 
        #:tests? #f)) ; no check target
     (propagated-inputs
-- 
2.2.1

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

* Re: [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-21  7:47 [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL 宋文武
  2015-03-21  7:47 ` [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver 宋文武
@ 2015-03-21 21:25 ` Ludovic Courtès
  2015-03-23 14:04   ` 宋文武
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-21 21:25 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

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

> Fixes a regression introduced in 666aa99.
> Reported by Felipe López and David Thompson.
>
> * 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'.

[...]

> --- 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")

So without these flags libpulse.so, libalsa.so, etc. are dlopened?
(“disable shared” is a bit misleading in the flag names.)

>      (native-inputs `(("pkg-config" ,pkg-config)))
>      (inputs `(("libxrandr" ,libxrandr)
>                ("mesa" ,mesa)
> +              ("glu" ,glu)

Because of --disable-x11-shared, glu must be found at configure time,
right?

Thanks,
Ludo’.

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

* Re: [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver.
  2015-03-21  7:47 ` [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver 宋文武
@ 2015-03-21 21:26   ` Ludovic Courtès
  2015-03-23 14:08     ` 宋文武
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-21 21:26 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

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

> * gnu/packages/sdl.scm (sdl)[arguments]<#:configure-flags>: Add
>   'LDFLAGS=-lGL'.

[...]

>         #:configure-flags '("--disable-alsa-shared"
>                             "--disable-pulseaudio-shared"
> -                           "--disable-x11-shared")
> +                           "--disable-x11-shared"
> +                           ;; Explicity link with mesa as OpenGL driver.
> +                           "LDFLAGS=-lGL")

Could you explain in the comment why this is necessary?  I guess that’s
to make sure Mesa in the libsdl’s RUNPATH?

Thanks,
Ludo’.

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

* Re: [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-21 21:25 ` [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL Ludovic Courtès
@ 2015-03-23 14:04   ` 宋文武
  2015-03-29 13:15     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: 宋文武 @ 2015-03-23 14:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> Fixes a regression introduced in 666aa99.
>> Reported by Felipe López and David Thompson.
>>
>> * 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'.
>
> [...]
>
>> --- 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")
>
> So without these flags libpulse.so, libalsa.so, etc. are dlopened?
> (“disable shared” is a bit misleading in the flag names.)
Yes.
>
>>      (native-inputs `(("pkg-config" ,pkg-config)))
>>      (inputs `(("libxrandr" ,libxrandr)
>>                ("mesa" ,mesa)
>> +              ("glu" ,glu)
>
> Because of --disable-x11-shared, glu must be found at configure time,
> right?
No, without glu, SDL's configure reported with:
  checking for OpenGL (GLX) support... no

Maybe it's because the mesa update from 8.0.5 to 10.4.0?
I think many packages had adding glu to inputs due to this,
but we missed SDL :)


> Thanks,
> Ludo’.

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

* Re: [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver.
  2015-03-21 21:26   ` Ludovic Courtès
@ 2015-03-23 14:08     ` 宋文武
  0 siblings, 0 replies; 7+ messages in thread
From: 宋文武 @ 2015-03-23 14:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/sdl.scm (sdl)[arguments]<#:configure-flags>: Add
>>   'LDFLAGS=-lGL'.
>
> [...]
>
>>         #:configure-flags '("--disable-alsa-shared"
>>                             "--disable-pulseaudio-shared"
>> -                           "--disable-x11-shared")
>> +                           "--disable-x11-shared"
>> +                           ;; Explicity link with mesa as OpenGL driver.
>> +                           "LDFLAGS=-lGL")
>
> Could you explain in the comment why this is necessary?  I guess that’s
> to make sure Mesa in the libsdl’s RUNPATH?
Done and pushed, thanks for review!
>
> Thanks,
> Ludo’.

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

* Re: [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL.
  2015-03-23 14:04   ` 宋文武
@ 2015-03-29 13:15     ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-29 13:15 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

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

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> 宋文武 <iyzsong@gmail.com> skribis:
>>
>>> Fixes a regression introduced in 666aa99.
>>> Reported by Felipe López and David Thompson.
>>>
>>> * 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'.
>>
>> [...]
>>
>>> --- 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")
>>
>> So without these flags libpulse.so, libalsa.so, etc. are dlopened?
>> (“disable shared” is a bit misleading in the flag names.)
> Yes.

OK.  Could you change the comment to:

  Don’t dlopen X11, ALSA, and PulseAudio.

>>>      (native-inputs `(("pkg-config" ,pkg-config)))
>>>      (inputs `(("libxrandr" ,libxrandr)
>>>                ("mesa" ,mesa)
>>> +              ("glu" ,glu)
>>
>> Because of --disable-x11-shared, glu must be found at configure time,
>> right?
> No, without glu, SDL's configure reported with:
>   checking for OpenGL (GLX) support... no

OK.

OK to push with this tiny change, and sorry for the delay!

Thanks,
Ludo’.

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

end of thread, other threads:[~2015-03-29 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21  7:47 [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL 宋文武
2015-03-21  7:47 ` [PATCH 2/2] gnu: sdl: Explicity use mesa as OpenGL driver 宋文武
2015-03-21 21:26   ` Ludovic Courtès
2015-03-23 14:08     ` 宋文武
2015-03-21 21:25 ` [PATCH 1/2] gnu: sdl: Allow dlopen for OpenGL Ludovic Courtès
2015-03-23 14:04   ` 宋文武
2015-03-29 13:15     ` Ludovic Courtès

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).