tlk00 / BitMagic

BitMagic Library
http://bitmagic.io
Other
412 stars 48 forks source link

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

Open willdealtry opened 4 months ago

willdealtry commented 4 months ago

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', 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 commented 4 months ago

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

tlk00 commented 4 months ago

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

yoshiF7d commented 2 months ago

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 freetempblock -R src src/bm.h: bvect->freetempblock(buf);

tlk00 commented 2 months ago

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.

yoshiF7d commented 2 months ago

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

willdealtry commented 2 weeks ago

Excellent, thanks very much