SDL 2.0.1 failing to compile on CentOS 5.x

Anybody have an SDL2.x build for CentOS 5.x?
Unfortunately, I cannot upgrade the machine or change OSes on it.

I downloaded SDL2.0.1 source tarball and tried to build, but I am getting compile errors:

[cglx at vizhead SDL2-2.0.1]$ uname -a
Linux vizhead 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[cglx at vizhead SDL2-2.0.1]$ ./configure && make
[… snip]
libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse
-msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11clipboard.lo
-c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -o build/.libs/SDL_x11clipboard.o
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h:90,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:61,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before
’XRRScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRCrtc’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRMode’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:272: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before '*‘
token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRQueryOutputProperty’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:274: error: expected declaration specifiers or ‘…’ before 'RROutput’
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:66,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:45: error: expected specifier-qualifier-list before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:57: error: expected specifier-qualifier-list before 'RRMode’
make: *** [build/SDL_x11clipboard.lo] Error 1
[cglx at vizhead SDL2-2.0.1]$

Can you run gcc --version, and give us the output?

Also, can you run this command:
gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -E -o /tmp/SDL_x11clipboard.cpp

And post the output to http://gist.github.com and send us the link?

Thanks!

  • J?rgen.On Jan 28, 2014, at 11:09 AM, Ralph Seguin wrote:

Anybody have an SDL2.x build for CentOS 5.x?
Unfortunately, I cannot upgrade the machine or change OSes on it.

I downloaded SDL2.0.1 source tarball and tried to build, but I am getting compile errors:

[cglx at vizhead SDL2-2.0.1]$ uname -a
Linux vizhead 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[cglx at vizhead SDL2-2.0.1]$ ./configure && make
[… snip]
libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11clipboard.lo -c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -o build/.libs/SDL_x11clipboard.o
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h:90,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:61,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘XRRScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRCrtc’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRMode’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:272: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRQueryOutputProperty’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:274: error: expected declaration specifiers or ‘…’ before 'RROutput’
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:66,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:45: error: expected specifier-qualifier-list before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:57: error: expected specifier-qualifier-list before 'RRMode’
make: *** [build/SDL_x11clipboard.lo] Error 1
[cglx at vizhead SDL2-2.0.1]$


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I just ran it and attached the file.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_x11clipboard.cpp
Type: application/octet-stream
Size: 707818 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140130/ddaa7748/attachment-0001.obj
-------------- next part --------------

[cglx at vizhead SDL2-2.0.1]$ gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -E -o /tmp/SDL_x11clipboard.cpp
[cglx at vizhead SDL2-2.0.1]$On Jan 30, 2014, at 1:45 PM, Jorgen Tjerno wrote:

Can you run gcc --version, and give us the output?

Also, can you run this command:
gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -E -o /tmp/SDL_x11clipboard.cpp

And post the output to http://gist.github.com and send us the link?

Thanks!

  • J?rgen.

On Jan 28, 2014, at 11:09 AM, Ralph Seguin wrote:

Anybody have an SDL2.x build for CentOS 5.x?
Unfortunately, I cannot upgrade the machine or change OSes on it.

I downloaded SDL2.0.1 source tarball and tried to build, but I am getting compile errors:

[cglx at vizhead SDL2-2.0.1]$ uname -a
Linux vizhead 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[cglx at vizhead SDL2-2.0.1]$ ./configure && make
[… snip]
libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11clipboard.lo -c /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC -DPIC -o build/.libs/SDL_x11clipboard.o
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h:90,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:61,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeOutputInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRGetCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘)’ before '
’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRFreeCrtcInfo’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘XRRScreenResources’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRCrtc’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RRMode’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:272: error: expected declaration specifiers or ‘…’ before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘X11_XRRQueryOutputProperty’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:274: error: expected declaration specifiers or ‘…’ before 'RROutput’
In file included from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:66,
from /home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:45: error: expected specifier-qualifier-list before ‘RROutput’
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:57: error: expected specifier-qualifier-list before 'RRMode’
make: *** [build/SDL_x11clipboard.lo] Error 1
[cglx at vizhead SDL2-2.0.1]$


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

