scan_shared_objects fails when soname does not match a numbered version
testing/mongo-cxx-driver contains a libbsoncxx.
that libbsoncxx:
$ scanelf -R --soname pkg/
TYPE SONAME FILE
ET_DYN libmongocxx.so._noabi pkg/mongo-cxx-driver/usr/lib/libmongocxx.so.3.7.0
contains an SONAME that does not match the filename. (here, the version is just always the project version, the abi is static and that string).
there is a symlink of libmongocxx.so._noabi -> libmongocxx.so.3.7.0
as well, so the DT_NEEDED is loaded fine at runtime (on the former).
imo abuild shouldn't enforce that the file contains a matching soname. it's not invalid by any specification i know of, but maybe i'm mistaken..
most of the issue seems to be
*.so.[0-9]*) sover=${file##*.so.};;