[vlc-devel] [3.0 PATCH v2 09/20] tools: cmake: fix building CURL in older OS X

Marvin Scholz epirat07 at gmail.com
Thu Apr 2 15:02:40 CEST 2020



On 2 Apr 2020, at 14:35, Hugo Beauzée-Luyssen wrote:

> Hi,
>
> On Thu, Apr 2, 2020, at 1:38 PM, Steve Lhomme wrote:
>> Avoid this issue in the built-in CURL:
>>
>> Undefined symbols for architecture x86_64:
>>   "_SSLCopyALPNProtocols", referenced from:
>>       _sectransp_connect_step2 in libcmcurl.a(sectransp.c.o)
>>   "_SSLSetALPNProtocols", referenced from:
>>       _sectransp_connect_common in libcmcurl.a(sectransp.c.o)
>> ld: symbol(s) not found for architecture x86_64
>> ---
>>  extras/tools/cmake-oldmac.patch | 20 ++++++++++++++++++++
>>  extras/tools/tools.mak          |  1 +
>>  2 files changed, 21 insertions(+)
>>  create mode 100644 extras/tools/cmake-oldmac.patch
>>
>> diff --git a/extras/tools/cmake-oldmac.patch
>> b/extras/tools/cmake-oldmac.patch
>> new file mode 100644
>> index 00000000000..231a9051586
>> --- /dev/null
>> +++ b/extras/tools/cmake-oldmac.patch
>> @@ -0,0 +1,20 @@
>> +--- cmake/Utilities/cmcurl/lib/vtls/sectransp.c.oldmac	2020-03-20
>> 11:26:14.000000000 +0100
>> ++++ cmake/Utilities/cmcurl/lib/vtls/sectransp.c	2020-04-01
>> 09:41:13.005951700 +0200
>> +@@ -1576,7 +1576,7 @@ static CURLcode sectransp_connect_step1(
>> +   }
>> + #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
>> +
>> +-#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) &&
>> HAVE_BUILTIN_AVAILABLE == 1
>> ++#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) &&
>> HAVE_BUILTIN_AVAILABLE == 1 && 0
>
> Shouldn't the first CURL_BUILD_MAC_xxx be updated to match the version 
> on which the functions are available?

This looks wrong, I am not sure what they are trying to do there even… 
(But maybe they just choose unfortunate
names for the defines so that they make no sense)

Whats needed to fix this correctly is probably the same I do for VLC, 
which is allow these two symbols to
be undefined at link-time, if they anyway always check for them at 
runtime.

You can probably just always disable this and change it to #if 0 to make 
it clear this is a
workaround, if you dont want to do the other fix.

> Though I doubt that any of our contribs are using cmake to download 
> stuff anyway, but a cleaner patch could be upstreamed
>
> -- 
>   Hugo Beauzée-Luyssen
>   hugo at beauzee.fr
> _______________________________________________
> 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