Both i386 and amd64 systems running NetBSD-7 fail with:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I.
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/memory/patcher
-I../../../../opal/include -I../../../../ompi/include
-I../../../../oshmem/include
-I../../../../opal/mca/hwloc/hwloc1112/hwloc/include/private/autogen
-I../../../../opal/mca/hwloc/hwloc1112/hwloc/include/hwloc/autogen
-I../../../../ompi/mpiext/cuda/c
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2
-I../../../..
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/orte/include
-I../../../../orte/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/ompi/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/oshmem/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/hwloc/hwloc1112/hwloc/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/BLD/opal/mca/hwloc/hwloc1112/hwloc/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/event/libevent2022/libevent
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/event/libevent2022/libevent/include
-I/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/BLD/opal/mca/event/libevent2022/libevent/include
-g -finline-functions -fno-strict-aliasing -pthread -MT
memory_patcher_component.lo -MD -MP -MF .deps/memory_patcher_component.Tpo
-c
/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/memory/patcher/memory_patcher_component.c
 -fPIC -DPIC -o .libs/memory_patcher_component.o
/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/memory/patcher/memory_patcher_component.c:
In function 'intercept_mremap':
/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/memory/patcher/memory_patcher_component.c:178:19:
error: 'MREMAP_FIXED' undeclared (first use in this function)
     if (!(flags & MREMAP_FIXED)) {
                   ^
/home/phargrov/OMPI/openmpi-2.0.0rc2-netbsd7-amd64/openmpi-2.0.0rc2/opal/mca/memory/patcher/memory_patcher_component.c:178:19:
note: each undeclared identifier is reported only once for each function it
appears in
*** Error code 1


NetBSD does have a mremap() function, but with different arguments than the
one under Linux (and using MAP_FIXED rather than MREMAP_FIXED).
That is why the "#if defined (SYS_mremap)" is evaluating TRUE.
So, I think one wants "#if defined (SYS_mremap) && defined (__linux__)" on
lines 163 and 409 of memory_patcher_component.c.

It would be possible (advisable?) to construct a NetBSD-specific intercept
for mremap(), but the curent Linux-specific one won't compile.
See: http://netbsd.gw.com/cgi-bin/man-cgi?mremap++NetBSD-current

-Paul

-- 
Paul H. Hargrove                          phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department               Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

Reply via email to