Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [hwloc-devel] hwloc-1.7 issues
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2013-04-29 09:36:31


Le 29/04/2013 07:12, Brice Goglin a écrit :
> Le 29/04/2013 05:53, Pavan Balaji a écrit :
>> Hi all,
>>
>> We are seeing two errors with hwloc-1.7:
>>
>> 1. The hwloc embedded in mpich was failing to build on FreeBSD with a
>> strict build. I was able to reproduce the failure with hwloc-1.7 by
>> setting CFLAGS=-D_POSIX_SOURCE (the error shows up even with later
>> versions of POSIX enabled).
>>
>> topology.c: In function 'hwloc_fallback_nbprocessors':
>> topology.c:146: error: conflicting types for 'n'
>> topology.c:131: error: previous declaration of 'n' was here
> Hello,
>
> I fixed the above one

https://svn.open-mpi.org/trac/hwloc/changeset/5559

> but I am getting many other warnings and another
> error on FreeBSD 9.1:
>
> /usr/include/sys/sysctl.h:799: error: expected declaration specifiers or '...' before 'u_int'
> topology-freebsd.c: In function 'hwloc_freebsd_node_meminfo_info':
> topology-freebsd.c:173: warning: passing argument 2 of 'sysctl' makes pointer from integer without a cast
> topology-freebsd.c:173: warning: passing argument 5 of 'sysctl' makes integer from pointer without a cast
> topology-freebsd.c:173: error: too many arguments to function 'sysctl'
>
>
> I wonder if this CFLAGS=-D_POSIX_SOURCE is supported by FreeBSD headers.

I could not fix this. Google says that FreeBSD does not define u_int
when _POSIX_SOURCE, so the sysctl() prototype cannot be correct. I tend
to think you should remove _POSIX_SOURCE on this FreeBSD release.

>> 2. The second error shows up with hwloc in embedded mode. In hydra, we
>> setup hwloc in embedded mode using HWLOC_SETUP_CORE. autoreconf on this
>> fails as:
>>
>> tools/topo/hwloc/hwloc/src/Makefile.am:211: error: HWLOC_LTDL_INCLUDED
>> does not appear in AM_CONDITIONAL
>> autoreconf: automake failed with exit status: 1
>>
>> The problem seems to be that this conditional is defined in hwloc's
>> configure.ac directly instead of in the SETUP_CORE macro.
>>

This one is harder to fix.

Moving AM_CONDITIONAL to HWLOC_DO_AM_CONDITIONAL would fix "make". But
"make distclean" fails later because it enters src/libltdl which has not
been configured.

In the end, we need to have embedders call these lines even when plugins
are disabled:

LT_CONFIG_LTDL_DIR([src/libltdl])
LTDL_INIT([recursive convenience])
AC_CONFIG_FILES([src/libltdl/Makefile])
AM_CONDITIONAL([HWLOC_LTDL_INCLUDED], [test "x$with_included_ltdl" = xyes])

So we should move them to SETUP_CORE or a new SETUP_PLUGINS(yes/no). But
libtool warns that these should stay in the main configure.ac. Also I
need to check whether we need to move these lines too:

AM_ENABLE_SHARED
AM_DISABLE_STATIC
AM_PROG_LIBTOOL([dlopen win32-dll])
LT_LANG([C])

Some of these may want not to go in SETUP_FOO to avoid conflicts with
embedders configure.ac?

All this may be a good reason to switch to having libltdl run its own
configure recursevely instead of embedding it inside hwloc, things
should be more simple.

Brice