Bug 247752 - devel/sdl20: build error
Summary: devel/sdl20: build error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-04 04:07 UTC by Ivan Rozhuk
Modified: 2020-07-09 11:53 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (amdmi3)


Attachments
Fix for building with VIDEO_OPENGLES2 disabled (597 bytes, text/plain)
2020-07-06 15:48 UTC, Sean Farley
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2020-07-04 04:07:57 UTC
libtool: compile:  cc -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fdebug-prefix-map=/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12=. -DLIBICONV_PLUG -isystem /usr/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/include -idirafter /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/video/khronos -mmmx -msse -msse2 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -I/usr/local/include -I/usr/local/include -I/usr/local/include/libdrm -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -MMD -MT build/SDL_test_crc32.lo -c /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/test/SDL_test_crc32.c  -fPIC -DPIC -o build/.libs/SDL_test_crc32.o
src/video/kmsdrm/SDL_kmsdrmvideo.c:394:5: error: unknown type name 'EGLContext'; did you mean 'GContext'?
    EGLContext egl_context;
    ^~~~~~~~~~
    GContext
/usr/local/include/X11/X.h:105:13: note: 'GContext' declared here
typedef XID GContext;
            ^
src/video/kmsdrm/SDL_kmsdrmvideo.c:728:25: warning: unused variable 'windata' [-Wunused-variable]
        SDL_WindowData *windata = (SDL_WindowData *)window->driverdata;
                        ^
1 warning and 1 error generated.
gmake[2]: *** [Makefile:656: build/SDL_kmsdrmvideo.lo] Error 1
gmake[2]: *** Waiting for unfinished jobs....



===> The following configuration options are available for sdl2-2.0.12:
     ALSA=off: Audio output via the ALSA audio architecture
     ASM=on: Use optimized assembly code
     DLOPEN=on: Use dlopen for loading 3rd party libraries
     HIDAPI=off: Use HIDAPI for low level joystick drivers
     JACK=off: Audio output via the JackD sound server
     NAS=off: Audio output via the Network Audio System
     OSS=on: Audio output via the Open Sound System
     PTHREADS=on: Use POSIX threads for multi-threading
     PULSEAUDIO=off: Audio output via the PulseAudio sound server
     SAMPLERATE=off: Audio rate conversion via libsamplerate
     SDL_ATOMIC=on: Enable the SDL Atomic subsystem
     SDL_AUDIO=on: Enable the SDL Audio subsystem
     SDL_CPUINFO=on: Enable the SDL CPUinfo subsystem
     SDL_EVENTS=on: Enable the SDL Events subsystem
     SDL_FILE=on: Enable the SDL File subsystem
     SDL_HAPTIC=on: Enable the SDL Haptic subsystem
     SDL_JOYSTICK=on: Enable the SDL Joystick subsystem
     SDL_LOADSO=on: Enable the SDL Loadso subsystem
     SDL_POWER=on: Enable the SDL Power subsystem
     SDL_RENDER=on: Enable the SDL Render subsystem
     SDL_THREADS=on: Enable the SDL Threads subsystem
     SDL_TIMERS=on: Enable the SDL Timers subsystem
     SDL_VIDEO=on: Enable the SDL Video subsystem
     SNDIO=off: Sndio audio support
     UDEV=off: Use udev for input device detection
     VIDEO_KMSDRM=on: KMSDRM display support
     VIDEO_OPENGL=on: OpenGL rendering support
     VIDEO_OPENGLES2=off: OpenGL ES 2.x rendering support
     VIDEO_WAYLAND=off: Wayland display support
     VIDEO_X11=on: X11 display support
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2020-07-04 13:32:26 UTC
(In reply to rozhuk.im from comment #0)
Try to turn on VIDEO_OPENGLES2.
Comment 2 Ivan Rozhuk 2020-07-04 13:42:25 UTC
(In reply to VVD from comment #1)

With VIDEO_OPENGLES2=on - build ok.
Comment 3 Sean Farley freebsd_committer freebsd_triage 2020-07-06 15:48:51 UTC
Created attachment 216256 [details]
Fix for building with VIDEO_OPENGLES2 disabled

It is fixed upstream:  http://hg.libsdl.org/SDL/diff/389ce8cfa2a3/src/video/kmsdrm/SDL_kmsdrmvideo.c

Attaching the patch to the ports tree generated by makepatch.  Just place it in the /usr/ports/devel/sdl20/files directory (create first).
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-07-07 20:44:07 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Jul  7 20:43:29 UTC 2020
New revision: 541453
URL: https://svnweb.freebsd.org/changeset/ports/541453

Log:
  - Fix build without VIDEO_OPENGLES2

  PR:		247752
  Submitted by:	scf@FreeBSD.org
  Reported by:	rozhuk.im@gmail.com

Changes:
  head/devel/sdl20/files/
  head/devel/sdl20/files/patch-noegl