Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Samuel Thibault
Jeff Squyres (jsquyres), le Fri 01 Nov 2013 18:03:55 +0100, a écrit :
> On Nov 1, 2013, at 11:54 AM, Samuel Thibault  wrote:
> 
> > We could avoid Xutil.h and keysym.h by disabling the case KeyPress part,
> > but I'd rather not: people will wonder why they don't have keyboard
> > shortcut, and finding out from ./configure output will not be easy.
> > When one has Xlib.h, having Xutil.h and keysym.h is not really far
> > anyway.
> 
> 
> Ok -- so you're saying we *require* all 3, right?

With the current source code, yes.

Samuel


Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Brice Goglin
Le 01/11/2013 16:01, Jeff Squyres (jsquyres) a écrit :
> Ah; I missed that because we have the X11 checking stuff done in hwloc.m4 
> already -- I thought the ones in the Cairo were actually redundant.
>
> It looks like this logic isn't quite correct, anyway -- the X11 checks are 
> embedded in the Cairo and GL sections.  Should they moved out to be 
> independent of Cairo and GL (and therefore only once, and include the 
> AC_DEFINE for HWLOC_HAVE_X11)?
>

Autoconf should be able to cache the result of duplicate checks. So
unless it really hurts, I don't care much.

I do care however about the GL code being annoying to test. So please
don't make me test multiple patchs :)

Also, is libnvctrl available on Mac? Do you have a NVIDIA GPU to test
the GL backend?

Brice



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
On Nov 1, 2013, at 11:54 AM, Samuel Thibault  wrote:

> We could avoid Xutil.h and keysym.h by disabling the case KeyPress part,
> but I'd rather not: people will wonder why they don't have keyboard
> shortcut, and finding out from ./configure output will not be easy.
> When one has Xlib.h, having Xutil.h and keysym.h is not really far
> anyway.


Ok -- so you're saying we *require* all 3, right?

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Samuel Thibault
Jeff Squyres (jsquyres), le Fri 01 Nov 2013 16:33:41 +0100, a écrit :
> There's some funny m4 logic in the CHECK_HEADERS for X11.  Let me make sure I 
> understand the intent:
> 
> - X11/Xlib.h: this file is required for X11 support
> - X11/Xutil.h X11/keysym.h: these files are optional for X11 support (i.e., 
> we can still build X11 support without them, but if we have them, there's 
> extra X11 goodies that can be used)
> 
> Is that correct?  Or do we *require* all 3 header files for X11 support?

We could avoid Xutil.h and keysym.h by disabling the case KeyPress part,
but I'd rather not: people will wonder why they don't have keyboard
shortcut, and finding out from ./configure output will not be easy.
When one has Xlib.h, having Xutil.h and keysym.h is not really far
anyway.

Samuel


Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
There's some funny m4 logic in the CHECK_HEADERS for X11.  Let me make sure I 
understand the intent:

- X11/Xlib.h: this file is required for X11 support
- X11/Xutil.h X11/keysym.h: these files are optional for X11 support (i.e., we 
can still build X11 support without them, but if we have them, there's extra 
X11 goodies that can be used)

Is that correct?  Or do we *require* all 3 header files for X11 support?



On Nov 1, 2013, at 11:20 AM, "Jeff Squyres (jsquyres)"  
wrote:

> Ya -- working on a new patch, too.
> 
> 
> On Nov 1, 2013, at 11:10 AM, Brice Goglin  wrote:
> 
>> Can you first find out which header and library contains XOpenDisplay()
>> on your Mac?
>> 
>> Brice
>> 
>> 
>> 
>> Le 01/11/2013 16:01, Jeff Squyres (jsquyres) a écrit :
>>> Ah; I missed that because we have the X11 checking stuff done in hwloc.m4 
>>> already -- I thought the ones in the Cairo were actually redundant.
>>> 
>>> It looks like this logic isn't quite correct, anyway -- the X11 checks are 
>>> embedded in the Cairo and GL sections.  Should they moved out to be 
>>> independent of Cairo and GL (and therefore only once, and include the 
>>> AC_DEFINE for HWLOC_HAVE_X11)?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Nov 1, 2013, at 10:53 AM, Samuel Thibault  
>>> wrote:
>>> 
 Jeff Squyres (jsquyres), le Fri 01 Nov 2013 15:12:31 +0100, a écrit :
> Cool.  Does the following patch look ok?  If so, I'll commit to master 
> and v1.7:
 Err, no, we really need to have HWLOC_HAVE_X11 defined when X11 is
 available, otherwise we won't get the graphical lstopo.
 
 Samuel
 ___
 hwloc-devel mailing list
 hwloc-de...@open-mpi.org
 http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>>> 
