{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/30611","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/30611/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/30611/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/30611/events","html_url":"https://github.com/rust-lang/rust/issues/30611","id":124237245,"number":30611,"title":"Android cross-compiler rustc build failed on x86 host","user":{"login":"wyklq","id":5118557,"avatar_url":"https://avatars.githubusercontent.com/u/5118557?v=3","gravatar_id":"","url":"https://api.github.com/users/wyklq","html_url":"https://github.com/wyklq","followers_url":"https://api.github.com/users/wyklq/followers","following_url":"https://api.github.com/users/wyklq/following{/other_user}","gists_url":"https://api.github.com/users/wyklq/gists{/gist_id}","starred_url":"https://api.github.com/users/wyklq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyklq/subscriptions","organizations_url":"https://api.github.com/users/wyklq/orgs","repos_url":"https://api.github.com/users/wyklq/repos","events_url":"https://api.github.com/users/wyklq/events{/privacy}","received_events_url":"https://api.github.com/users/wyklq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-android","name":"A-android","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-build","name":"A-build","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-29T16:49:44Z","updated_at":"2016-01-23T15:08:36Z","closed_at":"2016-01-23T15:08:35Z","body":"My system:\r\n• Ubuntu 15.10, 32 bit\r\n• gcc 5.2.1\r\n• Android ndk version r10d\r\n• android toolchain created with  `android-ndk-r10d/build/tools/make-standalone-toolchain.sh --platform=\"android-21\" --toolchain=x86-4.9 --arch=x86 --install-dir=\"/opt/ndk\"  `\r\n\r\nSource code: \r\n`rustc-nightly-src.tar.gz` downloaded on 2015.12.29\r\n\r\nConfiguration:\r\n`./configure --disable-docs --target=i686-linux-android --i686-linux-android-ndk=/opt/ndk`\r\n\r\nError:\r\n`rustc: i686-unknown-linux-gnu/stage2/lib/rustlib/i686-linux-android/lib/libstd\r\n src/libstd/thread/local.rs:299:13 299:26 error: unresolved name 'register_dtor' [E0425]\r\n src/libstd/thread/local.rs:299                    register_dtor(self as *const _ as *mut u8,\r\n...\r\n`\r\n\r\nWorkaround:\r\n  commentted out line src/libstd/thread/local.rs:314\r\n`\r\n    //#[cfg(target_os = \"linux\")]\r\n    unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {\r\n    ...\r\n`\r\n\r\nSuspect:\r\n  i686-linux-android target is not considered as a linux, which is wrong."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/174192591","html_url":"https://github.com/rust-lang/rust/issues/30611#issuecomment-174192591","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/30611","id":174192591,"user":{"login":"wyklq","id":5118557,"avatar_url":"https://avatars.githubusercontent.com/u/5118557?v=3","gravatar_id":"","url":"https://api.github.com/users/wyklq","html_url":"https://github.com/wyklq","followers_url":"https://api.github.com/users/wyklq/followers","following_url":"https://api.github.com/users/wyklq/following{/other_user}","gists_url":"https://api.github.com/users/wyklq/gists{/gist_id}","starred_url":"https://api.github.com/users/wyklq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyklq/subscriptions","organizations_url":"https://api.github.com/users/wyklq/orgs","repos_url":"https://api.github.com/users/wyklq/repos","events_url":"https://api.github.com/users/wyklq/events{/privacy}","received_events_url":"https://api.github.com/users/wyklq/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T15:08:35Z","updated_at":"2016-01-23T15:08:35Z","body":"Yes, this points to the root cause, it solves my problem. \r\nAnd it seems latest nightly build has fixed the issue by setting \"base.has_elf_tls = false\" in src/librustc_back/target/android_base.rs.  So, it solves both i686_linux-android target, and future x86_64-linux-android.\r\nThanks."}}