Bug#814276: Non-Free file: src/stdlib/SDL_qsort.c
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Sat Mar 5 16:03:29 UTC 2016
Hi,
2016-03-04 11:05 GMT+00:00 Manuel A. Fernandez Montecelo
<manuel.montezelo at gmail.com>:
> 2016-03-04 6:47 GMT+00:00 Sam Lantinga <slouken at gmail.com>:
>> We have to implement the new API functions on the other platforms so I'm
>> guessing it'll be a little while. Go ahead and ship with the new license.
>
> OK, thanks.
It seems that substituting SDL_qsort.c from 2.0.4 with the latest
version doesn't work straight away in a clean builder:
=====================
[in configure]
checking for size_t... yes
...
checking for qsort... yes
...
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:347:61: error:
unknown type name 'size_t'
static char * pivot_big(char *first, char *mid, char *last, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:388:42: error:
unknown type name 'size_t'
static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:388:56: error:
unknown type name 'size_t'
static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:419:39: error:
unknown type name 'size_t'
static void qsort_aligned(void *base, size_t nmemb, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:419:53: error:
unknown type name 'size_t'
static void qsort_aligned(void *base, size_t nmemb, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:450:37: error:
unknown type name 'size_t'
static void qsort_words(void *base, size_t nmemb,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:502:35: error:
unknown type name 'size_t'
extern void qsortG(void *base, size_t nmemb, size_t size,
^
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:502:49: error:
unknown type name 'size_t'
extern void qsortG(void *base, size_t nmemb, size_t size,
=====================
In another system (the reason why the behaviour is different is yet to
be determined), it gets to compile, but fails to link:
=====================
Warning, configure.in is out of date
#(cd /tmp/libsdl2 && sh autogen.sh && sh configure)
/bin/bash build-scripts/mkinstalldirs build
mkdir -p -- build
/bin/bash build-scripts/updaterev.sh
CC build/SDL.lo
CC build/SDL_assert.lo
CC build/SDL_error.lo
CC build/SDL_hints.lo
CC build/SDL_log.lo
CC build/SDL_atomic.lo
CC build/SDL_spinlock.lo
CC build/SDL_audio.lo
CC build/SDL_audiocvt.lo
CC build/SDL_audiodev.lo
CC build/SDL_audiotypecvt.lo
CC build/SDL_mixer.lo
CC build/SDL_wave.lo
CC build/SDL_cpuinfo.lo
CC build/SDL_dynapi.lo
CC build/SDL_clipboardevents.lo
CC build/SDL_dropevents.lo
CC build/SDL_events.lo
CC build/SDL_gesture.lo
CC build/SDL_keyboard.lo
CC build/SDL_mouse.lo
CC build/SDL_quit.lo
CC build/SDL_touch.lo
CC build/SDL_windowevents.lo
CC build/SDL_rwops.lo
CC build/SDL_haptic.lo
CC build/SDL_gamecontroller.lo
CC build/SDL_joystick.lo
CC build/e_atan2.lo
CC build/e_log.lo
CC build/e_pow.lo
CC build/e_rem_pio2.lo
CC build/e_sqrt.lo
CC build/k_cos.lo
CC build/k_rem_pio2.lo
CC build/k_sin.lo
CC build/k_tan.lo
CC build/s_atan.lo
CC build/s_copysign.lo
CC build/s_cos.lo
CC build/s_fabs.lo
CC build/s_floor.lo
CC build/s_scalbn.lo
CC build/s_sin.lo
CC build/s_tan.lo
CC build/SDL_power.lo
CC build/SDL_d3dmath.lo
CC build/SDL_render.lo
CC build/SDL_yuv_mmx.lo
CC build/SDL_yuv_sw.lo
CC build/SDL_render_d3d.lo
CC build/SDL_render_d3d11.lo
CC build/SDL_render_gl.lo
CC build/SDL_shaders_gl.lo
CC build/SDL_render_gles.lo
CC build/SDL_render_gles2.lo
CC build/SDL_shaders_gles2.lo
CC build/SDL_render_psp.lo
CC build/SDL_blendfillrect.lo
CC build/SDL_blendline.lo
CC build/SDL_blendpoint.lo
CC build/SDL_drawline.lo
CC build/SDL_drawpoint.lo
CC build/SDL_render_sw.lo
CC build/SDL_rotate.lo
CC build/SDL_getenv.lo
CC build/SDL_iconv.lo
CC build/SDL_malloc.lo
CC build/SDL_stdlib.lo
CC build/SDL_string.lo
CC build/SDL_thread.lo
CC build/SDL_timer.lo
CC build/SDL_RLEaccel.lo
CC build/SDL_blit.lo
CC build/SDL_blit_0.lo
CC build/SDL_blit_1.lo
CC build/SDL_blit_A.lo
CC build/SDL_blit_N.lo
CC build/SDL_blit_auto.lo
CC build/SDL_blit_copy.lo
CC build/SDL_blit_slow.lo
CC build/SDL_bmp.lo
CC build/SDL_clipboard.lo
CC build/SDL_egl.lo
CC build/SDL_fillrect.lo
CC build/SDL_pixels.lo
CC build/SDL_rect.lo
CC build/SDL_shape.lo
CC build/SDL_stretch.lo
CC build/SDL_surface.lo
CC build/SDL_video.lo
CC build/SDL_nullevents.lo
CC build/SDL_nullframebuffer.lo
CC build/SDL_nullvideo.lo
CC build/SDL_diskaudio.lo
CC build/SDL_dummyaudio.lo
CC build/SDL_sysloadso.lo
CC build/SDL_dspaudio.lo
CC build/SDL_alsa_audio.lo
CC build/SDL_pulseaudio.lo
CC build/SDL_sndioaudio.lo
CC build/SDL_x11clipboard.lo
CC build/SDL_x11dyn.lo
CC build/SDL_x11events.lo
CC build/SDL_x11framebuffer.lo
CC build/SDL_x11keyboard.lo
CC build/SDL_x11messagebox.lo
CC build/SDL_x11modes.lo
CC build/SDL_x11mouse.lo
CC build/SDL_x11opengl.lo
CC build/SDL_x11opengles.lo
CC build/SDL_x11shape.lo
CC build/SDL_x11touch.lo
CC build/SDL_x11video.lo
CC build/SDL_x11window.lo
CC build/SDL_x11xinput2.lo
CC build/edid-parse.lo
CC build/imKStoUCS.lo
CC build/SDL_waylanddyn.lo
CC build/SDL_waylandevents.lo
CC build/SDL_waylandmouse.lo
CC build/SDL_waylandopengles.lo
CC build/SDL_waylandtouch.lo
CC build/SDL_waylandvideo.lo
CC build/SDL_waylandwindow.lo
CC build/SDL_dbus.lo
CC build/SDL_systhread.lo
CC build/SDL_syssem.lo
CC build/SDL_sysmutex.lo
CC build/SDL_syscond.lo
CC build/SDL_systls.lo
CC build/SDL_sysjoystick.lo
CC build/SDL_syshaptic.lo
CC build/SDL_syspower.lo
CC build/SDL_sysfilesystem.lo
CC build/SDL_systimer.lo
CC build/SDL_udev.lo
CC build/SDL_evdev.lo
LTLINK build/libSDL2.la
build/.libs/SDL_dynapi.o: In function `SDL_DYNAPI_entry':
/tmp/libsdl2/src/dynapi/SDL_dynapi_procs.h:415: undefined reference to
`SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_GetNumDisplayModesForDisplay':
/tmp/libsdl2/src/video/SDL_video.c:749: undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_AddDisplayMode':
/tmp/libsdl2/src/video/SDL_video.c:738: undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_GetNumDisplayModesForDisplay':
/tmp/libsdl2/src/video/SDL_video.c:749: undefined reference to `SDL_qsort_REAL'
/tmp/libsdl2/src/video/SDL_video.c:749: undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o:/tmp/libsdl2/src/video/SDL_video.c:749: more
undefined references to `SDL_qsort_REAL' follow
collect2: error: ld returned 1 exit status
Makefile:141: recipe for target 'build/libSDL2.la' failed
=====================
When changing the "#if 0" of the new SDL_qsort.c for "#if 1" and using
the clean builder, I get it to produce the same result:
=====================
LTLINK build/libSDL2.la
build/.libs/SDL_qsort.o: In function `SDL_qsort':
/build/libsdl2-2.0.4+dfsg2/src/stdlib/SDL_qsort.c:505: multiple
definition of `SDL_qsort'
build/.libs/SDL_dynapi.o:/build/libsdl2-2.0.4+dfsg2/src/dynapi/SDL_dynapi_procs.h:415:
first defined here
build/.libs/SDL_dynapi.o: In function `SDL_DYNAPI_entry':
/build/libsdl2-2.0.4+dfsg2/src/dynapi/SDL_dynapi_procs.h:415:
undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_GetNumDisplayModesForDisplay':
/build/libsdl2-2.0.4+dfsg2/src/video/SDL_video.c:749: undefined
reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_AddDisplayMode':
/build/libsdl2-2.0.4+dfsg2/src/video/SDL_video.c:738: undefined
reference to `SDL_qsort_REAL'
=====================
Eventually I hope to get this to work, or to wait for longer until a
new upstream release happens, because the licensing problem is clearly
not a threat.
But I send this message because maybe there's some problem with the
substitution of the file that makes it break even when not
transplanting them from future VCS versions, as I am doing.
In particular, I got the impression from previous emails from Ryan
that we shouldn't even need this file to compile, but it doesn't seem
to work like that in my/our case.
Cheers.
--
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Pkg-sdl-maintainers
mailing list