>> 
>> ___
>> hwloc-devel mailing list
>> hwloc-de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
> 
> 
> -- 
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to: 
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> ___
> hwloc-devel mailing list
> hwloc-de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
Ya -- working on a new patch, too.


On Nov 1, 2013, at 11:10 AM, Brice Goglin  wrote:

> Can you first find out which header and library contains XOpenDisplay()
> on your Mac?
> 
> Brice
> 
> 
> 
> Le 01/11/2013 16:01, Jeff Squyres (jsquyres) a écrit :
>> Ah; I missed that because we have the X11 checking stuff done in hwloc.m4 
>> already -- I thought the ones in the Cairo were actually redundant.
>> 
>> It looks like this logic isn't quite correct, anyway -- the X11 checks are 
>> embedded in the Cairo and GL sections.  Should they moved out to be 
>> independent of Cairo and GL (and therefore only once, and include the 
>> AC_DEFINE for HWLOC_HAVE_X11)?
>> 
>> 
>> 
>> 
>> 
>> On Nov 1, 2013, at 10:53 AM, Samuel Thibault  
>> wrote:
>> 
>>> Jeff Squyres (jsquyres), le Fri 01 Nov 2013 15:12:31 +0100, a écrit :
 Cool.  Does the following patch look ok?  If so, I'll commit to master and 
 v1.7:
>>> Err, no, we really need to have HWLOC_HAVE_X11 defined when X11 is
>>> available, otherwise we won't get the graphical lstopo.
>>> 
>>> Samuel
>>> ___
>>> hwloc-devel mailing list
>>> hwloc-de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>> 
> 
> ___
> hwloc-devel mailing list
> hwloc-de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Brice Goglin
Can you first find out which header and library contains XOpenDisplay()
on your Mac?

Brice



Le 01/11/2013 16:01, Jeff Squyres (jsquyres) a écrit :
> Ah; I missed that because we have the X11 checking stuff done in hwloc.m4 
> already -- I thought the ones in the Cairo were actually redundant.
>
> It looks like this logic isn't quite correct, anyway -- the X11 checks are 
> embedded in the Cairo and GL sections.  Should they moved out to be 
> independent of Cairo and GL (and therefore only once, and include the 
> AC_DEFINE for HWLOC_HAVE_X11)?
>
>
>
>
>
> On Nov 1, 2013, at 10:53 AM, Samuel Thibault  wrote:
>
>> Jeff Squyres (jsquyres), le Fri 01 Nov 2013 15:12:31 +0100, a écrit :
>>> Cool.  Does the following patch look ok?  If so, I'll commit to master and 
>>> v1.7:
>> Err, no, we really need to have HWLOC_HAVE_X11 defined when X11 is
>> available, otherwise we won't get the graphical lstopo.
>>
>> Samuel
>> ___
>> hwloc-devel mailing list
>> hwloc-de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Samuel Thibault
Jeff Squyres (jsquyres), le Fri 01 Nov 2013 16:01:41 +0100, a écrit :
> It looks like this logic isn't quite correct, anyway -- the X11 checks are 
> embedded in the Cairo and GL sections.  Should they moved out to be 
> independent of Cairo and GL (and therefore only once, and include the 
> AC_DEFINE for HWLOC_HAVE_X11)?

Probably, yes.

Samuel


Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
Ah; I missed that because we have the X11 checking stuff done in hwloc.m4 
already -- I thought the ones in the Cairo were actually redundant.

It looks like this logic isn't quite correct, anyway -- the X11 checks are 
embedded in the Cairo and GL sections.  Should they moved out to be independent 
of Cairo and GL (and therefore only once, and include the AC_DEFINE for 
HWLOC_HAVE_X11)?





On Nov 1, 2013, at 10:53 AM, Samuel Thibault  wrote:

> Jeff Squyres (jsquyres), le Fri 01 Nov 2013 15:12:31 +0100, a écrit :
>> Cool.  Does the following patch look ok?  If so, I'll commit to master and 
>> v1.7:
> 
> Err, no, we really need to have HWLOC_HAVE_X11 defined when X11 is
> available, otherwise we won't get the graphical lstopo.
> 
> Samuel
> ___
> hwloc-devel mailing list
> hwloc-de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Samuel Thibault
Jeff Squyres (jsquyres), le Fri 01 Nov 2013 15:12:31 +0100, a écrit :
> Cool.  Does the following patch look ok?  If so, I'll commit to master and 
> v1.7:

