We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2735

Summary: openwiz toolchain vs configure
Product: SDL Reporter: Bob Ombo <bombo>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: ARM   
OS: Linux   

Description Bob Ombo 2014-09-20 17:33:20 UTC
I'm trying to compile SDL2 for my GPH WIZ:

(I added Xorg header files + ogl es headers into /opt/cc/openwiz/gcc/include)

$ ls /opt/cc/openwiz/gcc/include
EGL  GLES  KHR  X11

$ CPPFLAGS=-I/opt/cc/openwiz/gcc/include ./configure --prefix=/opt/cc/openwiz/ --host=arm-openwiz-linux-gnu --disable-pulseaudio --disable-dbus --disable-esd
[...]
checking for X... no
checking for OpenGL (GLX) support... no
checking for EGL support... yes
checking for OpenGL ES v1 headers... yes
checking for OpenGL ES v2 headers... no
[...]

$ make
[...]
CC     build/SDL_test_fuzzer.o
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c: In function 'SDLTest_GenerateUnsignedBoundaryValues':
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:205: warning: declaration of 'index' shadows a global declaration
  /opt/cc/openwiz/gcc/bin/../arm-openwiz-linux-gnu/sys-root/usr/include/string.h:310: warning: shadowed declaration is here
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c: In function 'SDLTest_RandomUint64BoundaryValue':
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:300: error: 'ULLONG_MAX' undeclared (first use in this function)
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:300: error: (Each undeclared identifier is reported only once
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:300: error: for each function it appears in.)
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c: In function 'SDLTest_GenerateSignedBoundaryValues':
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:337: warning: declaration of 'index' shadows a global declaration
  /opt/cc/openwiz/gcc/bin/../arm-openwiz-linux-gnu/sys-root/usr/include/string.h:310: warning: shadowed declaration is here
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c: In function 'SDLTest_RandomSint64BoundaryValue':
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:436: error: 'LLONG_MAX' undeclared (first use in this function)
  /opt/cc/openwiz/src/SDL/src/test/SDL_test_fuzzer.c:437: error: 'LLONG_MIN' undeclared (first use in this function)
  make: *** [build/SDL_test_fuzzer.o] Error 1
[...]

so i added this to src/test/SDL_test_fuzzer.c:
#ifndef LLONG_MIN
# define LLONG_MIN    INT64_MIN
#endif

#ifndef LLONG_MAX
# define LLONG_MAX    INT64_MAX
#endif

#ifndef ULLONG_MAX
# define ULLONG_MAX   UINT64_MAX
#endif

...and it compiled.

Only problem i got now is 'no video devices available' on the WIZ from SDL_Init()

The device doesn't have libX11 anywhere in the system.
Comment 1 Sam Lantinga 2017-08-14 05:02:43 UTC
This compile error should be fixed!
https://hg.libsdl.org/SDL/rev/a2792ce0ec8c

Unfortunately if you don't have X11, you'll have to figure out some other way to get graphics to the screen...