[mpich-devel] [hwloc-devel] Build failure in OS X, libxml required?

Lisandro Dalcin dalcinl at gmail.com
Sat Mar 7 05:13:31 CST 2015


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.

* 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.




On 7 March 2015 at 00:24, Brice Goglin <Brice.Goglin at inria.fr> wrote:
> Hello,
>
> Sorry but we don't add configure checks without knowing what's causing
> the problem. So far it only looks like a broken libxml install.
>
> We cannot check for all broken installs in the world. Otherwise one day
> somebody will remove printf from his libc and request a new configure
> check for printf() as well. And another check in case he modified
> printf() to return different values. And another check in case printf()
> was renamed to pruntf(). Endless.
>
> Please try to understand what caused this broken/partial libxml install
> (do you have logs of the install?).
>
> By the way, let's make this new hwloc feature official: hwloc can now
> detect broken libxml installs by failing to build :)
>
> Brice
>
>
>
>
>
> Le 06/03/2015 21:14, Balaji, Pavan a écrit :
>> Hi,
>>
>> This is a problem with hwloc, which I had reported in the past.  I believe this is not fixed in hwloc yet.
>>
>> The suggestion given at that point was to remove and install libxml again, which I did, and things started working correctly again.  But, I agree, hwloc should detect this in configure and abort if there's an issue.
>>
>> I've cc'ed hwloc-devel.
>>
>>   -- Pavan
>>
>>> On Mar 6, 2015, at 2:10 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>>>
>>> This is with the 3.1.4 tarball. Not sure if this is actually a problem
>>> in MPICH or in my system.
>>>
>>> I got the following build failure. Shouldn't configure catch that beforehand?
>>>
>>> Making all in tools/topo/hwloc/hwloc
>>> Making all in src
>>>  CC       topology.lo
>>>  CC       traversal.lo
>>>  CC       distances.lo
>>>  CC       components.lo
>>>  CC       bind.lo
>>>  CC       bitmap.lo
>>>  CC       pci-common.lo
>>>  CC       diff.lo
>>>  CC       misc.lo
>>>  CC       base64.lo
>>>  CC       topology-noos.lo
>>>  CC       topology-synthetic.lo
>>>  CC       topology-custom.lo
>>>  CC       topology-xml.lo
>>>  CC       topology-xml-nolibxml.lo
>>>  CC       topology-xml-libxml.lo
>>>  CC       topology-darwin.lo
>>>  CC       topology-x86.lo
>>> topology-xml-libxml.c:17:10: fatal error: 'libxml/parser.h' file not found
>>> #include <libxml/parser.h>
>>>         ^
>>> 1 error generated.
>>> make[4]: *** [topology-xml-libxml.lo] Error 1
>>> make[4]: *** Waiting for unfinished jobs....
>>> make[3]: *** [all-recursive] Error 1
>>> make[2]: *** [all-recursive] Error 1
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all] Error 2
>>>
>>>
>>> --
>>> Lisandro Dalcin
>>> ============
>>> Research Scientist
>>> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
>>> Numerical Porous Media Center (NumPor)
>>> King Abdullah University of Science and Technology (KAUST)
>>> http://numpor.kaust.edu.sa/
>>>
>>> 4700 King Abdullah University of Science and Technology
>>> al-Khawarizmi Bldg (Bldg 1), Office # 4332
>>> Thuwal 23955-6900, Kingdom of Saudi Arabia
>>> http://www.kaust.edu.sa
>>>
>>> Office Phone: +966 12 808-0459
>>> _______________________________________________
>>> To manage subscription options or unsubscribe:
>>> https://lists.mpich.org/mailman/listinfo/devel
>> --
>> Pavan Balaji  ✉️
>> http://www.mcs.anl.gov/~balaji
>>
>> _______________________________________________
>> hwloc-devel mailing list
>> hwloc-devel at open-mpi.org
>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>> Link to this post: http://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4400.php
>



-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459


More information about the devel mailing list