<div dir="ltr"><div><div><div>This breaks make install for me as well.<br><br></div>Does this patch make sense for XvMC since by default it gets installed to '${libdir}' (while VDPAU goes to '${libdir}/vdpau' by default)? Should there be a check to make sure ${dest_dir} isn't ${libdir}?<br><br></div>Thanks,<br></div>-Damien<br></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 5, 2017 at 3:11 PM Andy Furniss <<a href="mailto:adf.lists@gmail.com">adf.lists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Emil Velikov wrote:<br class="gmail_msg">
> Some drivers do not support certain targets - for example nouveau<br class="gmail_msg">
> doesn't do VAAPI, while freedreno doesn't do of the video backends.<br class="gmail_msg">
><br class="gmail_msg">
> As such if we enter vdpau when building freedreno/ilo/etc, a vdpau/<br class="gmail_msg">
> folder will be created, empty library will be build and almost<br class="gmail_msg">
> immediately removed. Thus keeping an empty vdpau/ folder around.<br class="gmail_msg">
><br class="gmail_msg">
> There are two ways to fix this.<br class="gmail_msg">
><br class="gmail_msg">
>  * add substantial tracking in configure/makefiles so that we never end<br class="gmail_msg">
> up in targets/vdpau<br class="gmail_msg">
>  Downsides:<br class="gmail_msg">
> Error prone, as the configure checks and the 'include<br class="gmail_msg">
> gallium/drivers/foo/Automake.inc' can easily get out of sync.<br class="gmail_msg">
><br class="gmail_msg">
>  * remove the folder, if empty, alongside the empty library.<br class="gmail_msg">
>  Downsides:<br class="gmail_msg">
> In the latter case vdpau/ might be empty before the mesa build has<br class="gmail_msg">
> started, yet we'll remove it either way.<br class="gmail_msg">
><br class="gmail_msg">
> This patch implements the latter option, as the downside isn't that<br class="gmail_msg">
> significant, plus the patch is way shorter ;-)<br class="gmail_msg">
><br class="gmail_msg">
> v2: use has_drivers to track since TARGET_DRIVERS can contain space,<br class="gmail_msg">
> hence neither string comparison nor -n/-z works correctly.<br class="gmail_msg">
<br class="gmail_msg">
This breaks make install on my setup.<br class="gmail_msg">
<br class="gmail_msg">
  ./autogen.sh --prefix=/usr --sysconfdir=/etc --enable-texture-float<br class="gmail_msg">
--enable-opencl --enable-omx --with-egl-platforms=x11,drm<br class="gmail_msg">
--with-gallium-drivers=radeonsi,swrast --enable-gbm<br class="gmail_msg">
--enable-shared-glapi --enable-glx-tls --with-dri-drivers= && make -j5<br class="gmail_msg">
<br class="gmail_msg">
....<br class="gmail_msg">
<br class="gmail_msg">
make install<br class="gmail_msg">
<br class="gmail_msg">
....<br class="gmail_msg">
<br class="gmail_msg">
Making install in state_trackers/xvmc<br class="gmail_msg">
make[4]: Entering directory<br class="gmail_msg">
'/mnt/sdb1/Gits/mesa/src/gallium/state_trackers/xvmc'<br class="gmail_msg">
make[5]: Entering directory<br class="gmail_msg">
'/mnt/sdb1/Gits/mesa/src/gallium/state_trackers/xvmc'<br class="gmail_msg">
make[5]: Nothing to be done for 'install-exec-am'.<br class="gmail_msg">
make[5]: Nothing to be done for 'install-data-am'.<br class="gmail_msg">
make[5]: Leaving directory<br class="gmail_msg">
'/mnt/sdb1/Gits/mesa/src/gallium/state_trackers/xvmc'<br class="gmail_msg">
make[4]: Leaving directory<br class="gmail_msg">
'/mnt/sdb1/Gits/mesa/src/gallium/state_trackers/xvmc'<br class="gmail_msg">
Making install in targets/xvmc<br class="gmail_msg">
make[4]: Entering directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
make[5]: Entering directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
make[5]: Nothing to be done for 'install-exec-am'.<br class="gmail_msg">
  /bin/mkdir -p '/usr/lib'<br class="gmail_msg">
  /bin/sh ../../../../libtool   --mode=install /usr/bin/install -c<br class="gmail_msg">
