ashvardanian / StringZilla

Up to 10x faster strings for C, C++, Python, Rust, and Swift, leveraging NEON, AVX2, AVX-512, and SWAR to accelerate search, sort, edit distances, alignment scores, etc 🦖
https://ashvardanian.com/posts/stringzilla/
Apache License 2.0
2.05k stars 66 forks source link

Fix: repetitive visibility warnings, -Werror. #61

Closed kmapb closed 8 months ago

kmapb commented 8 months ago

Testing: built and ran stringzillasearch{bench,test}

Lots of warnings about the symbol visibility directives. These directives would make sense if stringzilla were distributed primarily as a .so or .dylib, but we appear to expose it mostly as a header file. Not sure how this impacts python or js, but also unable to build these at the time so consider this a starting point.

kmapb commented 8 months ago

Ah, ok, -Werr exposed some stuff. Hang on ...

kmapb commented 8 months ago

Ah, perhaps not. This seems to be a real issue:

python/lib.c: In function ‘Str_levenshtein’: python/lib.c:1096:22: error: ‘sz_memory_allocator_t’ {aka ‘struct sz_memory_allocator_t’} has no member named ‘user_data’ 1096 | reusing_allocator.user_data = &temporary_memory;

kmapb commented 8 months ago

Not sure how that ever compiled, actually? The non-existent user_data member ref came in at change 44ef9893 along with the definition of sz_memory_allocator_t.