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
> I fixed the above one
> 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
In the end, we need to have embedders call these lines even when plugins
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:
Some of these may want not to go in SETUP_FOO to avoid conflicts with
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.