{"action":"created","issue":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/104","repository_url":"https://api.github.com/repos/android-ndk/ndk","labels_url":"https://api.github.com/repos/android-ndk/ndk/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/android-ndk/ndk/issues/104/comments","events_url":"https://api.github.com/repos/android-ndk/ndk/issues/104/events","html_url":"https://github.com/android-ndk/ndk/issues/104","id":156370562,"number":104,"title":"Error migrating from GCC to Clang - undefined reference to atomic","user":{"login":"4brunu","id":784666,"avatar_url":"https://avatars.githubusercontent.com/u/784666?v=3","gravatar_id":"","url":"https://api.github.com/users/4brunu","html_url":"https://github.com/4brunu","followers_url":"https://api.github.com/users/4brunu/followers","following_url":"https://api.github.com/users/4brunu/following{/other_user}","gists_url":"https://api.github.com/users/4brunu/gists{/gist_id}","starred_url":"https://api.github.com/users/4brunu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4brunu/subscriptions","organizations_url":"https://api.github.com/users/4brunu/orgs","repos_url":"https://api.github.com/users/4brunu/repos","events_url":"https://api.github.com/users/4brunu/events{/privacy}","received_events_url":"https://api.github.com/users/4brunu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"assignees":[{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-05-23T21:26:24Z","updated_at":"2016-07-13T22:13:51Z","closed_at":"2016-07-13T22:13:51Z","body":"Hi,\r\n\r\nI have a project that uses C++ and I'm using Djinni to create the JNI code.\r\nThis works fine with GCC, but after some attempts to migrate to Clang, I always get this error.\r\n\r\n```\r\n/Applications/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h\r\nError:(53) undefined reference to '__atomic_fetch_add_4'\r\nError:(49) undefined reference to '__atomic_fetch_add_4'\r\nError:(49) undefined reference to '__atomic_fetch_add_4'\r\nError:(53) undefined reference to '__atomic_fetch_add_4'\r\n/Applications/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/shared_ptr_base.h\r\nError:(199) undefined reference to '__atomic_load_4'\r\nError:error: linker command failed with exit code 1 (use -v to see invocation)\r\nError:Execution failed for task ':app:linkExampleArmeabiDebugSharedLibrary'.\r\n> A build operation failed.\r\n      Linker failed while linking libexample.so.\r\n```\r\n\r\nI created a sample project to show my issue.\r\nhttps://github.com/4brunu/AndroidNDK_GCC_To_Clang\r\n\r\nI have tested with NDK r11c and r12-beta2.\r\nAm I doing something wrong, or it's a NDK bug?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/comments/232502650","html_url":"https://github.com/android-ndk/ndk/issues/104#issuecomment-232502650","issue_url":"https://api.github.com/repos/android-ndk/ndk/issues/104","id":232502650,"user":{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T22:13:50Z","updated_at":"2016-07-13T22:13:50Z","body":"```diff\r\n-            cppFlags.add(\"-latomic\")\r\n+            ldFlags.add(\"-latomic\")\r\n```"}}
{"actor":{"display_login":"DanAlbert"}}