foonathan/memory

cross-compiling for qnx 32 bit

briansoe66 opened this issue · 2 comments

When cross-compiling for QNX 32-bit target, using a Linux 64-bit host, the container_node_sizes_impl.hpp is incorrect. See attached files. For example:

template <>
struct map_node_size<1>
: std::integral_constant<std::size_t, 0>
{};

template <>
struct map_node_size<2>
: std::integral_constant<std::size_t, 0>
{};

template <>
struct map_node_size<4>
: std::integral_constant<std::size_t, 0>
{};

However, running the tool/node_size_debugger to generate container_node_sizes_impl.hpp generated a working header. Probably it's uncommon to cross-compile for 32-bit systems, but maybe someone will find this helpful to know.

I am using 0.7-2, which I believe uses the solution from this PR: #129

container_node_sizes_impl_qnx_32.zip

@matt-cross Can you take a look?

Can you provide more details on how to recreate your cross compilation environment? Where do you get the QNX cross compilers, what target architecture are you compiling for, what toolchain file are you using and/or what environment variables are you passing to CMake?

On a quick search I could not find an easy way to set up a cross-compilation environment without purchasing a QNX license; they don't seem to have a license option for open source developers. Is there an option for open source developers to get a QNX license to support open source projects on QNX?

Another way we could debug is if you can run the cmake configure step with -D_DEBUG_GET_CONTAINER_NODE_SIZES=ON on the cmake command line, that will add some debug information from the logic that detects container sizes. If you can run that and report the full cmake output here that might help.