libXvMCgallium.la '/usr/lib'<br class="gmail_msg">
libtool: install: /usr/bin/install -c .libs/libXvMCgallium.so.1.0.0<br class="gmail_msg">
/usr/lib/libXvMCgallium.so.1.0.0<br class="gmail_msg">
libtool: install: (cd /usr/lib && { ln -s -f libXvMCgallium.so.1.0.0<br class="gmail_msg">
libXvMCgallium.so.1 || { rm -f libXvMCgallium.so.1 && ln -s<br class="gmail_msg">
libXvMCgallium.so.1.0.0 libXvMCgallium.so.1; }; })<br class="gmail_msg">
libtool: install: (cd /usr/lib && { ln -s -f libXvMCgallium.so.1.0.0<br class="gmail_msg">
libXvMCgallium.so || { rm -f libXvMCgallium.so && ln -s<br class="gmail_msg">
libXvMCgallium.so.1.0.0 libXvMCgallium.so; }; })<br class="gmail_msg">
libtool: install: /usr/bin/install -c .libs/libXvMCgallium.lai<br class="gmail_msg">
/usr/lib/libXvMCgallium.la<br class="gmail_msg">
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n<br class="gmail_msg">
/usr/lib<br class="gmail_msg">
----------------------------------------------------------------------<br class="gmail_msg">
Libraries have been installed in:<br class="gmail_msg">
    /usr/lib<br class="gmail_msg">
<br class="gmail_msg">
If you ever happen to want to link against installed libraries<br class="gmail_msg">
in a given directory, LIBDIR, you must either use libtool, and<br class="gmail_msg">
specify the full pathname of the library, or use the '-LLIBDIR'<br class="gmail_msg">
flag during linking and do at least one of the following:<br class="gmail_msg">
    - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable<br class="gmail_msg">
      during execution<br class="gmail_msg">
    - add LIBDIR to the 'LD_RUN_PATH' environment variable<br class="gmail_msg">
      during linking<br class="gmail_msg">
    - use the '-Wl,-rpath -Wl,LIBDIR' linker flag<br class="gmail_msg">
    - have your system administrator add LIBDIR to '/etc/ld.so.conf'<br class="gmail_msg">
<br class="gmail_msg">
See any operating system documentation about shared libraries for<br class="gmail_msg">
more information, such as the ld(1) and ld.so(8) manual pages.<br class="gmail_msg">
----------------------------------------------------------------------<br class="gmail_msg">
make  install-data-hook<br class="gmail_msg">
make[6]: Entering directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
   GEN      install-data-hook<br class="gmail_msg">
/bin/sh: line 16: test: -eq: unary operator expected<br class="gmail_msg">
rm: cannot remove ‘//usr/lib’: Directory not empty<br class="gmail_msg">
Makefile:1059: recipe for target 'install-data-hook' failed<br class="gmail_msg">
make[6]: *** [install-data-hook] Error 1<br class="gmail_msg">
make[6]: Leaving directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
Makefile:987: recipe for target 'install-data-am' failed<br class="gmail_msg">
make[5]: *** [install-data-am] Error 2<br class="gmail_msg">
make[5]: Leaving directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
Makefile:939: recipe for target 'install-am' failed<br class="gmail_msg">
make[4]: *** [install-am] Error 2<br class="gmail_msg">
make[4]: Leaving directory '/mnt/sdb1/Gits/mesa/src/gallium/targets/xvmc'<br class="gmail_msg">
Makefile:600: recipe for target 'install-recursive' failed<br class="gmail_msg">
make[3]: *** [install-recursive] Error 1<br class="gmail_msg">
make[3]: Leaving directory '/mnt/sdb1/Gits/mesa/src/gallium'<br class="gmail_msg">
Makefile:856: recipe for target 'install-recursive' failed<br class="gmail_msg">
make[2]: *** [install-recursive] Error 1<br class="gmail_msg">
make[2]: Leaving directory '/mnt/sdb1/Gits/mesa/src'<br class="gmail_msg">
Makefile:1013: recipe for target 'install' failed<br class="gmail_msg">
make[1]: *** [install] Error 2<br class="gmail_msg">
make[1]: Leaving directory '/mnt/sdb1/Gits/mesa/src'<br class="gmail_msg">
Makefile:644: recipe for target 'install-recursive' failed<br class="gmail_msg">
make: *** [install-recursive] Error 1<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
mesa-dev mailing list<br class="gmail_msg">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="gmail_msg" target="_blank">mesa-dev@lists.freedesktop.org</a><br class="gmail_msg">
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br class="gmail_msg">
</blockquote></div>