[vlc-devel] [PATCH] configure.ac: use absolute path for protoc

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 31 07:26:54 CEST 2020


On 2020-08-30 16:39, Alexandre Janniaux wrote:
> Hi,
> 
> Sure, like you explained before. :)
> 
> I was more expecting feedback regarding the configure.ac
> snippet currently in master adding the extra tools in the
> PATH, which was the root of my issues.
> 
> # configure.ac
> 
>      dnl Add extras/tools to the PATH
>      TOOLS_DIR="${srcdir}/extras/tools/build/bin"
>      AS_IF([test -d "${TOOLS_DIR}"], [
>          TOOLS_DIR=`cd "${TOOLS_DIR}" && pwd`
>          export PATH="${TOOLS_DIR}:$PATH"
>      ])

This path should be in all VLC builds, no matter what. I suppose all 
builds script add it automatically. So why would we need this ?
The tools also have to be found by contribs. So you're only fixing half 
of the problems.

And then there's the effect of export PATH in configure.ac. I bet it 
will only be use during the configure run, but as soon as you run make 
it's not in PATH anymore (you'd have to use ./compile to have it but 
that's not what we use).

> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Sun, Aug 30, 2020 at 04:21:23PM +0300, Rémi Denis-Courmont wrote:
>> Hi,
>>
>> The only way to hide the system protoc is to prepend the paths to custom one to all affected variables, notably PATH *and* pkg-config variables. Using the full path on the executable does not really fix the problem here.
>>
>> A more robust solution is to change the executable and package name, e.g. proto-$MAJOR but it requires patching.
>>
>> Le 30 août 2020 15:23:36 GMT+03:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
>>> Hi,
>>>
>>> Any feedback regarding this? Should it be done differently?
>>>
>>> Regards,
>>> --
>>> Alexandre Janniaux
>>> Videolabs
>>>
>>> On Mon, Jul 13, 2020 at 05:27:37PM +0200, Alexandre Janniaux wrote:
>>>> Hi,
>>>>
>>>> It works this way since Sat Oct 11 13:35:10 2014 +0000
>>>>
>>>> # configure.ac
>>>>
>>>>      dnl Add extras/tools to the PATH
>>>>      TOOLS_DIR="${srcdir}/extras/tools/build/bin"
>>>>      AS_IF([test -d "${TOOLS_DIR}"], [
>>>>          TOOLS_DIR=`cd "${TOOLS_DIR}" && pwd`
>>>>          export PATH="${TOOLS_DIR}:$PATH"
>>>>      ])
>>>>
>>>> But I don't think it's an unwanted effect and it's probably
>>>> what everybody doing cross compilation want. or else we need
>>>> to put extras/tools in an different search path than PATH in
>>>> configure.
>>>>
>>>> Regards,
>>>> --
>>>> Alexandre Janniaux
>>>> Videolabs
>>>>
>>>> On Mon, Jul 13, 2020 at 06:17:10PM +0300, Rémi Denis-Courmont wrote:
>>>>> Le maanantaina 13. heinäkuuta 2020, 18.08.54 EEST Alexandre
>>> Janniaux a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> Actually the workaround has been in the calling code (in
>>>>>> the extras/package build script for apple) which
>>>>>> systematically added the extras/tools in the PATH.
>>>>>>
>>>>>> Without this workaround, the configure script returns:
>>>>>>
>>>>>>      configure:55687: checking for protoc
>>>>>>      configure:55703: found
>>>>>>
>>> /home/alexandre/workspace/videolabs/vlc-meson/extras/tools/build/bin/protoc
>>>>>> configure:55714: result: protoc
>>>>>>
>>>>>> And right after, make returns:
>>>>>>
>>>>>>      /bin/bash: protoc: command not found
>>>>>>      Makefile:31476: recipe for target
>>>>>> 'stream_out/chromecast/cast_channel.pb.h' failed
>>>>>
>>>>> Then the PATH is messed up somewhere.
>>>>>
>>>>> That makes no difference relative to this patch: build tools are
>>> detected with
>>>>> AC_CHECK_* not AC_PATH_*.
>>>>>
>>>>> --
>>>>> Rémi Denis-Courmont
>>>>> 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
>>> _______________________________________________
>>> 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