This is pretty frustrating!
I am trying to write portable code and thus wanted to try to use SDL
(because, while GLUT is portable, glutFullScreen() does NOT work to span
all displays on 2 graphics cards).
There are two things which may make me abandon SDL:

  1. Already detailed previously that SDL2 SDL_SetWindowFullScreen() with
    SDL_WINDOW_FULLSCREEN_DESKTOP on Linux does NOT work (for a desktop
    spanning 2 graphics cards: 4 LCDs on 1st graphics card, 2 LCDs on 2nd
    graphics card).
    1a. It resizes to 3840x2160 (the top 4 LCDs) which is the 1st graphics
    card, instead of 3840x3240 which is the whole desktop of all 6 displays (3
    rows x 2 columns).

1b. It looks like it somehow loses the OpenGL context or something when it
resizes to the top 4 LCDs (3840x2160). All I get is a black screen, even
though SDL_GetWindowDisplayMode() seems to be getting the right dimensions
and glViewport() is being called correctly.
SDL_DisplayMode displayMode;
SDL_GetWindowDisplayMode(theWindow, &displayMode);
printf(“drawGLScene(): calling glViewport(0, 0, w=%d, h=%d)\n”,
displayMode.w, displayMode.h);
glViewport(0, 0, displayMode.w, displayMode.h);

  1. While SDL1.2 does work on Linux.
    SDL1.2 does NOT work on OS/X (10.8 or 10.9).
    SDL_SetVideoMode() is throwing an exception on OS/X:
    Ralphs-MacBook-Pro:rps_sdl_opengl seguin$ ./rps_sdl1_hmi_mesh
    hmi_doppler_512_20140219.ppm
    initializing SDL…
    2014-02-19 21:19:49.735 rps_sdl1_hmi_mesh[1365:707] *** Terminating app due
    to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Error
    (1000) creating CGSWindow on line 259’
    *** First throw call stack:
    (
    0 CoreFoundation 0x00007fff975f6b06
    __exceptionPreprocess + 198
    1 libobjc.A.dylib 0x00007fff952203f0
    objc_exception_throw + 43
    2 CoreFoundation 0x00007fff975f68dc +[NSException
    raise:format:] + 204
    3 AppKit 0x00007fff980a7b49
    _NSCreateWindowWithOpaqueShape2 + 655
    4 AppKit 0x00007fff980a6340 -[NSWindow
    _commonAwake] + 2002
    5 AppKit 0x00007fff98064d82 -[NSWindow
    _commonInitFrame:styleMask:backing:defer:] + 1763
    6 AppKit 0x00007fff98063ecf -[NSWindow
    _initContent:styleMask:backing:defer:contentView:] + 1568
    7 AppKit 0x00007fff9806389f -[NSWindow
    initWithContentRect:styleMask:backing:defer:] + 45
    8 libSDL-1.2.0.dylib 0x0000000104dd1077
    -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 279
    9 libSDL-1.2.0.dylib 0x0000000104dceb49 QZ_SetVideoMode
  • 2633
    10 libSDL-1.2.0.dylib 0x0000000104dc4a89 SDL_SetVideoMode
  • 937
    11 rps_sdl1_hmi_mesh 0x0000000104d97e0a main + 746
    12 libdyld.dylib 0x00007fff9396e7e1 start + 0
    13 ??? 0x0000000000000002 0x0 + 2
    )
    libc++abi.dylib: terminate called throwing an exception
    Abort trap: 6

Google searches say to #undef main (WHY ON EARTH would a library re#define
main??!??!?) and link in SDLmain, which I have done, only to get a slew
of unresolved symbols during link:

g++ -Wall -g rps_sdl1_hmi_mesh.o fgh_teapot.o rps_pnm.o rpsPolygonMesh.o
-L/usr/local/lib /usr/local/lib/libSDLmain.a -lSDL -framework OpenGL -lm
-o rps_sdl1_hmi_mesh
Undefined symbols for architecture x86_64:
"_CFBundleCopyBundleURL", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFBundleGetInfoDictionary", referenced from:
_main in libSDLmain.a(SDLMain.o)
"_CFBundleGetMainBundle", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
_main in libSDLmain.a(SDLMain.o)
"_CFRelease", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLCreateCopyDeletingLastPathComponent", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLGetFileSystemRepresentation", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CPSEnableForegroundOperation", referenced from:
_main in libSDLmain.a(SDLMain.o)
"_CPSGetCurrentProcess", referenced from:
_main in libSDLmain.a(SDLMain.o)
"_CPSSetFrontProcess", referenced from:
_main in libSDLmain.a(SDLMain.o)
"_NSAllocateMemoryPages", referenced from:
-[NSString(ReplaceSubString) stringByReplacingRange:with:] in
libSDLmain.a(SDLMain.o)
"_NSApp", referenced from:
_main in libSDLmain.a(SDLMain.o)
"_NSDeallocateMemoryPages", referenced from:
-[NSString(ReplaceSubString) stringByReplacingRange:with:] in
libSDLmain.a(SDLMain.o)
OBJC_CLASS$NSApplication", referenced from:
l_OBJC
$CATEGORY_NSApplication$_SDLApplication in
libSDLmain.a(SDLMain.o)
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_NSAutoreleasePool”, referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_NSMenu”, referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_NSMenuItem”, referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_NSObject”, referenced from:
OBJC_CLASS$_SDLMain in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_NSProcessInfo”, referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_CLASS$NSString", referenced from:
l_OBJC
$CATEGORY_NSString$_ReplaceSubString in
libSDLmain.a(SDLMain.o)
objc-class-ref in libSDLmain.a(SDLMain.o)
OBJC_METACLASS$_NSObject”, referenced from:
OBJC_METACLASS$_SDLMain in libSDLmain.a(SDLMain.o)
”___CFConstantStringClassReference”, referenced from:
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)
CFString in libSDLmain.a(SDLMain.o)

