Le 07/03/2015 12:13, Lisandro Dalcin a écrit :
> OK, I finally figured out what's going on.
>
> I recently upgraded to Mac OS X Yosemite, and I did not install the
> Xcode command line tools. My /usr/include directory was missing,
> however I had /usr/bin/clang (not sure wether it is there because of
> the default Xcode install, or it was a leftover of my previous OS X
> system). I also had pkg-config installed trough Homebrew, and
> "pkg-config --cflags libxml-2.0" prints "-I/usr/include/libxml2",
> however remember I did not have "/usr/include". Do this pkg-config
> install is assuming /usr/include do exist.
>
> The thing is that MPICH is able to build fine (and in fact, many other
> software packages) as long as you pass --disable-libxml2 to workaround
> the hwloc issue. But after spending some time looking at hwloc build
> system, I realized the dependence on pkg-config to look for libxml2,
> and then there is no easy workaround.
>
> Finally, I've installed the Xcode command line tools (with
> "xcode-select --install") and MPICH + embed hwloc built just fine. Now
> I had the cmd line tools in my system, but it makes sense anyway,
> after all I use it everyday for development and the lack of it will
> likely cause me headaches in the near future with some other software.
>
> Some final comment for hwloc folks:
>
> * Relying in pkg-config for building is totally fine, but please note
> this tool is non-standard in OS X.

It's also not always available on Linux either. I got annoyed several
times in the past when scrolling up many pages of configure before I
found a small 'cannot check without pkg-config'. So upstream hwloc will
issue a warning when pkg-config is missing in next releases at the end
of configure (hwloc embedders will need a small change to do the same).

> * Looking in config/hwloc_pkg.m4, I noticed you somehow do check for
> broken stuff by attempting to link with package libraries. Well, if
> would be nice to extend this macro to also check you are able to
> compile by #include'ing package headers. IMHO, such sanity checks save
> time in the long run for both developer and users. Sorry I do not
> offer a patch, I have very limited knowledge of autotools and M4.

That would be a reasonable idea. pkg-config doesn't tell us which
headers come with a package, so we may have to modify hwloc_pkg.m4
(which is already slightly modified from the official pkg.m4) to add one
header argument to the m4 macro. I'll see what I can do.

Thanks for looking into this !

Brice

Reply via email to