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

Compiling dependency foonathan_memory for QNX [6215] #666

Closed
briansoe66 opened this issue Aug 12, 2019 · 8 comments
Closed

Compiling dependency foonathan_memory for QNX [6215] #666

briansoe66 opened this issue Aug 12, 2019 · 8 comments

Comments

@briansoe66
Copy link

I am trying to build Fast-RTPS for QNX. I am able to build Fast-CDR and Fast-RTPS, but I cannot build foonathan_memory. mutex and experimental/memory_resource are not found. Has anyone been able to build foonathan_memory for QNX (7.0.0), and could share how?

I've attached my qnx toolchain and cmake error log.

cmake_toolchain_and_error_log.zip

cmake -DCMAKE_TOOLCHAIN_FILE=../qnx-tool-chain.cmake -DCMAKE_INSTALL_PREFIX=../../install -DCMAKE_BUILD_TYPE=Release -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF ..

@briansoe66
Copy link
Author

briansoe66 commented Aug 13, 2019

I believe the issue is that:

  • QNX does not contain <experimental/memory_resource.h>
  • therefore, foonathan_memory must be built with FOONATHAN_MEMORY_BUILD_TOOLS=OFF
  • this results in container_node_sizes_impl.hpp being empty, and shared_ptr_stateful_node_size being undeclared. I've created an issue for this

Fast-RTPS release 1.8.1 does not have a dependency on foonathan_memory. Hopefully the foothan_memory QNX depency issues will be resolved before 1.9.0

@cvilas
Copy link
Contributor

cvilas commented Aug 15, 2019

Cross compiling is broken in general for foonathan-memory. There are some errors in it's CMakeLists.txt such as checking the non-existant CMAKE_CROSS_COMPILING variable instead of CMAKE_CROSSCOMPILING. Bad news of some of us who develop and build on X86-64 but deploy on a different target

Edit: Adding related issue in foonathan-memory for reference: foonathan/memory#51

@cvilas
Copy link
Contributor

cvilas commented Aug 16, 2019

For what it's worth, https://github.com/cvilas/fastrtps_xctest provides a basic repo to test cross compilation. This works perfectly fine for FastRTPS v1.8 and below and I have used something similar to build for NVidia TX2, Android, etc. With the new foonathan-memory dependency, this fails

@raquelalvarezbanos raquelalvarezbanos changed the title Compiling dependency foonathan_memory for QNX Compiling dependency foonathan_memory for QNX [6215] Aug 27, 2019
@MiguelCompany
Copy link
Member

MiguelCompany commented Nov 27, 2019

There have been several improvements related with cross-compilation to the foonathan/memory repo. I guess they might be useful in cross-compiling for QNX.

@cvilas @briansoe66 could you check on your side?

Edit:
To be more precise, take a look at foonathan/memory#59 and foonathan/memory#60

@cvilas
Copy link
Contributor

cvilas commented Nov 28, 2019

@MiguelCompany I can confirm that memory and Fast-RTPS can now be cross compiled after following the structure of cmake cross compilation toolchain setup in foonathan/memory#60

@briansoe66
Copy link
Author

@MiguelCompany, I am still unable to compile foonathan memory on QNX using foonathan_memory_vendor master or foonathan_memory master :(

I have created issue foonathan/memory#72 (comment)

@MiguelCompany
Copy link
Member

I have created issue foonathan/memory#72 (comment)

@briansoe66 Just answered there

@EduPonz
Copy link

EduPonz commented Sep 3, 2020

I'm closing this issue in favor of foonathan/memory#72. Feel free to comment or reopen at any time

@EduPonz EduPonz closed this as completed Sep 3, 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

No branches or pull requests

4 participants