[PATCH] clients/nested: Fix compilation

Armin K. krejzi at email.com
Tue Jun 4 04:06:49 PDT 2013


On 06/04/2013 01:05 PM, Armin K wrote:
> ---
>   clients/Makefile.am | 2 +-
>   clients/nested.c    | 3 +++
>   configure.ac        | 1 +
>   3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/clients/Makefile.am b/clients/Makefile.am
> index 1379c4b..d84f575 100644
> --- a/clients/Makefile.am
> +++ b/clients/Makefile.am
> @@ -124,7 +124,7 @@ resizor_SOURCES = resizor.c
>   resizor_LDADD = libtoytoolkit.la
>
>   nested_SOURCES = nested.c
> -nested_LDADD = libtoytoolkit.la
> +nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
>
>   nested_client_SOURCES = nested-client.c
>   nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
> diff --git a/clients/nested.c b/clients/nested.c
> index baaff64..132724d 100644
> --- a/clients/nested.c
> +++ b/clients/nested.c
> @@ -34,8 +34,11 @@
>
>   #include <EGL/egl.h>
>   #include <EGL/eglext.h>
> +
> +#ifdef USE_CAIRO_GLESV2
>   #include <GLES2/gl2.h>
>   #include <GLES2/gl2ext.h>
> +#endif /* USE_CAIRO_GLESV2 */
>
>   #include <cairo-gl.h>
>
> diff --git a/configure.ac b/configure.ac
> index ba1fcac..98798c9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -227,6 +227,7 @@ if test x$enable_clients = xyes; then
>     AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
>
>     PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor])
> +  PKG_CHECK_MODULES(SERVER, [wayland-server])
>     PKG_CHECK_MODULES(WESTON_INFO, [wayland-client])
>
>     PKG_CHECK_MODULES(POPPLER, [poppler-glib glib-2.0 gobject-2.0 gio-2.0 ],
>

Just to clarify

First error:

   CC       nested.o
In file included from /usr/include/GL/gl.h:2085:0,
                  from /usr/include/GL/glx.h:32,
                  from /usr/include/cairo/cairo-gl.h:96,
                  from nested.c:40:
/usr/include/GL/glext.h:6152:19: error: conflicting types for ‘GLintptr’
  typedef ptrdiff_t GLintptr;
                    ^
In file included from nested.c:37:0:
/usr/include/GLES2/gl2.h:38:26: note: previous declaration of ‘GLintptr’ 
was here
  typedef khronos_intptr_t GLintptr;
                           ^
In file included from /usr/include/GL/gl.h:2085:0,
                  from /usr/include/GL/glx.h:32,
                  from /usr/include/cairo/cairo-gl.h:96,
                  from nested.c:40:
/usr/include/GL/glext.h:6153:19: error: conflicting types for ‘GLsizeiptr’
  typedef ptrdiff_t GLsizeiptr;
                    ^
In file included from nested.c:37:0:
/usr/include/GLES2/gl2.h:39:26: note: previous declaration of 
‘GLsizeiptr’ was here
  typedef khronos_ssize_t  GLsizeiptr;
                           ^
make[3]: *** [nested.o] Error 1

Second error:

   CCLD     nested
/usr/bin/ld: nested.o: undefined reference to symbol 'wl_event_loop_get_fd'
/usr/bin/ld: note: 'wl_event_loop_get_fd' is defined in DSO 
/home/armin/wayland/lib/libwayland-server.so.0 so try adding it to the 
linker command line
/home/armin/wayland/lib/libwayland-server.so.0: could not read symbols: 
Invalid operation



More information about the wayland-devel mailing list