Skip to content

crosscompile macosx to android fails #18675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yichoi opened this issue Nov 6, 2014 · 5 comments
Closed

crosscompile macosx to android fails #18675

yichoi opened this issue Nov 6, 2014 · 5 comments
Labels
A-cross Area: Cross compilation O-android Operating system: Android

Comments

@yichoi
Copy link
Contributor

yichoi commented Nov 6, 2014

It looks like log2f symbol is missing

make check-stage2-T-arm-linux-androideabi-H-x86_64-apple-darwin
....
running 1679 tests
test [run-pass] run-pass/alias-uninit-value.rs ... FAILED
test [run-pass] run-pass/alignment-gep-tup-like-1.rs ... FAILED
test [run-pass] run-pass/alloca-from-derived-tydesc.rs ... FAILED
test [run-pass] run-pass/anon-extern-mod-cross-crate-2.rs ... FAILED
test [run-pass] run-pass/anon-extern-mod.rs ... FAILED
test [run-pass] run-pass/anon-trait-static-method.rs ... FAILED
...
root@android:/data/tmp # cat *.stderr
link_image[1891]: 19364 could not load needed library 'libnative-4e7c5e5c.so' for '/data/tmp/alias-uninit-value.stage2-arm-linux-androideabi' (link_image[1891]: 19364 could not load needed library 'libstd-4e7c5e5c.so' for 'libnative-4e7c5e5c.so' (link_image[1891]: 19364 could not load needed library 'libsync-4e7c5e5c.so' for 'libstd-4e7c5e5c.so' (link_image[1891]: 19364 could not load needed library 'librustrt-4e7c5e5c.so' for 'libsync-4e7c5e5c.so' (reloc_library[1306]: 19364 cannot locate 'log2f'...
))))CANNOT LINK EXECUTABLE
link_image[1891]: 19375 could not load needed library 'libnative-4e7c5e5c.so' for '/data/tmp/alignment-gep-tup-like-1.stage2-arm-linux-androideabi' (link_image[1891]: 19375 could not load needed library 'libstd-4e7c5e5c.so' for 'libnative-4e7c5e5c.so' (link_image[1891]: 19375 could not load needed library 'libsync-4e7c5e5c.so' for 'libstd-4e7c5e5c.so' (link_image[1891]: 19375 could not load needed library 'librustrt-4e7c5e5c.so' for 'libsync-4e7c5e5c.so' (reloc_library[1306]: 19375 cannot locate 'log2f'...
))))CANNOT LINK EXECUTABLE
...
[localhost:build] /opt/ndk/bin/arm-linux-androideabi-nm x86_64-apple-darwin/stage2/lib/rustlib/arm-linux-androideabi/lib/librustrt-4e7c5e5c.so | grep log2f
         U log2f
@alexcrichton
Copy link
Member

Do you have a full gist available? I wonder if we're trying to upload *.dylib to the emulator when we should be uploading *.so...

@yichoi
Copy link
Contributor Author

yichoi commented Nov 6, 2014

android does not need *.dylib. just *.so are required. please find the script mk/test.mk what I wrote before.
I can provide full gist however repeated messages are almost same

@yichoi
Copy link
Contributor Author

yichoi commented Nov 7, 2014

rust_android_dummy.c is compiled for android properly.
librust_builtin.a has log2f properly.
librustrt-xxx.so does not have log2f
libstd-xxx.so has log2f

[localhost:build] /opt/ndk/bin/arm-linux-androideabi-nm arm-linux-androideabi/rt/rust_android_dummy.o | grep log2f
00000018 T log2f
[localhost:build] /opt/ndk/bin/arm-linux-androideabi-nm arm-linux-androideabi/rt/librust_builtin.a | grep log2f
00000018 T log2f
[localhost:build] /opt/ndk/bin/arm-linux-androideabi-nm x86_64-apple-darwin/stage2/lib/rustlib/arm-linux-androideabi/lib/librustrt-4e7c5e5c.so | grep log2f
         U log2f
[localhost:build] /opt/ndk/bin/arm-linux-androideabi-nm x86_64-apple-darwin/stage2/lib/rustlib/arm-linux-androideabi/lib/libstd-4e7c5e5c.so | grep log2f
000848e8 T log2f

@sanxiyn sanxiyn added O-android Operating system: Android A-cross Area: Cross compilation labels Jan 25, 2015
@steveklabnik
Copy link
Member

@yichoi are you still seeing this issue? It's been a long time.

@sae-bom
Copy link

sae-bom commented Mar 26, 2015

#23695
at this pr, it was checked that this problem doesn't occur.

@sanxiyn sanxiyn closed this as completed Mar 26, 2015
lnicola pushed a commit to lnicola/rust that referenced this issue Dec 16, 2024
fix: Panic when displaying generic params with defaults, again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross Area: Cross compilation O-android Operating system: Android
Projects
None yet
Development

No branches or pull requests

5 participants