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 2633 - SDL tests don't build on Linux
Summary: SDL tests don't build on Linux
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.3
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 17:27 UTC by Stewart Miles
Modified: 2018-08-06 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stewart Miles 2014-07-08 17:27:26 UTC
$ cd sdl2-2.0.3/SDL2-2.0.3/test
$ ./autogen.sh
$ ./configure
$ make -j16
gcc -o testautomation testautomation.c testautomation_audio.c testautomation_clipboard.c testautomation_events.c testautomation_keyboard.c testautomation_main.c testautomation_mouse.c testautomation_pixels.c testautomation_platform.c testautomation_rect.c testautomation_render.c testautomation_rwops.c testautomation_sdltest.c testautomation_stdlib.c testautomation_surface.c testautomation_syswm.c testautomation_timer.c testautomation_video.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testgamecontroller testgamecontroller.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testgl2 testgl2.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread   -lm
gcc -o testgles testgles.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread    -lGLESv1_CM -lm
gcc -o testgles2 testgles2.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread   -lm
gcc -o testhotplug testhotplug.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testthread testthread.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testiconv testiconv.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testime testime.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testintersections testintersections.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testrelative testrelative.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testjoystick testjoystick.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testkeys testkeys.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testloadso testloadso.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testlock testlock.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testmultiaudio testmultiaudio.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
testgles.c: In function 'main':
testgles.c:164:10: error: 'SDLTest_CommonState' has no member named 'gl_profile_mask'
make: *** [testgles] Error 1
make: *** Waiting for unfinished jobs....
testgles2.c: In function 'main':
testgles2.c:467:10: error: 'SDLTest_CommonState' has no member named 'gl_profile_mask'
make: *** [testgles2] Error 1
/tmp/cc9M2UmO.o: In function `main':
sdl2-2.0.3/SDL2-2.0.3/test/testgl2.c:304: undefined reference to `SDL_GL_GetDrawableSize'
sdl2-2.0.3/SDL2-2.0.3/test/testgl2.c:390: undefined reference to `SDL_GL_GetDrawableSize'
collect2: ld returned 1 exit status
make: *** [testgl2] Error 1
/tmp/ccby7tUN.o: In function `main':
oss/sdl2-2.0.3/SDL2-2.0.3/test/testgamecontroller.c:269: undefined reference to `SDL_GameControllerAddMappingsFromFile'
collect2: ld returned 1 exit status
make: *** [testgamecontroller] Error 1
/tmp/ccbT9Wrh.o: In function `platform_testHasFunctions':
sdl2-2.0.3/SDL2-2.0.3/test/testautomation_platform.c:201: undefined reference to `SDL_HasAVX'
collect2: ld returned 1 exit status
make: *** [testautomation] Error 1
Comment 1 Sam Lantinga 2014-07-08 23:51:29 UTC
It looks like you may be building against an old version of SDL. Can you double-check and confirm?
Comment 2 Stewart Miles 2014-07-09 00:06:04 UTC
(In reply to Sam Lantinga from comment #1)
> It looks like you may be building against an old version of SDL. Can you
> double-check and confirm?

I tried this out by building SDL 2.0.3 (the latest release).

Trying a newer version from head (sync'd today)...


$ make
... snip ...
gcc -o testplatform testplatform.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread  
gcc -o testpower testpower.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OPENGL -g -lSDL2_test -Wl,rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread  
testhittesting.c:18:1: error: unknown type name 'SDL_HitTestResult'
testhittesting.c: In function 'hitTest':
testhittesting.c:26:20: error: 'SDL_HITTEST_DRAGGABLE' undeclared (first use in this function)
testhittesting.c:26:20: note: each undeclared identifier is reported only once for each function it appears in
testhittesting.c:38:1: error: 'SDL_HITTEST_RESIZE_TOPLEFT' undeclared (first use in this function)testgles2.c: In function 'main':

testgles2.c:471:10: error: 'SDLTest_CommonState' has no member named 'gl_profile_mask'
testhittesting.c:40:1: error: 'SDL_HITTEST_RESIZE_TOP' undeclared (first use in this function)
testhittesting.c:42:1: error: 'SDL_HITTEST_RESIZE_TOPRIGHT' undeclared (first use in this function)
testhittesting.c:44:1: error: 'SDL_HITTEST_RESIZE_RIGHT' undeclared (first use in this function)
testhittesting.c:46:1: error: 'SDL_HITTEST_RESIZE_BOTTOMRIGHT' undeclared (first use in this function)
testhittesting.c:48:1: error: 'SDL_HITTEST_RESIZE_BOTTOM' undeclared (first use in this function)
testhittesting.c:50:1: error: 'SDL_HITTEST_RESIZE_BOTTOMLEFT' undeclared (first use in this function)
testhittesting.c:52:1: error: 'SDL_HITTEST_RESIZE_LEFT' undeclared (first use in this function)
testhittesting.c:56:12: error: 'SDL_HITTEST_NORMAL' undeclared (first use in this function)
make: *** [testhittesting] Error 1
make: *** Waiting for unfinished jobs....
make: *** [testgles2] Error 1
testgles.c: In function 'main':
testgles.c:164:10: error: 'SDLTest_CommonState' has no member named 'gl_profile_mask'
make: *** [testgles] Error 1
testgesture.c: In function 'main':
testgesture.c:278:28: error: expected ')' before 'SDL_PRIs64'
testgesture.c:283:38: error: expected ')' before 'SDL_PRIs64'
make: *** [testgesture] Error 1
/tmp/cc0sMMPu.o: In function `main':
sdl-2.x/test/testgl2.c:304: undefined reference to `SDL_GL_GetDrawableSize'
oss/sdl-2.x/test/testgl2.c:390: undefined reference to `SDL_GL_GetDrawableSize'
collect2: ld returned 1 exit status
make: *** [testgl2] Error 1
/tmp/ccCB97uu.o: In function `main':
sdl-2.x/test/testgamecontroller.c:273: undefined reference to `SDL_GameControllerAddMappingsFromFile'
collect2: ld returned 1 exit status
make: *** [testgamecontroller] Error 1
/tmp/cccrT16v.o: In function `TestCPUInfo':
sdl-2.x/test/testplatform.c:156: undefined reference to `SDL_HasAVX'
sdl-2.x/test/testplatform.c:157: undefined reference to `SDL_GetSystemRAM'
collect2: ld returned 1 exit status
make: *** [testplatform] Error 1
testautomation_hints.c:14:5: error: 'SDL_HINT_ACCELEROMETER_AS_JOYSTICK' undeclared here (not in a function)
testautomation_hints.c:20:5: error: 'SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK' undeclared here (not in a function)
testautomation_hints.c:21:5: error: 'SDL_HINT_MOUSE_RELATIVE_MODE_WARP' undeclared here (not in a function)
testautomation_hints.c:23:5: error: 'SDL_HINT_RENDER_DIRECT3D_THREADSAFE' undeclared here (not in a function)
testautomation_hints.c:29:5: error: 'SDL_HINT_VIDEO_ALLOW_SCREENSAVER' undeclared here (not in a function)
testautomation_hints.c:30:5: error: 'SDL_HINT_VIDEO_HIGHDPI_DISABLED' undeclared here (not in a function)
testautomation_hints.c:31:5: error: 'SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES' undeclared here (not in a function)
testautomation_hints.c:33:5: error: 'SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT' undeclared here (not in a function)
testautomation_hints.c:34:5: error: 'SDL_HINT_VIDEO_WIN_D3DCOMPILER' undeclared here (not in a function)
make: *** [testautomation] Error 1
Comment 3 Sam Lantinga 2014-07-09 03:49:29 UTC
Did you do "make install" from the main SDL directory?
Comment 4 Stewart Miles 2014-12-29 18:13:16 UTC
Hi Sam, sorry for my slow response on this.  If SDL needs to be installed using "make install" before running the tests then I guess this is working as intended.  However, I would really prefer to not modify my build machine environment just to build the SDL tests.  Consider the case where I'm modifying SDL - hence it's in an experimental state - and I would like to run the SDL tests to verify that I haven't broken anything.  In this case, I would need to *install* the experimental SDL before being able to run the tests which could result in a dodgy environment on my build machine.  Ideally, I would like to be able to have the option to build the tests "in tree" with the rest of SDL rather than relying upon SDL being installed first.
Comment 5 Sam Lantinga 2017-08-14 06:08:13 UTC
We don't currently support that, although that sounds like a good idea. Do you have a proposed patch to support that?
Comment 6 Ryan C. Gordon 2018-08-06 21:20:24 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.