Subject: bug#32458: Acknowledgement (SDL SEGFAULTs on foreign distro)

From: Marius Bakke <[email-masked]>
Date: Sun, 07 Oct 2018 22:06:37 +0200

Hello!  Sorry for dropping the ball on this.

Tim Gesthuizen <[email-masked]> writes:

> Hi,
> I tried to find some free time to investigate a little bit further in
> what exactly triggers the crash to happen.
> A few days ago I had the idea of getting a GL context through GLUT and
> don't use SDL at all. So I quickly investigated whether this would also
> crash.
> So I fetched the cube example (cube.c) from the OpenGL example archive:
>
> https://www.opengl.org/archives/resources/code/samples/glut_examples/examples/examples.html
>
> and compiled it through guix. You can find the exact procedure by
> inspecting the log attached. If I did not make an error this should
> proof that the problem lies in OpenGL and not in SDL.
>
> Tim.
> tibbe@tibbe-pc:~/src/glut-example$ guix environment --ad-hoc freeglut
> tibbe@tibbe-pc:~/src/glut-example$ echo $GUIX_ENVIRONMENT
> /gnu/store/gsfq0h6hpjz9ddvgn4g3gkl5r6gg3ink-profile
> tibbe@tibbe-pc:~/src/glut-example$ ls $GUIX_ENVIRONMENT
> etc  include  lib  manifest  share
> tibbe@tibbe-pc:~/src/glut-example$ gcc cube.c -L $GUIX_ENVIRONMENT/lib -l glut -l GL -I $GUIX_ENVIRONMENT/include
> /tmp/ccXMXGNS.o: In function `init':
> cube.c:(.text+0x321): undefined reference to `gluPerspective'
> cube.c:(.text+0x372): undefined reference to `gluLookAt'
> collect2: error: ld returned 1 exit status
> tibbe@tibbe-pc:~/src/glut-example$ gcc cube.c -L $GUIX_ENVIRONMENT/lib -l glut -l glu -l GL -I $GUIX_ENVIRONMENT/include
> ld: cannot find -lglu
> collect2: error: ld returned 1 exit status
> tibbe@tibbe-pc:~/src/glut-example$ gcc cube.c -L $GUIX_ENVIRONMENT/lib -l glut -l GLU -l GL -I $GUIX_ENVIRONMENT/include
> tibbe@tibbe-pc:~/src/glut-example$ ls
> a.out  cube.c
> tibbe@tibbe-pc:~/src/glut-example$ ./a.out 
> Segmentation fault

Nice catch!  Earlier in the bisect, you found
5318b103ff277efbac248a066d162589a9083baa (gnu: libepoxy: Update to
1.5.1.).  Can you try this patch and see if it makes a difference?

From 2fa87c8c06b0a20e1f6c5c4e9edcc6a6fdd0c3d1 Mon Sep 17 00:00:00 2001
From: Marius Bakke <[email-masked]>
Date: Sun, 7 Oct 2018 22:04:27 +0200
Subject: [PATCH] gnu: libepoxy: Downgrade to 1.5.0.

This reverts commit 5318b103ff277efbac248a066d162589a9083baa.
---
 gnu/packages/gl.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index b88fab492..d512f10f7 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -550,7 +550,7 @@ OpenGL graphics API.")
 (define-public libepoxy
   (package
     (name "libepoxy")
-    (version "1.5.2")
+    (version "1.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -558,7 +558,7 @@ OpenGL graphics API.")
                     version "/libepoxy-" version ".tar.xz"))
               (sha256
                (base32
-                "1n57xj5i6giw4mp5s59w1m9bm33sd6gjg7r00dzzvcwya6326mm9"))))
+                "1md58amxyp34yjnw4xa185hw5jm0hnb2xnhdc28zdsx6k19rk52c"))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-- 
2.19.0