I'm trying to build boost 1.71 for a platform which doesn't have mmap
/munmap
(Nintendo Switch with devkitPro toolchain). The build fails because there is no <sys/mman.h>
file.
How do I configure boost to disable memory-mapped IO? I have checked boost/config/user.hpp
but there seems to be no relevant options in there.
For Header-Only Use:
Make sure
BOOST_CONTEXT_USE_MAP_STACK
is not definedavoid including
context/posix/protected_fixedsize_stack.hpp
. (header guardBOOST_CONTEXT_PROTECTED_FIXEDSIZE_H
)avoid including
coroutine/posix/protected_stack_allocator.hpp
. (header guardBOOST_COROUTINES_PROTECTED_STACK_ALLOCATOR_H
)BOOST_SPIRIT_FILEITERATOR_POSIX
is not defined if you use Spirit ClassicDon't use Boost Interprocess shared memory/mapped files.
interprocess/anonymous_shared_memory.hpp
,interprocess/shared_memory_object.hpp
,interprocess/mapped_region.hpp
)For Library Compilation
The list is going to include all the above and anything that transitively depends on them.
The following direct dependencies can be tweaked though:
LACKS_SYS_MMAN_H
already so no issue thereiostreams/src/mapped_file.cpp
is a problem, so you can't build the Iostreams library (simply exclude it). If you need the rest, you can follow their guide to include specific source files for specific parts of the library implementation