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