cross compiling for QNX -> undefined reference to `std::bad_alloc::bad_alloc()' [13651] #2541
Bobi-zhou
started this conversation in
Unofficial support
Replies: 1 comment
-
I am going to move this issue to the Unofficial support forum. According to the CONTRIBUTING guidelines, issues related with non-officially supported platforms, architectures and/or compilers should be discussed over that forum. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When cross compiling for QNX at last phase occurred an error
/usr/local/lib/libfoonathan_memory-0.6.2.a(error.cpp.o): In function
foonathan::memory::out_of_memory::out_of_memory(foonathan::memory::allocator_info const&, unsigned long)': error.cpp:(.text+0x164): undefined reference to
std::bad_alloc::bad_alloc()'Expected Behavior
Compiled successfully
Current Behavior
[ 99%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir///thirdparty/tinyxml2/tinyxml2.cpp.o
[100%] Linking CXX shared library libfastrtps.so
/usr/local/lib/libfoonathan_memory-0.6.2.a(error.cpp.o): In function
foonathan::memory::out_of_memory::out_of_memory(foonathan::memory::allocator_info const&, unsigned long)': error.cpp:(.text+0x164): undefined reference to
std::bad_alloc::bad_alloc()'/usr/local/lib/libfoonathan_memory-0.6.2.a(error.cpp.o): In function
foonathan::memory::bad_allocation_size::bad_allocation_size(foonathan::memory::allocator_info const&, unsigned long, unsigned long)': error.cpp:(.text+0x310): undefined reference to
std::bad_alloc::bad_alloc()'/usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
(anonymous namespace)::calc_no_pages(unsigned long)': virtual_memory.cpp:(.text+0x78): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x7c): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x90): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x94): undefined reference to
foonathan::memory::virtual_memory_page_size' /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_memory_allocator::allocate_node(unsigned long, unsigned long)':virtual_memory.cpp:(.text+0x114): undefined reference to
foonathan::memory::virtual_memory_reserve(unsigned long)' virtual_memory.cpp:(.text+0x130): undefined reference to
foonathan::memory::virtual_memory_commit(void*, unsigned long)'virtual_memory.cpp:(.text+0x170): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x174): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x1c4): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x1c8): undefined reference to
foonathan::memory::virtual_memory_page_size'/usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_memory_allocator::deallocate_node(void*, unsigned long, unsigned long)': virtual_memory.cpp:(.text+0x23c): undefined reference to
foonathan::memory::virtual_memory_page_size'/usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o):virtual_memory.cpp:(.text+0x240): more undefined references to
foonathan::memory::virtual_memory_page_size' follow /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_memory_allocator::deallocate_node(void*, unsigned long, unsigned long)':virtual_memory.cpp:(.text+0x27c): undefined reference to
foonathan::memory::virtual_memory_decommit(void*, unsigned long)' virtual_memory.cpp:(.text+0x288): undefined reference to
foonathan::memory::virtual_memory_release(void*, unsigned long)'/usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_memory_allocator::max_alignment() const': virtual_memory.cpp:(.text+0x2b4): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x2b8): undefined reference to
foonathan::memory::virtual_memory_page_size' /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_block_allocator::virtual_block_allocator(unsigned long, unsigned long)':virtual_memory.cpp:(.text+0x314): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x318): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x330): undefined reference to
foonathan::memory::virtual_memory_reserve(unsigned long)' /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_block_allocator::~virtual_block_allocator()':virtual_memory.cpp:(.text+0x430): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x434): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x448): undefined reference to
foonathan::memory::virtual_memory_release(void*, unsigned long)' /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_block_allocator::allocate_block()':virtual_memory.cpp:(.text+0x510): undefined reference to
foonathan::memory::virtual_memory_page_size' virtual_memory.cpp:(.text+0x514): undefined reference to
foonathan::memory::virtual_memory_page_size'virtual_memory.cpp:(.text+0x528): undefined reference to
foonathan::memory::virtual_memory_commit(void*, unsigned long)' /usr/local/lib/libfoonathan_memory-0.6.2.a(virtual_memory.cpp.o): In function
foonathan::memory::virtual_block_allocator::deallocate_block(foonathan::memory::memory_block)':virtual_memory.cpp:(.text+0x6c4): undefined reference to `foonathan::memory::virtual_memory_decommit(void*, unsigned long)'
collect2: error: ld returned 1 exit status
src/cpp/CMakeFiles/fastrtps.dir/build.make:3156: recipe for target 'src/cpp/libfastrtps.so.2.3.3' failed
make[2]: *** [src/cpp/libfastrtps.so.2.3.3] Error 1
CMakeFiles/Makefile2:981: recipe for target 'src/cpp/CMakeFiles/fastrtps.dir/all' failed
make[1]: *** [src/cpp/CMakeFiles/fastrtps.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
Steps to Reproduce
-DTHIRDPARTY=ON
-DCMAKE_BUILD_TYPE=Release
-DCOMPILE_EXAMPLES=OFF
-DCMAKE_SHARED_LINKER_FLAGS=-lsocket
-DTHIRDPARTY_Asio=FORCE
-DTHIRDPARTY_TinyXML2=FORCE
-Dfoonathan_memory_DIR=/usr/local/lib/foonathan_memory/cmake
-DSQLITE3_SUPPORT=OFF
..
System information
Additional context
Beta Was this translation helpful? Give feedback.
All reactions