Err, no, we really need to have HWLOC_HAVE_X11 defined when X11 is
available, otherwise we won't get the graphical lstopo.

Samuel


Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
Cool.  Does the following patch look ok?  If so, I'll commit to master and v1.7:

diff --git a/config/hwloc_internal.m4 b/config/hwloc_internal.m4
index b0ac041..bfc3f36 100644
--- a/config/hwloc_internal.m4
+++ b/config/hwloc_internal.m4
@@ -255,31 +255,6 @@ EOF
   HWLOC_PKG_CHECK_MODULES([CAIRO], [cairo], [cairo_fill],
   [hwloc_cairo_happy=yes],
   [hwloc_cairo_happy=no])
-  if test "x$hwloc_cairo_happy" = "xyes"; then
-AC_PATH_XTRA
-   CFLAGS_save=$CFLAGS
-   LIBS_save=$LIBS
-
-   CFLAGS="$CFLAGS $X_CFLAGS"
-   LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
-AC_CHECK_HEADERS([X11/Xlib.h], [
-  AC_CHECK_HEADERS([X11/Xutil.h X11/keysym.h], [
-AC_CHECK_LIB([X11], [XOpenDisplay], [
-  enable_X11=yes
-  AC_SUBST([HWLOC_X11_LIBS], ["-lX11"])
-  AC_DEFINE([HWLOC_HAVE_X11], [1], [Define to 1 if X11 libraries ar
-])]
-  )],,
-  [[#include ]]
-)
-if test "x$enable_X11" != "xyes"; then
-  AC_MSG_WARN([X11 headers not found, Cairo/X11 back-end disabled])
-  hwloc_cairo_happy=no
-fi
-
-   CFLAGS=$CFLAGS_save
-   LIBS=$LIBS_save
-  fi
 fi
 
 if test "x$hwloc_cairo_happy" = "xyes"; then



On Nov 1, 2013, at 10:07 AM, Samuel Thibault  wrote:

> Hello,
> 
> Jeff Squyres (jsquyres), le Fri 01 Nov 2013 14:59:03 +0100, a écrit :
>> I notice that we have an explicit dependency between Cairo and X11 in 
>> configure:
>> 
>> Is there any reason for this?
> 
> I think if there was any it's now gone.
> 
>> Indeed, I manually disabled this extra check in configure, and I can still 
>> seem to use Cairo in lstopo (e.g., generate PDFs and PNGs).
> 
> So the source code is already fine with it, good!
> 
>> Are there some platforms where linking Cairo depends on X11?
> 
> Possibly, but I believe it is hidden, or at least all handled by
> pkg-config, and so we don't care. Of course we need X11 for our x11
> backend (which also happens to be using cairo).
> 
> Samuel
> ___
> hwloc-devel mailing list
> hwloc-de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Samuel Thibault
Hello,

Jeff Squyres (jsquyres), le Fri 01 Nov 2013 14:59:03 +0100, a écrit :
> I notice that we have an explicit dependency between Cairo and X11 in 
> configure:
> 
> Is there any reason for this?

I think if there was any it's now gone.

> Indeed, I manually disabled this extra check in configure, and I can still 
> seem to use Cairo in lstopo (e.g., generate PDFs and PNGs).

So the source code is already fine with it, good!

> Are there some platforms where linking Cairo depends on X11?

Possibly, but I believe it is hidden, or at least all handled by
pkg-config, and so we don't care. Of course we need X11 for our x11
backend (which also happens to be using cairo).

Samuel


[hwloc-devel] Relationship between Cario and X11

2013-11-01 Thread Jeff Squyres (jsquyres)
I notice that we have an explicit dependency between Cairo and X11 in configure:

-
if test "x$enable_X11" != "xyes"; then
  AC_MSG_WARN([X11 headers not found, Cairo/X11 back-end disabled])
  hwloc_cairo_happy=no
fi
-

Is there any reason for this?

I ask because my Mac (Lion) has Cairo installed via MacPorts, but it doesn't 
find XOpenDisplay in -lX11, and so it disables X11 support (which is fine), but 
that also disables Cairo support (which is a bummer).

Indeed, I manually disabled this extra check in configure, and I can still seem 
to use Cairo in lstopo (e.g., generate PDFs and PNGs).

Are there some platforms where linking Cairo depends on X11?  If so, is there a 
way we can discover that in configure?  (because Cairo doesn't seem to need X11 
on OS X for just outputting PDFs and PNGs)

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/