{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/AirSim/issues/893","repository_url":"https://api.github.com/repos/Microsoft/AirSim","labels_url":"https://api.github.com/repos/Microsoft/AirSim/issues/893/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/AirSim/issues/893/comments","events_url":"https://api.github.com/repos/Microsoft/AirSim/issues/893/events","html_url":"https://github.com/Microsoft/AirSim/issues/893","id":306914954,"number":893,"title":"libc++ / libstdc++ compatibility issues","user":{"login":"mescarra","id":13679781,"avatar_url":"https://avatars0.githubusercontent.com/u/13679781?v=4","gravatar_id":"","url":"https://api.github.com/users/mescarra","html_url":"https://github.com/mescarra","followers_url":"https://api.github.com/users/mescarra/followers","following_url":"https://api.github.com/users/mescarra/following{/other_user}","gists_url":"https://api.github.com/users/mescarra/gists{/gist_id}","starred_url":"https://api.github.com/users/mescarra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mescarra/subscriptions","organizations_url":"https://api.github.com/users/mescarra/orgs","repos_url":"https://api.github.com/users/mescarra/repos","events_url":"https://api.github.com/users/mescarra/events{/privacy}","received_events_url":"https://api.github.com/users/mescarra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-20T15:25:29Z","updated_at":"2018-04-12T05:05:59Z","closed_at":"2018-04-12T05:05:59Z","author_association":"CONTRIBUTOR","body":"Hello everyone,\r\n\r\nI'm trying to compile a simple example, like the HelloDrone, but also adding any other dynamic library you could find in linux (built with gcc and libstdc++). I just cannot get it done.\r\n\r\nI'm using Ubuntu 16.04 on an ARM64 architecture. `g++ 5.4.1`, `clang++ 3.9.1`. I have installed AirSim's static libraries in `/usr/local/lib`.\r\n\r\nSo far, I've tried to use different combinations of g++, clang++-3.9, stdlib=libstdc++/libc++ and selective static/dynamic linking (-Wl,-Bstatic).\r\n\r\nIf I compile this way:\r\n`g++ -I/opt/ros/kinetic/include  -I/usr/include/eigen3 -I/usr/local/include/airsim -I/usr/local/include/rpc -DRPCLIB_MSGPACK=clmdep_msgpack -isystem /usr/local/include/llvm -std=c++11 -DMSGPACK_PP_VARIADICS_MSVC=0 -fPIE -o Drone main.cpp -L/opt/ros/kinetic/lib -lrosbag_storage -lc++ -lc++abi -lpthread -lAirLib -lrpc -lMavLinkCom` (`lc++` and `lc++abi` are llvm compiled libraries.)\r\n\r\nI get:\r\n\r\n`undefined reference to 'rosbag::Bag::open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int)'`\r\n\r\nwhich is reasonable because\r\n`nm -C -D /opt/ros/kinetic/lib/librosbag_storage.so | grep rosbag::Bag::open`\r\n\r\noutputs\r\n\r\n`/opt/ros/kinetic/lib/librosbag_storage.so:0000000000023080 T rosbag::Bag::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)`\r\n\r\nOn the other hand, if I remove libc++ link (so defaults to libstdc++) I get undefined errors in rpc library like so:\r\n`../build_debug/output/lib/librpc.a(format.cc.o): In function 'void clmdep_fmt::(anonymous namespace)::check_sign<wchar_t>(wchar_t const*&, clmdep_fmt::internal::Arg const&)':\r\n.../rpclib-2.2.1/dependencies/src/format.cc:306: undefined reference to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'`\r\n\r\nAny ideas?\r\n\r\nThanks in advance.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/AirSim/issues/comments/380679324","html_url":"https://github.com/Microsoft/AirSim/issues/893#issuecomment-380679324","issue_url":"https://api.github.com/repos/Microsoft/AirSim/issues/893","id":380679324,"user":{"login":"sytelus","id":2096835,"avatar_url":"https://avatars3.githubusercontent.com/u/2096835?v=4","gravatar_id":"","url":"https://api.github.com/users/sytelus","html_url":"https://github.com/sytelus","followers_url":"https://api.github.com/users/sytelus/followers","following_url":"https://api.github.com/users/sytelus/following{/other_user}","gists_url":"https://api.github.com/users/sytelus/gists{/gist_id}","starred_url":"https://api.github.com/users/sytelus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sytelus/subscriptions","organizations_url":"https://api.github.com/users/sytelus/orgs","repos_url":"https://api.github.com/users/sytelus/repos","events_url":"https://api.github.com/users/sytelus/events{/privacy}","received_events_url":"https://api.github.com/users/sytelus/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T05:05:59Z","updated_at":"2018-04-12T05:05:59Z","author_association":"MEMBER","body":"PR was merged. Thanks!"}}
{"actor":{"display_login":"sytelus"}}