[vlc-devel] [PATCH 2/2] thread: fix compilation with clang 7 or older
Thomas Guillem
thomas at gllm.fr
Thu Feb 27 10:56:55 CET 2020
cf. https://git.videolan.org/?p=vlc.git;a=blob;f=NEWS;h=9521d1ef424f3e47ada6e06cd3dfe63c47852d8d;hb=HEAD
VLC 4.0 need to support GCC 5.0 or Clang 3.4
So I guess, we should merge this patch anyway.
On Tue, Feb 25, 2020, at 12:13, Marvin Scholz wrote:
> Of course I would be fine with dropping support for old Clang
> versions too, instead of this workaround.
>
> If we decide to go that route we should add a configure check
> though, so that when using a too old version there is a helpful
> error instead of just the build at some point failing.
>
> On 25 Feb 2020, at 11:44, Rémi Denis-Courmont wrote:
>
> > Hi,
> >
> > Ubuntu LTS originally uses Clang 6 as default. But it has backports of
> > 7, 8 and 9 in the official repos.
> >
> > Le 25 février 2020 11:51:23 GMT+02:00, Thomas Guillem
> > <thomas at gllm.fr> a écrit :
> >>
> >>
> >> On Tue, Feb 25, 2020, at 10:33, Alexandre Janniaux wrote:
> >>> Hi,
> >>>
> >>> The main issue with requiring earlier version of Clang is
> >>> that it needs to be shipped in android NDK release too.
> >>>
> >>> Currently it seems to be failing with android NDK 18 (which
> >>> is previous VLC 3 NDK version) but is ok with NDK 21 (which
> >>> is LTS and the current version on VLC 4 and latest VLC 3).
> >>>
> >>> Is it planned to drop support of NDK 18? (or done?).
> >>
> >> Yes, VLC 4.0 is NDK 21 only. It is building now with NDK 18 but we
> >> shouldn't do anything to keep supporting it.
> >>
> >> So my question: is the clang issue only happening on NDK 18 ? If so,
> >> I
> >> would tend to agree with Rémi.
> >>
> >> What other OS/distrib are still using clang 7 ?
> >>
> >>>
> >>>> Especially not old bugs from a compiler that will be already 3
> >> major releases behind by the time VLC 4.0 comes out, while on the
> >> other
> >> hand C++ devs are craving to use C++17 and we require bleeding edge
> >> version of some other build tools (Meson requirement is so new that
> >> you
> >> can't build contribs on current Ubuntu LTS).
> >>>
> >>> I don't think toolchains and buildsystems are comparable
> >>> with regards to version update. You can be stuck on old
> >>> compilers but still be able to use bleeding edge build
> >>> systems. The case of android is typically one of them.
> >>>
> >>> Regards,
> >>> --
> >>> Alexandre Janniaux
> >>> Videolabs
> >>>
> >>> On Tue, Feb 25, 2020 at 11:06:20AM +0200, Rémi Denis-Courmont
> >>> wrote:
> >>>> Hi,
> >>>>
> >>>> I don't think it makes sense in general to try to work around
> >> compiler bugs.
> >>>>
> >>>> Especially not old bugs from a compiler that will be already 3
> >> major releases behind by the time VLC 4.0 comes out, while on the
> >> other
> >> hand C++ devs are craving to use C++17 and we require bleeding edge
> >> version of some other build tools (Meson requirement is so new that
> >> you
> >> can't build contribs on current Ubuntu LTS).
> >>>>
> >>>> Le 25 février 2020 10:24:33 GMT+02:00, Thomas Guillem
> >> <thomas at gllm.fr> a écrit :
> >>>>>
> >>>>>
> >>>>> On Tue, Feb 25, 2020, at 08:34, Rémi Denis-Courmont wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> Clang 7 supports what you call C17. It even has a compiler flag
> >> for
> >>>>> it explicitly. That's all in the LLVM and Clang documentation.
> >>>>>>
> >>>>>> Ergo it works or your compiler is buggy.
> >>>>>
> >>>>> I think that is what ePirat said, clang 7 has the bug.
> >>>>>
> >>>>> Could it be possible to enable this cast on a ifdef clang < 7 ?
> >>>>>
> >>>>> That way, we can easily remove later when we drop clang 7 support.
> >>>>>
> >>>>>>
> >>>>>> Le 25 février 2020 08:36:39 GMT+02:00, Marvin Scholz
> >>>>> <epirat07 at gmail.com> a écrit :
> >>>>>>> On 25 Feb 2020, at 6:56, Rémi Denis-Courmont wrote:
> >>>>>>>
> >>>>>>>> Le maanantaina 24. helmikuuta 2020, 17.45.07 EET Marvin Scholz
> >> a
> >>>>>>>> écrit :
> >>>>>>>>> even though it never modifies it.
> >>>>>>>>> Clang versions 7 or older did implement this quite strictly
> >> and
> >>>>>>>>> therefore errors when compiling this code:
> >>>>>>>> That's either a bug in that compiler version or possibly a
> >> minor
> >>>>>>>> update not
> >>>>>>>> installed, or mistaken compiler flag (in other words,
> >> configure
> >>>>> script
> >>>>>>>> bug).
> >>>>>>>> Clang 7 officially supports C17/C18.
> >>>>>>>
> >>>>>>> I tested all major versions before 7 and all are affected.
> >>>>>>> I can’t easily test minor versions between 7 or 8 as they are
> >> not
> >>>>>>> available
> >>>>>>> on godbolt. Looking at the git repository though it seems the
> >> first
> >>>>>>> fixed
> >>>>>>> version was 8.0.0.
> >>>>>>>
> >>>>>>> Not sure what you mean by mistaken compiler flag here?
> >>>>>>>
> >>>>>>>>
> >>>>>>>> And to call it C17 is a bit of a stretch. It's really just an
> >>>>>>>> re-edition of
> >>>>>>>> C11 with editorial corrections gathered. The atomic spelling
> >> error
> >>>>> was
> >>>>>>>> already
> >>>>>>>> found and corrected in 2014.
> >>>>>>>
> >>>>>>> It’s called C17 on open-std.org, thats why I used that here,
> >> not
> >>>>> sure
> >>>>>>> what else to
> >>>>>>> call it.
> >>>>>>>
> >>>>>>>> --
> >>>>>>>> Реми Дёни-Курмон
> >>>>>>>> http://www.remlab.net/ 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
> >>>>>>
> >>>>>> --
> >>>>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> >>>>> excuser ma brièveté.
> >>>>>> _______________________________________________
> >>>>>> vlc-devel mailing list
> >>>>>> To unsubscribe or modify your subscription options:
> >>>>>> https://mailman.videolan.org/listinfo/vlc-devel
> >>>>
> >>>> --
> >>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> >> excuser ma brièveté.
> >>>
> >>>> _______________________________________________
> >>>> 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
> >
> > --
> > Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> > excuser ma brièveté._______________________________________________
> > 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