[Piglit] [PATCHv2 2/2] cmake: Link test utils with "-ldl"

Emil Velikov emil.l.velikov at gmail.com
Tue Aug 30 15:33:20 UTC 2016


On 30 August 2016 at 15:17, Jussi Kukkonen <jussi.kukkonen at intel.com> wrote:
> Without this linking CXX executables (e.g. fbo-blit-stretch) fails
> with gold linker:
>
> | libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
> | libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
> | libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
> ---
>
> Changes since v1:
> * Use ${CMAKE_DL_LIBS} as Emil suggested
>
> I'm adding the linker flag for all utils although I'm only seeing
> the problem with libpiglitutil_gl.so -- I'm assuming it's because
> the issue seems to only show with g++ and maybe the other
> libs don't currently have tests that need g++?
>
Strictly speaking you'll only need the DL link for the dispatch
library/ies, but piglit has a few bugs. The one that applies there is
that every 'secondary' library exposes it's own symbols alongside the
symbols of its dependencies. The latter of which pulls the
dependencies of the original library into the 'secondary' one.

But that and similar fun stuff is out of the topic, so I won't bore
you with the details.

Fwiw this and 1/2 are
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Do you have commit access or should I push these for you ?
Emil


More information about the Piglit mailing list