Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] Problem with hwloc/myriexpress.h
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-02-03 09:46:29


Jeff Squyres, le Thu 03 Feb 2011 15:37:36 +0100, a écrit :
> Since we're generating include/hwloc/config.h (i.e., the publicly-includable config.h file that is included by include/hwloc.h), automake is adding -I$(top_builddir)/include/hwloc.

Urgl...

> 1. We can use Automake's "nostdinc" flag to suppress this add-the-dash-I behavior.
> PRO: extra -I goes away
> CON: we have to manually add a -I for other AC_CONFIG_HEADERS
Not really an issue.

> CON: doesn't solve the issue for embedding (*** this is a deal breaker)

Indeed :/

> 2. Rename myriexpress.h
> PRO: avoids the problem
> CON: breaks legacy apps who include "hwloc/myriexpress.h"
> CON: doesn't solve the real problem

Yes, we have all sorts of such names: cuda.h, cpuset.h, rename.h, ...

> 3. Move hwloc's public config.h in a new directory by itself (e.g., include/hwloc/config/config.h)
> PRO: works around the AM behavior
> PRO: fixes the issue for hwloc and for embedding
> PRO: avoids any other name potential conflicts with include/hwloc/*.h
> CON: kludgey -- leaves a bitter taste in your mouth

I usually spit the bitter taste by saying "bah, autostuff kludge, don't ask..."

In principle there'd be also applications including hwloc/config.h
themselves, but I doubt people actually ever did that.

> 4. Don't use AC_CONFIG_HEADER (i.e., use sed+friends to generate include/hwloc/config.h ourselves)
> PRO: avoids the problem
> PRO: fixes the issue for hwloc and for embedding
> PRO: avoids any other name potential conflicts with include/hwloc/*.h
> CON: I don't want to code that up :-)

I don't either :)

Samuel