BitMagic icon indicating copy to clipboard operation
BitMagic copied to clipboard

Clang: no member named 'allocate_tempblock' in 'bvector<A>'

Open willdealtry opened this issue 1 year ago • 6 comments

Hi there,

I'm a big fan of BitMagic and we use it in our database for a variety of things. I'm trying to build with Clang for the first time and I'm getting the error 'no member named 'allocate_tempblock' in 'bvector<A>', same goes for 'free_tempblock'. I might be missing something stupid, but I can't actually see those methods being defined directly on the bvector, is there something I need to #define?

willdealtry avatar Jun 20 '24 09:06 willdealtry

It's related to the move constructor and move assignment in bulk_insert_iterator, if I comment those out everything works fine. Weirdly I can't work out why they were being moved anyway, I think Clang is doing something odd with lambda captures

willdealtry avatar Jun 20 '24 10:06 willdealtry

Do you have a small code snippet for me to try? (I have clang on Mac). Or maybe even a patch?

tlk00 avatar Jul 07 '24 10:07 tlk00

I encountered the same problem. I tried to build ncbl blast from source with clang. this error occurred. google search lead me here. grep search tells that free_temblock is not defined anywhere. I don't know why it occures only with clang. $grep free_tempblock -R src src/bm.h: bvect_->free_tempblock(buf_);

yoshiF7d avatar Sep 03 '24 02:09 yoshiF7d

I (think) I fixed the issue in the latest master branch. Please pick the new version and try. Master is supposed to be reasonable production grade at this point.

tlk00 avatar Sep 03 '24 19:09 tlk00

Thank you very much. I dodged the problem by commenting out the move method. I hope the issue is now fixed.

yoshiF7d avatar Sep 06 '24 02:09 yoshiF7d

Excellent, thanks very much

willdealtry avatar Oct 29 '24 15:10 willdealtry