Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 2023 19:01:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 274087] devel/libva: fix build with lld 17
Message-ID:  <bug-274087-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274087

            Bug ID: 274087
           Summary: devel/libva: fix build with lld 17
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: dim@FreeBSD.org

When building libva with lld >=3D 17, an error similar to the following is
emitted when linking libva.so:

  ld: error: va/libva.so.2.2000.0.p/va_compat.c.o: symbol
  vaCreateSurfaces@VA_API_0.32.0 has undefined version VA_API_0.32.0

The root cause is that lld 17 checks linker version scripts more strictly by
default, and emits an error when undefined symbols or undefined versions are
referenced.

Earlier in the build, it turns out that due to these lld errors, va's
meson.build fails to detect --version-script support:

  Checking if "-Wl,--version-script" : links: NO

This is because the small test program used by meson to check whether a sha=
red
library can be linked with the libva.syms version script is completely empt=
y,
and therefore the two symbols in the version script, vaCreateSurfaces_0_32_0
and vaCreateSurfaces, are undefined.

Fix the problem by providing placeholder definitions for these symbols in t=
he
code argument to meson's cc.links() function. This ensures that meson corre=
ctly
detects --version-script support with lld version 17 or later, and makes it
possible to link the libva shared library.

NOTE: also submitted upstream as https://github.com/intel/libva/pull/758

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274087-7788>