{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/31119","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/31119/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/31119/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/31119/events","html_url":"https://github.com/rust-lang/rust/issues/31119","id":128206938,"number":31119,"title":"undefined reference to 'log2f' on android","user":{"login":"not-fl3","id":910977,"avatar_url":"https://avatars.githubusercontent.com/u/910977?v=3","gravatar_id":"","url":"https://api.github.com/users/not-fl3","html_url":"https://github.com/not-fl3","followers_url":"https://api.github.com/users/not-fl3/followers","following_url":"https://api.github.com/users/not-fl3/following{/other_user}","gists_url":"https://api.github.com/users/not-fl3/gists{/gist_id}","starred_url":"https://api.github.com/users/not-fl3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-fl3/subscriptions","organizations_url":"https://api.github.com/users/not-fl3/orgs","repos_url":"https://api.github.com/users/not-fl3/repos","events_url":"https://api.github.com/users/not-fl3/events{/privacy}","received_events_url":"https://api.github.com/users/not-fl3/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"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-22T17:44:02Z","updated_at":"2016-01-22T19:48:13Z","closed_at":null,"body":"\r\nI tried this code:\r\n\r\n```\r\nfn main() {\r\n    let _ = 10.0f32.log2();\r\n}\r\n```\r\nEverithing was fine without cross compilation, but with\r\n> rustc aaa.rs --target=arm-linux-androideabi -C linker=\"arm-linux-androideabi-gcc-4.8\"\r\n\r\n\r\ni got followed result: \r\n\r\n> error: linking with `arm-linux-androideabi-gcc-4.8` failed: exit code: 1\r\nnote: \"arm-linux-androideabi-gcc-4.8\" \"-Wl,--as-needed\" \"-Wl,--allow-multiple-definition\" \"-L\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib\" \"aaa.0.o\" \"-o\" \"aaa\" \"-Wl,--gc-sections\" \"-pie\" \"-nodefaultlibs\" \"-L\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib\" \"-Wl,-Bstatic\" \"-Wl,-Bdynamic\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/libstd-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/libcollections-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/librustc_unicode-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/librand-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/liballoc-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/liballoc_jemalloc-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/liblibc-db5a760f.rlib\" \"/usr/local/lib64/rustlib/arm-linux-androideabi/lib/libcore-db5a760f.rlib\" \"-l\" \"dl\" \"-l\" \"log\" \"-l\" \"gcc\" \"-l\" \"gcc\" \"-l\" \"c\" \"-l\" \"m\" \"-pie\" \"-l\" \"compiler-rt\"\r\nnote: aaa.0.o:aaa.0.rs:function f32::f32::log2::h94a06ad56bda381bXwa: error: undefined reference to 'log2f'\r\ncollect2: error: ld returned 1 exit status\r\n\r\nerror: aborting due to previous error\r\n\r\n\r\nWhile with log(), not log2() everithing works fine.\r\n\r\n\r\n\r\n\r\n## Meta\r\n\r\n`rustc --version --verbose`:\r\n\r\nrustc 1.8.0-dev (cd1b84549 2016-01-22)\r\nbinary: rustc\r\ncommit-hash: cd1b845492e13ae9e0da382dc0ec09d676d2dd59\r\ncommit-date: 2016-01-22\r\nhost: x86_64-unknown-linux-gnu\r\nrelease: 1.8.0-dev"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/174025074","html_url":"https://github.com/rust-lang/rust/issues/31119#issuecomment-174025074","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/31119","id":174025074,"user":{"login":"not-fl3","id":910977,"avatar_url":"https://avatars.githubusercontent.com/u/910977?v=3","gravatar_id":"","url":"https://api.github.com/users/not-fl3","html_url":"https://github.com/not-fl3","followers_url":"https://api.github.com/users/not-fl3/followers","following_url":"https://api.github.com/users/not-fl3/following{/other_user}","gists_url":"https://api.github.com/users/not-fl3/gists{/gist_id}","starred_url":"https://api.github.com/users/not-fl3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-fl3/subscriptions","organizations_url":"https://api.github.com/users/not-fl3/orgs","repos_url":"https://api.github.com/users/not-fl3/repos","events_url":"https://api.github.com/users/not-fl3/events{/privacy}","received_events_url":"https://api.github.com/users/not-fl3/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T19:48:13Z","updated_at":"2016-01-22T19:48:13Z","body":"Answering your questions i maybe have found problem: i made NDK with \r\nmake-standalone-toolchain.sh \\\r\n    --platform=android-14 \\\r\n    --arch=arm \\\r\n    --install-dir=~/ndk-standalone-14-arm\r\n\r\nwith android-15+ everithing linking fine. \r\nSo, for me, its reproducable only on api level 14."}}