[vlc-devel] [PATCH 6/7] extras: export a build system compiler in the macOS script to fix nettle compilation with latest Xcode

naich64 david.fuhrmann at gmail.com
Mon Nov 30 12:33:43 CET 2020



> Am 30.11.2020 um 11:24 schrieb Marvin Scholz <epirat07 at gmail.com>:
> 
> 
> 
> On 30 Nov 2020, at 9:37, Felix Paul Kühne wrote:
> 
>> Hi David,
>> 
>> Thanks for the quick review!
>> 
>>> Am 30.11.2020 um 08:49 schrieb naich64 <david.fuhrmann at gmail.com>:
>>> 
>>> 
>>> 
>>>> Am 29.11.2020 um 20:12 schrieb Felix Paul Kühne <fkuehne at videolan.org>:
>>>> 
>>>> From: Felix Paul Kühne <felix at feepk.net>
>>>> 
>>>> ---
>>>> extras/package/macosx/build.sh | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
>>>> index 44b16ce59b..b121864a25 100755
>>>> --- a/extras/package/macosx/build.sh
>>>> +++ b/extras/package/macosx/build.sh
>>>> @@ -145,6 +145,7 @@ fi
>>>> export AR="`xcrun --find ar`"
>>>> export AS="`xcrun --find as`"
>>>> export CC="`xcrun --find clang`"
>>>> +export CC_FOR_BUILD="`xcrun --find clang` -Wno-error=implicit-function-declaration"
>>> 
>>> implicit-function-declaration sounds like a rather serious problem we should fix in the actual code, otherwise we might keep bugs here. So I would rather prefer to fix this one instance of nettle directly (maybe with a contrib patch).
>>> This line seems to be too broad and could hide other problems in different contribs as well.
>> 
>> I need to add a comment to the script here. CC_FOR_BUILD is used exclusively by nettle
> 
> This is not necessarily true.
> 
>> and also only to compile its own build system used to compile the resulting library. The warning needs to be silenced to work-around nettle’s broken configure detection for the system CC compiler. This compiler option is never applied on any code distributed with VLC.
> 
> I agree that it should not be set here. Even if it should, CC_FOR_BUILD is the wrong variable
> to set flags, as the name says it specifies the compiler, not additional options for it.
> 
> We had this mess in the past and I would rather not want to start a mess again here.
> 
> Can you send me the actual error you get when trying to cross compile nettle
> that is solved by this? It really should be worked around in the contrib itself
> not in some random wrapper script.

There seems to be a better fix already patched upstream (see attached patch).
With that, you should be able to drop the "-Wno-error=implicit-function-declaration“ part.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201130/8c61d031/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-contrib-nettle-fix-build-with-CC_FOR_BUILD-set-to-re.patch
Type: application/octet-stream
Size: 2137 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201130/8c61d031/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201130/8c61d031/attachment-0001.html>


More information about the vlc-devel mailing list