Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to update latest version #762

Open
xeleven11 opened this issue Oct 18, 2023 · 6 comments
Open

unable to update latest version #762

xeleven11 opened this issue Oct 18, 2023 · 6 comments

Comments

@xeleven11
Copy link

Ubuntu 22.04 8700k 1080Ti

Vainfo was working fine untile I decided to update using autogen and there are duplicate files of libva in /usr/lib/x86_64-linux-gnu/. Files are linked and I have no idea how to overwrite or use LD_LIBRARY_PATH. Currently running vainfo looks like this:
vainfo: symbol lookup error: /lib/x86_64-linux-gnu/libva-x11.so.2: undefined symbol: va_fool_postp

@Galvo87
Copy link

Galvo87 commented Nov 2, 2023

I have the same issue, never happened with previous libva versions... any hints please?

@dvrogozh
Copy link
Contributor

dvrogozh commented Nov 2, 2023

Which version you are trying to build? which sha or tag?
Which configuration command line you use?
What's the output from configuration? especially last part where configuration prints out which backends were configured?

Currently running vainfo looks like this:
vainfo: symbol lookup error: /lib/x86_64-linux-gnu/libva-x11.so.2: undefined symbol: va_fool_postp

This sound like you did not rebuild all backends, specifically - x11. Check file time stamps with something like ls -al /lib/x86_64-linux-gnu/libva*. One change which comes into my mind was with x11 when DRI2 support was added. It now requires libx11-xcb-dev libxcb-dri3-dev to be additionally installed. Overall, check with ci which packages are installed on your system - https://github.com/intel/libva/blob/master/.github/workflows/ubuntu.yml#L28

@Galvo87
Copy link

Galvo87 commented Nov 2, 2023

Which version you are trying to build? which sha or tag? Which configuration command line you use? What's the output from configuration? especially last part where configuration prints out which backends were configured?

Currently running vainfo looks like this:
vainfo: symbol lookup error: /lib/x86_64-linux-gnu/libva-x11.so.2: undefined symbol: va_fool_postp

This sound like you did not rebuild all backends, specifically - x11. Check file time stamps with something like ls -al /lib/x86_64-linux-gnu/libva*. One change which comes into my mind was with x11 when DRI2 support was added. It now requires libx11-xcb-dev libxcb-dri3-dev to be additionally installed. Overall, check with ci which packages are installed on your system - https://github.com/intel/libva/blob/master/.github/workflows/ubuntu.yml#L28

libx11-xcb-dev and libxcb-dri3-dev are installed.
I am using latest master branch. I configured both with autogen and meson...

./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal -I m4 ${ACLOCAL_FLAGS}
autoreconf: running: /usr/bin/autoconf
configure.ac:127: warning: The macro AC_HELP_STRING' is obsolete. configure.ac:127: You should run autoupdate. ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... ./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from... configure.ac:127: the top level configure.ac:132: warning: The macro AC_HELP_STRING' is obsolete.
configure.ac:132: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
configure.ac:132: the top level
configure.ac:137: warning: The macro AC_HELP_STRING' is obsolete. configure.ac:137: You should run autoupdate. ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... ./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from... configure.ac:137: the top level configure.ac:142: warning: The macro AC_HELP_STRING' is obsolete.
configure.ac:142: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
configure.ac:142: the top level
configure.ac:147: warning: The macro AC_HELP_STRING' is obsolete. configure.ac:147: You should run autoupdate. ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... ./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from... configure.ac:147: the top level configure.ac:152: warning: The macro AC_HELP_STRING' is obsolete.
configure.ac:152: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1553: AC_ARG_WITH is expanded from...
configure.ac:152: the top level
configure.ac:167: warning: The macro AC_HELP_STRING' is obsolete. configure.ac:167: You should run autoupdate. ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... ./lib/autoconf/general.m4:1553: AC_ARG_WITH is expanded from... configure.ac:167: the top level configure.ac:176: warning: The macro AC_PROG_LIBTOOL' is obsolete.
configure.ac:176: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:176: the top level
configure.ac:183: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:183: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:183: the top level
configure.ac:340: warning: AC_OUTPUT should be used without arguments.
configure.ac:340: You should run autoupdate.
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:176: installing './compile'
configure.ac:176: installing './config.guess'
configure.ac:176: installing './config.sub'
configure.ac:93: installing './install-sh'
configure.ac:93: installing './missing'
va/Makefile.am: installing './depcomp'
va/wayland/Makefile.am:30: warning: source file '../drm/va_drm_utils.c' is in a subdirectory,
va/wayland/Makefile.am:30: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least one source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However, this
automake: behavior may change in a future Automake major version, with object
automake: files being placed in the same subdirectory as the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
va/x11/Makefile.am:30: warning: source file '../drm/va_drm_utils.c' is in a subdirectory,
va/x11/Makefile.am:30: but option 'subdir-objects' is disabled
autoreconf: Leaving directory '.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for secure_getenv... yes
checking for library containing dlopen... none required
checking whether gcc accepts -fstack-protector-strong... yes
checking for libdrm >= 2.4.60... yes
checking for x11 xext xfixes x11-xcb xcb xcb-dri3... no
checking for wayland-client >= 1.11.0... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating pkgconfig/Makefile
config.status: creating pkgconfig/libva-drm.pc
config.status: creating pkgconfig/libva-glx.pc
config.status: creating pkgconfig/libva-wayland.pc
config.status: creating pkgconfig/libva-x11.pc
config.status: creating pkgconfig/libva.pc
config.status: creating va/Makefile
config.status: creating va/drm/Makefile
config.status: creating va/glx/Makefile
config.status: creating va/va_version.h
config.status: creating va/wayland/Makefile
config.status: creating va/x11/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

