Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Yadava__Himanshu
Beginner
104 Views

memory_pool linking error

I'm implementing a custom allocator using the tbb memory_pool class, Everything seems to compile fine, but during linking I get the following linker error. Any ideas why I might be getting this? I was already using  tbb::parallel_for in my code, which works fine. So I know tbb library is getting linked.

Host: centos 7

Compiler: c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)

CMakeFiles/spell.dir/src/tools/test.cc.o: In function `tbb::interface6::internal::pool_base::malloc(unsigned long)':
/home/hyadava/git/speller/libspeller/ext/tbb/include/tbb/memory_pool.h:58: undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'
CMakeFiles/spell.dir/src/tools/test.cc.o: In function `tbb::interface6::internal::pool_base::free(void*)':
/home/hyadava/git/speller/libspeller/ext/tbb/include/tbb/memory_pool.h:61: undefined reference to `rml::pool_free(rml::MemoryPool*, void*)'
CMakeFiles/spell.dir/src/tools/test.cc.o: In function `tbb::interface6::memory_pool<tbb::scalable_allocator<char> >::memory_pool(tbb::scalable_allocator<char> const&)':
/home/hyadava/git/speller/libspeller/ext/tbb/include/tbb/memory_pool.h:224: undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'
CMakeFiles/spell.dir/src/tools/test.cc.o: In function `tbb::scalable_allocator<char>::allocate(unsigned long, void const*)':
/home/hyadava/git/speller/libspeller/ext/tbb/include/tbb/scalable_allocator.h:266: undefined reference to `scalable_malloc'
CMakeFiles/spell.dir/src/tools/test.cc.o: In function `tbb::scalable_allocator<char>::deallocate(char*, unsigned long)':
/home/hyadava/git/speller/libspeller/ext/tbb/include/tbb/scalable_allocator.h:274: undefined reference to `scalable_free'
collect2: error: ld returned 1 exit status

0 Kudos
1 Reply
Viet_H_Intel
Moderator
104 Views

Seems to me  that TBB libs didn't correctly link in.

Reply