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

Alexandre Janniaux ajanni at videolabs.io
Mon Aug 31 10:26:26 CEST 2020


Hi,

Thank you for feedback :)

On Mon, Aug 31, 2020 at 07:26:54AM +0200, Steve Lhomme wrote:
> 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.

I agree, but it doesn't solve the main issue directly here.
I bet this has been added because you don't necessarily need
contribs on Linux but you might need some extras/tools
because of the high requirements we have.

IMHO the main issue can be solved by either one of the points:
 - remove this from configure.ac
 - store absolute path to extras/tool or usual path
 - always have extras/tools in Makefile's PATH too

> 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).

Indeed, that's exactly the issue I'm reporting!

Basically `mycontainercommand make -C build` fails half the
time because of this, and using the build script recall the
configure step.

Regards,
--
Alexandre Janniaux
Videolabs

> > 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
> >
> _______________________________________________
> 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