JuliaPackaging / BinaryBuilder.jl

Binary Dependency Builder for Julia
https://binarybuilder.org
Other
392 stars 101 forks source link

`detect_cxxstring_abi` is unreliable when library includes `std::map::erase[abi:cxx11]` symbol #1280

Open topolarity opened 1 year ago

topolarity commented 1 year ago

Found this when I was working on Glibmm.

These symbols are incorrectly detected as evidence of a cxx11 string ABI by BinaryBuilder:

sandbox:${WORKSPACE}/srcdir/glibmm-2.66.6/builddir # nm /workspace/destdir/lib/libgiomm-2.4.so | c++filt | grep cxx11
00000000001617f4 t std::map<Glib::ustring, (anonymous namespace)::OptionArgCallbackData*, std::less<Glib::ustring>, std::allocator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >)
0000000000161ae4 t std::_Rb_tree<Glib::ustring, std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*>, std::_Select1st<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >, std::less<Glib::ustring>, std::allocator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >)

There are probably others too.

giordano commented 1 year ago

That's coming from https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/673c93e0c98efee166a70d1781a589059ae1f654/src/auditor/compiler_abi.jl#L203-L208 So this criterion is inaccurate?