Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross-compiling for QNX fails due to nodesize_dbg #84

Closed
asobhy-qnx opened this issue Jul 30, 2020 · 0 comments · Fixed by #85
Closed

cross-compiling for QNX fails due to nodesize_dbg #84

asobhy-qnx opened this issue Jul 30, 2020 · 0 comments · Fixed by #85

Comments

@asobhy-qnx
Copy link
Contributor

asobhy-qnx commented Jul 30, 2020

When building for QNX nodesize_dbg needs to execute on target and generate container_node_sizes_impl.hpp. Unfortunately the solution provided using the emulator in PR #60 does not work for QNX. A solution needs to be implemented in order to generate this file manually and provide it during build time.

After running nodesize_dbg on QNX on x86_64 and aarch64 and as well as comparing the output with one generated on a x86_64 linux, I have found that the generated header file is exactly the same across linux and QNX.

A conclusion was made by generating the file natively on the host by adding the following condition to

which allows the header file to be generated on the host platform as long as it is running linux. The file generated on windows was different so if the host is running a windows OS then this method is not going to work.

elseif(QNX) execute_process(COMMAND g++ -DVERSION="${FOONATHAN_MEMORY_VERSION_MAJOR}.${FOONATHAN_MEMORY_VERSION_MINOR}.${FOONATHAN_MEMORY_VERSION_PATCH}" -o ${PROJECT_SOURCE_DIR}/tool/nodesize_dbg ${PROJECT_SOURCE_DIR}/tool/node_size_debugger.cpp ) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/container_node_sizes_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/tool/nodesize_dbg --code ${CMAKE_CURRENT_BINARY_DIR}/container_node_sizes_impl.hpp)

This was referenced Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant