Re: potential bug while compiling the Windows version of NAMD

From: David Hardy (dhardy_at_ks.uiuc.edu)
Date: Wed Mar 31 2021 - 14:53:04 CDT

Hi Osvalds,

I emailed the Charm++ developers about your issue. Their response:

This is an issue in hwloc, which for some reason here is trying to use the POSIX sysconf function. This is likely due to a misconfiguration in the build environment or something like that, hwloc's configure should pick the right thing to use here. To note, sysconf should be usable with Cygwin on Windows, but not with native Windows or MinGW builds.

Hope this helps,
Dave

> On Mar 25, 2021, at 12:37 PM, Osvalds Verners <osvalds.verners_at_REMOVE_yahoo.com> wrote:
>
> Dear Sir/Madam,
>
> I would like to report an error which occurred while compiling the NAMD_2.14_Win64-multicore version using the following command:
>
> ./build charm++ multicore-win64 gcc --with-production
>
> ---
>
> In file included from bind.c:11:
> bind.c: In function ‘cmi_hwloc_alloc_heap’:
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:29: warning: implicit declaration of function ‘sysconf’; did you mean ‘siscanf’? [-Wimplicit-function-declaration]
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:29: note: in definition of macro ‘hwloc_getpagesize’
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:37: error: ‘_SC_PAGE_SIZE’ undeclared (first use in this function); did you mean ‘USN_PAGE_SIZE’?
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~~~~~~~
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:37: note: in definition of macro ‘hwloc_getpagesize’
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~~~~~~~
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:37: note: each undeclared identifier is reported only once for each function it appears in
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~~~~~~~
> /NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/include/private/private.h:282:37: note: in definition of macro ‘hwloc_getpagesize’
> 282 | #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE)
> | ^~~~~~~~~~~~~
> make[2]: *** [Makefile:721: bind.lo] Error 1
> make[2]: Leaving directory '/NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc/src'
> make[1]: *** [Makefile:418: all-recursive] Error 1
> make[1]: Leaving directory '/NAMD_2.14_Source/charm-6.10.2/multicore-win64-gcc/tmp/hwloc'
> make: *** [Makefile:565: hwloc-target] Error 2
>
> ---
>
> Since I have not changed any source file, it could be considered as a potential bug (did not find in the known bugs list though).
>
> Best regards,
>
> Osvalds Verners

This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:11 CST