Quoting Eric Engestrom (2018-10-05 05:19:34)
> Fixes the build for
> $ meson -D dri-drivers=[] -D gallium-drivers=[] -D build-tests=true
> 
> Compiling all this unused code isn't an actual problem, until you also
> try to build the tests, at which point you get this:
> 
>   [213/705] Linking target src/mapi/glapi/glapi_static_check_table.
>   FAILED: src/mapi/glapi/glapi_static_check_table
>   ccache c++  -o src/mapi/glapi/glapi_static_check_table 
> 'src/mapi/glapi/src@mapi@glapi@@glapi_static_check_table@exe/tests_check_table.cpp.o'
>  -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group 
> src/mapi/glapi/libglapi_static.a src/gtest/libgtest.a -Wl,--end-group 
> -pthread '-Wl,-rpath,$ORIGIN/:$ORIGIN/../../gtest' 
> -Wl,-rpath-link,/tmp/tmp.qyVZB5kQIB/mesa/build/src/mapi/glapi:/tmp/tmp.qyVZB5kQIB/mesa/build/src/gtest
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8810): 
> undefined reference to `gl_dispatch_stub_343'
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8828): 
> undefined reference to `gl_dispatch_stub_343'
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8840): 
> undefined reference to `gl_dispatch_stub_344'
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8858): 
> undefined reference to `gl_dispatch_stub_344'
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8870): 
> undefined reference to `gl_dispatch_stub_345'
>   /usr/bin/ld: 
> src/mapi/glapi/libglapi_static.a(glapi_getproc.c.o):(.data.rel.ro+0x8888): 
> undefined reference to `gl_dispatch_stub_345'
>   collect2: error: ld returned 1 exit status
>   ninja: build stopped: subcommand failed.
> 
> Signed-off-by: Eric Engestrom <eric.engest...@intel.com>
> ---
>  src/meson.build | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

This really looks like the static-glapi tests are broken again. 

> diff --git a/src/meson.build b/src/meson.build
> index 89ffaddf47b7286e4fe0..bde0e2aaca07931d3097 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -51,7 +51,9 @@ idep_git_sha1 = declare_dependency(
>  
>  subdir('gtest')
>  subdir('util')
> -subdir('mapi')
> +if with_gles1 or with_gles2 or with_shared_glapi

We need to mapi for non-shared glapi opengl as well.

> +  subdir('mapi')
> +endif
>  # TODO: opengl
>  subdir('compiler')
>  subdir('egl/wayland/wayland-drm')
> @@ -65,7 +67,9 @@ endif
>  if with_dri_i965 or with_intel_vk
>    subdir('intel')
>  endif
> -subdir('mesa')
> +if with_opengl or with_gles1 or with_gles2 or with_shared_glapi
> +  subdir('mesa')
> +endif
>  subdir('loader')
>  if with_platform_haiku
>    subdir('hgl')
> -- 
> Cheers,
>   Eric
> 

This makes me really nervous. There are a bunch of things (including libmesa_*,
and all of mapi) that are controlled by build_by_default = false, and are built
only when a top level target pulls them in. I did this specifically to avoid
having long complicated conditionals around whether to traverse into a subdir
like autotools does. I did put guards on the tests because that was easier, and
it's not going to break an end user's system if a test is or isn't built.

Dylan

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to