"__objc_empty_cache", referenced from:
OBJC_METACLASS$_SDLMain in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_SDLMain in libSDLmain.a(SDLMain.o)
"__objc_empty_vtable", referenced from:
OBJC_METACLASS$_SDLMain in libSDLmain.a(SDLMain.o)
OBJC_CLASS$_SDLMain in libSDLmain.a(SDLMain.o)
"_objc_msgSend", referenced from:
-[SDLMain application:openFile:] in libSDLmain.a(SDLMain.o)
-[SDLMain applicationDidFinishLaunching:] in libSDLmain.a(SDLMain.o)
-[NSString(ReplaceSubString) stringByReplacingRange:with:] in
libSDLmain.a(SDLMain.o)
_main in libSDLmain.a(SDLMain.o)
"objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_length in libSDLmain.a(SDLMain.o)
l_objc_msgSend_fixup_alloc in libSDLmain.a(SDLMain.o)
l_objc_msgSend_fixup_release in libSDLmain.a(SDLMain.o)
l_objc_msgSend_fixup_objectForKey
in libSDLmain.a(SDLMain.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [rps_sdl1_hmi_mesh] Error 1On Thu, Jan 30, 2014 at 3:27 PM, Ralph Seguin wrote:

Thanks so much for your help!
I am working on abstracting my code from GLUT and making it so that I can
use either SDL or GLUT.
I have 6 1080p displays in a 2hx3v tiling driven by 2 Nvidia GTX680 GPUs,
but GLUT wasn’t working for glutFullScreen() when spanning the 2 graphics
cards.
glutFullScreen() only made it fullscreen across the first card (top 4
monitors) and I know that SDL fullscreen call is working…

It is definitely getting further now:
/bin/sh ./libtool --mode=compile gcc -g -O3 -DUSING_GENERATED_CONFIG_H
-Iinclude -I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse
-msse2 -fvisibility=hidden -pthread -I/usr/include/kde/artsc
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT
-DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_test_fuzzer.o -c
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c -o
build/SDL_test_fuzzer.o
libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude
-I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2
-fvisibility=hidden -pthread -I/usr/include/kde/artsc
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT
-DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_test_fuzzer.o -c
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c -fPIC -DPIC -o
build/.libs/SDL_test_fuzzer.o
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c: In function
’SDLTest_RandomUint64BoundaryValue’:
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c:300: error:
‘ULLONG_MAX’ undeclared (first use in this function)
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c:300: error:
(Each undeclared identifier is reported only once
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c:300: error: for
each function it appears in.)
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c: In function
’SDLTest_RandomSint64BoundaryValue’:
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c:436: error:
‘LLONG_MAX’ undeclared (first use in this function)
/home/cglx/Downloads/SDL2-2.0.1/src/test/SDL_test_fuzzer.c:437: error:
‘LLONG_MIN’ undeclared (first use in this function)
make: *** [build/SDL_test_fuzzer.o] Error 1

I am guessing that this is just test code though, as the libs seem to have
been built now:
[cglx at vizhead SDL2-2.0.1]$ ls -al build/.libs/libSDL*
lrwxrwxrwx 1 cglx cglx 20 Jan 30 14:14 build/.libs/libSDL2-2.0.so.0
-> libSDL2-2.0.so.0.1.0
-rwxrwxr-x 1 cglx cglx 4048112 Jan 30 14:14
build/.libs/libSDL2-2.0.so.0.1.0
-rw-rw-r-- 1 cglx cglx 7394230 Jan 30 14:14 build/.libs/libSDL2.a
lrwxrwxrwx 1 cglx cglx 13 Jan 30 14:14 build/.libs/libSDL2.la ->
…/libSDL2.la
-rw-rw-r-- 1 cglx cglx 953 Jan 30 14:14 build/.libs/libSDL2.lai
lrwxrwxrwx 1 cglx cglx 20 Jan 30 14:14 build/.libs/libSDL2.so ->
libSDL2-2.0.so.0.1.0

Thanks.
-Ralph

On Jan 30, 2014, at 3:12 PM, Jorgen Tjerno wrote:

So it looks like the problem is that XRRScreenResources was added in
Xrandr 1.2, and your machine probably has an older version?

Try running ./configure --disable-video-x11-xrandr and then rebuilding.

We should probably check for a minimum version of 1.2 in our xrandr
configure check to avoid this problem. We have a runtime check that checks
for 1.2.

  • J?rgen.

On Jan 30, 2014, at 2:15 PM, Ralph Seguin wrote:

.cpp output file is here:
https://gist.github.com/anonymous/8721085

[cglx at vizhead ~]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
Copyright © 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

[cglx at vizhead ~]$ uname -a
Linux vizhead 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011
x86_64 x86_64 x86_64 GNU/Linux

[cglx at vizhead ~]$ top

top - 13:05:34 up 76 days, 53 min, 5 users, load average: 0.27, 0.34,
0.36

Tasks: 343 total, 1 running, 342 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.9%us, 0.1%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.0%si,
0.0%st

Mem: 148440056k total, 133135988k used, 15304068k free, 158496k
buffers

Swap: 0k total, 0k used, 0k free, 116003032k cached

On Jan 30, 2014, at 1:45 PM, Jorgen Tjerno wrote:

Can you run gcc --version, and give us the output?

Also, can you run this command:
gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude
-I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2
-fvisibility=hidden -pthread -I/usr/include/kde/artsc
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT
-DHAVE_LINUX_VERSION_H -Wall -c
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC
-DPIC -E -o /tmp/SDL_x11clipboard.cpp

And post the output to http://gist.github.com and send us the link?

Thanks!

  • J?rgen.

On Jan 28, 2014, at 11:09 AM, Ralph Seguin wrote:

Anybody have an SDL2.x build for CentOS 5.x?
Unfortunately, I cannot upgrade the machine or change OSes on it.

I downloaded SDL2.0.1 source tarball and tried to build, but I am
getting compile errors:

[cglx at vizhead SDL2-2.0.1]$ uname -a
Linux vizhead 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011
x86_64 x86_64 x86_64 GNU/Linux

[cglx at vizhead SDL2-2.0.1]$ ./configure && make
[… snip]
libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -Iinclude
-I/home/cglx/Downloads/SDL2-2.0.1/include -mmmx -m3dnow -msse -msse2
-fvisibility=hidden -pthread -I/usr/include/kde/artsc
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -D_REENTRANT
-DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11clipboard.lo -c
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c -fPIC
-DPIC -o build/.libs/SDL_x11clipboard.o

In file included from
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h:90,

         from

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:61,

         from

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:265:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetScreenResources’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266:
error: expected ‘)’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:266:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeScreenResources’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:267:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetOutputInfo’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268:
error: expected ‘)’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:268:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeOutputInfo’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:269:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRGetCrtcInfo’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270:
error: expected ‘)’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:270:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRFreeCrtcInfo’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271:
error: expected declaration specifiers or ‘…’ before ‘XRRScreenResources’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271:
error: expected declaration specifiers or ‘…’ before ‘RRCrtc’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271:
error: expected declaration specifiers or ‘…’ before ‘RRMode’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:271:
error: expected declaration specifiers or ‘…’ before ‘RROutput’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:272:
error: expected declaration specifiers or ‘…’ before ‘RROutput’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:273:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before
’X11_XRRQueryOutputProperty’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11sym.h:274:
error: expected declaration specifiers or ‘…’ before ‘RROutput’

In file included from
/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11video.h:66,

         from

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c:28:

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:45:
error: expected specifier-qualifier-list before ‘RROutput’

/home/cglx/Downloads/SDL2-2.0.1/src/video/x11/SDL_x11modes.h:57:
error: expected specifier-qualifier-list before ‘RRMode’

make: *** [build/SDL_x11clipboard.lo] Error 1
[cglx at vizhead SDL2-2.0.1]$


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org