[vlc-devel] [PATCH 3.0.x] contrib/sdl: fix #25006

"zhilizhao(赵志立)" quinkblack at foxmail.com
Sat Nov 14 15:30:35 CET 2020



> On Nov 14, 2020, at 10:06 PM, Marvin Scholz <epirat07 at gmail.com> wrote:
> 
> Hi, thanks for the patch.
> 
> I don't think we should patch it to work though,
> as far as I can see the sdl-related modules are not actually
> enabled for releases.
> 
> The SDL version is worryingly old (latest SDL 2 does not has this issue)
> and more importantly, SDL image too.
> 
> I think it should be removed but we probably can't do that in a stable
> branch, so given its not used in releases I would be fine with just
> having SDL and SDL_image disabled by default for Darwin.

OK, I didn’t notice sdl_image module is disabled. Disable contrib/sdl
and SDL_image in macOS’s build script works for me. Send a new
patch.

> 
> On 14 Nov 2020, at 12:22, Alexandre Janniaux wrote:
> 
>> Hi,
>> 
>> Isn't it a private symbol? It's declared as .private_extern
>> as far as I read apple code.
>> 
>> If I remember what I've been told on this code, SDL uses
>> private API to be compatible with very early OSX version but
>> I'm not sure we want to fix its symbol loading at other
>> location than upstream. I'll probably let Marvin accepts or
>> rejects the patch though.
>> 
>> Regards,
>> --
>> Alexandre Janniaux
>> Videolabs
>> 
>> On Sat, Nov 14, 2020 at 06:44:48PM +0800, Zhao Zhili wrote:
>>> error: implicit declaration of function '_dyld_func_lookup' is invalid
>>> in C99 [-Werror,-Wimplicit-function-declaration]
>>> ---
>>> contrib/src/sdl/missing_dyld_func_lookup.diff | 10 ++++++++++
>>> contrib/src/sdl/rules.mak                     |  1 +
>>> 2 files changed, 11 insertions(+)
>>> create mode 100644 contrib/src/sdl/missing_dyld_func_lookup.diff
>>> 
>>> diff --git a/contrib/src/sdl/missing_dyld_func_lookup.diff b/contrib/src/sdl/missing_dyld_func_lookup.diff
>>> new file mode 100644
>>> index 0000000000..a80d0572ad
>>> --- /dev/null
>>> +++ b/contrib/src/sdl/missing_dyld_func_lookup.diff
>>> @@ -0,0 +1,10 @@
>>> +--- sdl/src/loadso/macosx/SDL_dlcompat.c.orig	2020-11-14 15:56:59.000000000 +0800
>>> ++++ sdl/src/loadso/macosx/SDL_dlcompat.c	2020-11-14 15:58:25.000000000 +0800
>>> +@@ -161,6 +161,7 @@ static void * SDL_OSX_dlsym(void * dl_re
>>> + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
>>> + #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
>>> + #endif
>>> ++extern int _dyld_func_lookup(const char* dyld_func_name, void **address);
>>> + /* These symbols will be looked for in dyld */
>>> + static const struct mach_header *(*dyld_NSAddImage) (const char *, unsigned long) = 0;
>>> + static int (*dyld_NSIsSymbolNameDefinedInImage) (const struct mach_header *, const char *) = 0;
>>> diff --git a/contrib/src/sdl/rules.mak b/contrib/src/sdl/rules.mak
>>> index 4b16cc90f3..ca7020ff49 100644
>>> --- a/contrib/src/sdl/rules.mak
>>> +++ b/contrib/src/sdl/rules.mak
>>> @@ -16,6 +16,7 @@ $(TARBALLS)/SDL-$(SDL_VERSION).tar.gz:
>>> sdl: SDL-$(SDL_VERSION).tar.gz .sum-sdl
>>> 	$(UNPACK)
>>> 	$(APPLY) $(SRC)/sdl/direct_palette_ref.diff
>>> +	$(APPLY) $(SRC)/sdl/missing_dyld_func_lookup.diff
>>> 	$(UPDATE_AUTOCONFIG)
>>> 	$(MOVE)
>>> 	mv sdl/config.sub sdl/config.guess sdl/build-scripts
>>> --
>>> 2.28.0
>>> 
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list