mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] glew: link against libX11
@ 2013-03-31 19:11 Robert Schwebel
  2013-04-02  8:47 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Schwebel @ 2013-03-31 19:11 UTC (permalink / raw)
  To: ptxdist

src/visualinfo.c and src/glewinfo.c call XDestroyWindow, so we need to link against libX11.
Otherwhise this breaks down with

/opt/OSELAS.Toolchain-2012.12.0/arm-1136jfs-linux-gnueabi/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-1136jfs-linux-gnueabi/4.7.2/../../../../arm-1136jfs-linux-gnueabi/bin/ld: src/glewinfo.o: undefined reference to symbol 'XDestroyWindow'

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
Changes in v2:
- get -lX11 via pkg-config (reported by Alexander Aring <alex.aring@gmail.com>)

 rules/glew.make |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/glew.make b/rules/glew.make
index 08acaff..955cbdd 100644
--- a/rules/glew.make
+++ b/rules/glew.make
@@ -41,7 +41,7 @@ GLEW_MAKE_OPT	:= \
 	LD=$(CROSS_CC) \
 	CFLAGS.EXTRA='$(CROSS_CPPFLAGS) $(CROSS_CFLAGS)' \
 	LDFLAGS.EXTRA='$(CROSS_LDFLAGS)' \
-	LDFLAGS.GL='`$(CROSS_ENV) eval PATH=$(CROSS_PATH) $$PKG_CONFIG --libs glu`' \
+	LDFLAGS.GL='`$(CROSS_ENV) eval PATH=$(CROSS_PATH) $$PKG_CONFIG --libs glu x11`' \
 	GLEW_DEST=$(GLEW_PKGDIR)/usr \
 	LIBDIR=$(GLEW_PKGDIR)/usr/lib \
 	M_ARCH=$(PTXCONF_ARCH_STRING)
-- 
1.7.10.4

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH v2] glew: link against libX11
  2013-03-31 19:11 [ptxdist] [PATCH v2] glew: link against libX11 Robert Schwebel
@ 2013-04-02  8:47 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2013-04-02  8:47 UTC (permalink / raw)
  To: ptxdist

On Sun, Mar 31, 2013 at 09:11:28PM +0200, Robert Schwebel wrote:
> src/visualinfo.c and src/glewinfo.c call XDestroyWindow, so we need to link against libX11.
> Otherwhise this breaks down with
> 
> /opt/OSELAS.Toolchain-2012.12.0/arm-1136jfs-linux-gnueabi/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-1136jfs-linux-gnueabi/4.7.2/../../../../arm-1136jfs-linux-gnueabi/bin/ld: src/glewinfo.o: undefined reference to symbol 'XDestroyWindow'

Hmm, I'm not seeing it. The problem is definitely there, and it will fail
with a newer toolchain, but with a different error.

> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
> Changes in v2:
> - get -lX11 via pkg-config (reported by Alexander Aring <alex.aring@gmail.com>)
> 
>  rules/glew.make |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/glew.make b/rules/glew.make
> index 08acaff..955cbdd 100644
> --- a/rules/glew.make
> +++ b/rules/glew.make
> @@ -41,7 +41,7 @@ GLEW_MAKE_OPT	:= \
>  	LD=$(CROSS_CC) \
>  	CFLAGS.EXTRA='$(CROSS_CPPFLAGS) $(CROSS_CFLAGS)' \
>  	LDFLAGS.EXTRA='$(CROSS_LDFLAGS)' \
> -	LDFLAGS.GL='`$(CROSS_ENV) eval PATH=$(CROSS_PATH) $$PKG_CONFIG --libs glu`' \
> +	LDFLAGS.GL='`$(CROSS_ENV) eval PATH=$(CROSS_PATH) $$PKG_CONFIG --libs glu x11`' \

This is wrong. libX11 is only needed by the tools not libglew itself. We
should not build the tools and drop the dependency for libX11 instead.

Michael

>  	GLEW_DEST=$(GLEW_PKGDIR)/usr \
>  	LIBDIR=$(GLEW_PKGDIR)/usr/lib \
>  	M_ARCH=$(PTXCONF_ARCH_STRING)
> -- 
> 1.7.10.4
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-02  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-31 19:11 [ptxdist] [PATCH v2] glew: link against libX11 Robert Schwebel
2013-04-02  8:47 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox