{"action":"opened","issue":{"url":"https://api.github.com/repos/lvc/vtable-dumper/issues/7","repository_url":"https://api.github.com/repos/lvc/vtable-dumper","labels_url":"https://api.github.com/repos/lvc/vtable-dumper/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/lvc/vtable-dumper/issues/7/comments","events_url":"https://api.github.com/repos/lvc/vtable-dumper/issues/7/events","html_url":"https://github.com/lvc/vtable-dumper/issues/7","id":198238299,"number":7,"title":"Explicit linking against -lstdc++ disqualifies clang w/ libc++","user":{"login":"mgorny","id":110765,"avatar_url":"https://avatars.githubusercontent.com/u/110765?v=3","gravatar_id":"","url":"https://api.github.com/users/mgorny","html_url":"https://github.com/mgorny","followers_url":"https://api.github.com/users/mgorny/followers","following_url":"https://api.github.com/users/mgorny/following{/other_user}","gists_url":"https://api.github.com/users/mgorny/gists{/gist_id}","starred_url":"https://api.github.com/users/mgorny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgorny/subscriptions","organizations_url":"https://api.github.com/users/mgorny/orgs","repos_url":"https://api.github.com/users/mgorny/repos","events_url":"https://api.github.com/users/mgorny/events{/privacy}","received_events_url":"https://api.github.com/users/mgorny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-31T16:25:03Z","updated_at":"2016-12-31T16:25:03Z","closed_at":null,"body":"vtable-dumper is explicitly linking to `-lstdc++` used to provide `__cxa_demangle()`. However, libstdc++ is only valid for gcc (and clang with gcc libstdc++). The other compilers provide `__cxa_demangle()` in other libraries. For example, clang in GNU-free environment uses `-lc++` (well, the needed symbol is actually often provided by `-lc++abi` or `-lcxxrt` sub-library), in which case `-lstdc++` is either going to be wrong (i.e. force dependency on wrong C++ library on system using purely clang suite) or fail (when there is no gcc).\r\n\r\nTo be honest, I really don't see a point in building vtable-dumper as C if it requires the C++ library anyway. Therefore, the simplest solution to the problem would be to build it using a C++ compiler which in turn will use the correct C++ library for the ecosystem used (and also guarantee correct ABI for `__cxa_demangle()` calls — it would also be more correct to `#include <cxxabi.h>` instead of redeclaring the function)."}}
{"actor":{"display_login":"mgorny"}}