libva - 2.21.0.pre1 (VA-API 1.21.0)

Installation prefix .............. : /usr
Default driver path .............. : /usr/lib/x86_64-linux-gnu/dri
Extra window systems ............. : drm
Build with legacy ................ : emgd,nvctrl,fglrx
Build documentation .............. : no

Now type 'make' to compile libva.

I see some complains about x11*, any hints?

@dvrogozh
Copy link
Contributor

dvrogozh commented Nov 2, 2023

checking for x11 xext xfixes x11-xcb xcb xcb-dri3... no
checking for wayland-client >= 1.11.0... no
Extra window systems ............. : drm

So, yes, as I thought - you rebuilt only subset of targets (libva and libva-drm) and other targets (libva-x11, libva-wayland and I think egl) were not rebuilt due to missing dependencies. Please, try to run apt-get matching ci, i.e. https://github.com/intel/libva/blob/master/.github/workflows/ubuntu.yml#L28:

        sudo apt-get update
        sudo apt-get install -y \
          libdrm-dev \
          libegl1-mesa-dev \
          libgl1-mesa-dev \
          libx11-dev \
          libx11-xcb-dev \
          libxcb-dri3-dev \
          libxext-dev \
          libxfixes-dev \
          libwayland-dev

Then clean up libva repository to wipe out previous configuration state and reconfigure. If you will see x11 and wayland in extra windows systems, try to rebuild and run again:

git clean -ffdx
./configure ....
or
meson setup ....

@Galvo87
Copy link

Galvo87 commented Nov 6, 2023

Thank you, at least I got vainfo to work in drm:

sudo vainfo now returns:
Trying display: wayland
error: XDG_RUNTIME_DIR not set in the environment.
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0.1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.4.1 (94a4f8d16)
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSliceLP
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointEncSliceLP
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointEncSliceLP
VAProfileVP9Profile3 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointEncSliceLP
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileHEVCMain422_10 : VAEntrypointVLD
VAProfileHEVCMain422_10 : VAEntrypointEncSliceLP
VAProfileHEVCMain422_12 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_10 : VAEntrypointVLD
VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_12 : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointEncSliceLP
VAProfileHEVCSccMain10 : VAEntrypointVLD
VAProfileHEVCSccMain10 : VAEntrypointEncSliceLP
VAProfileHEVCSccMain444 : VAEntrypointVLD
VAProfileHEVCSccMain444 : VAEntrypointEncSliceLP
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointEncSliceLP
VAProfileHEVCSccMain444_10 : VAEntrypointVLD
VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP

but if I try to convert using FFmpeg av1_qsv I still get:

[av1_qsv @ 0x55f8968fb500] Failed to create a VAAPI device.
[vost#0:0/av1_qsv @ 0x55f896ecd380] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Generic error in an external library
[out#0/matroska @ 0x55f896bddbc0] Nothing was written into output file, because at least one of its streams received no packets.

I still have to understand what "Generic error in an external library" is, could it be a libva issue in your opinion?

@dvrogozh
Copy link
Contributor

dvrogozh commented Nov 6, 2023

If you have fixed build issue and see x11 and 'wayland' in the list of backends built with libva, then next level of triage would be to check permissions for you user. Which would be to execute these commands:

$ ls -al /dev/dri/
total 0
drwxr-xr-x   2 root root        80 Aug 29 13:12 .
drwxr-xr-x  19 root root      4480 Aug 29 13:12 ..
crw-rw----+  1 root video 226,   0 Oct 27 08:07 card0
crw-rw----+  1 root video 226, 128 Oct 27 08:07 renderD128
$ groups
dvrogozh wheel video docker

Key point is that your user must have access to the card0 and renderD128 devices. First command gives you which group owns each device (for me that's 'video', for modern Ubuntu that will be 'video' and 'render'), and second command shows in which groups your user account is. If your user is not in the groups which own devices, add it (below is example for Ubuntu, you might need to adjust depending on actual group ownership):

sudo usermod -aG video $(whoami)
sudo usermod -aG render $(whoami)

NOTE: you must exit and start a new shell for this change to take effect. Do explicitly check change running groups command in a new shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants