Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] -lpthread in LIBS and REQUIRES?
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-08-04 11:07:19

On Aug 4, 2011, at 10:57 AM, Brice Goglin wrote:

> While playing with static hwloc libraries and binaries [1], I had to
> manually add -lpthread to LIBS to get the fully-static binaries to link
> properly. We use some pthread functions, so is there a good reason not
> to put -lpthread in LIBS? (and HWLOC_REQUIRES?)

Where do we use the pthread functions -- in the libhwloc core, or just in the utils?

If in the core:
- add AC_CHECK_FUNC for pthread_create (or whatever) in the main m4
- fail configure if AC_CHECK_FUNC fails
- add -lpthread to LIBS

If in the utils:
- add AC_CHECK_FUNC for pthread_create in the utils setup m4
- might want to fail configure if it fails (because the utils clearly can't be built)
- add -lpthread in the relevant's -- it shouldn't be added to the overall LIBS

Jeff Squyres
For corporate legal information go to: