Skip to content

Instantly share code, notes, and snippets.

@ozkriff
Created August 21, 2014 09:44
Show Gist options
  • Save ozkriff/a0cc447fafc0c39a7b05 to your computer and use it in GitHub Desktop.
Save ozkriff/a0cc447fafc0c39a7b05 to your computer and use it in GitHub Desktop.
$ make -B
echo "[1] build Rust source as a library .."
[1] build Rust source as a library ..
rustc --target=arm-linux-androideabi ../main.rs --crate-type=staticlib -o jni/librust_android.a
../r3d/gl_constants.rs:655:38: 655:56 warning: literal out of range for its type, #[warn(type_overflow)] on by default
../r3d/gl_constants.rs:655 pub static GL_TIMEOUT_IGNORED:uint=0xFFFFFFFFFFFFFFFF;
^~~~~~~~~~~~~~~~~~
../r3d/ut.rs:30:3: 30:14 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/ut.rs:30 self.get(0) as *const _ as *const c_void
^~~~~~~~~~~
../r3d/array3d.rs:31:3: 31:48 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/array3d.rs:31 self.data.get(self.linear_index(ijk) as uint)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../r3d/render.rs:113:82: 113:93 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:113 create_buffer(data.len()as GLsizei *mem::size_of::<T>() as GLsizei, as_void_ptr(data.get(0)), GL_ARRAY_BUFFER)
^~~~~~~~~~~
../r3d/render.rs:116:82: 116:93 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:116 create_buffer(data.len()as GLsizei *mem::size_of::<T>() as GLsizei, as_void_ptr(data.get(0)), GL_ELEMENT_ARRAY_BUFFER)
^~~~~~~~~~~
../r3d/render.rs:138:60: 138:73 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:138 let sources_as_c_str=Vec::from_fn(source.len(), |x|c_str(*source.get(x)) );
^~~~~~~~~~~~~
../r3d/render.rs:139:57: 139:70 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:139 let length:Vec<c_int> = Vec::from_fn(source.len() , |x|source.get(x).len() as c_int );
^~~~~~~~~~~~~
../r3d/render.rs:149:12: 149:35 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:149 let s=*sources_as_c_str.get(i);
^~~~~~~~~~~~~~~~~~~~~~~
../r3d/render.rs:150:14: 150:27 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:150 let len=*length.get(i);
^~~~~~~~~~~~~
../r3d/render.rs:157:53: 157:76 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../r3d/render.rs:157 glShaderSource(shader_id, source.len() as GLsizei, sources_as_c_str.get(0), 0 as *const c_int/*(&length[0])*/);
^~~~~~~~~~~~~~~~~~~~~~~
../shadertest.rs:81:35: 81:50 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../shadertest.rs:81 vertex_size: mem::size_of_val(vertices.get(0)) as GLsizei,
^~~~~~~~~~~~~~~
../shadertest.rs:222:11: 222:28 warning: unnecessary parentheses around `match` head expression, #[warn(unnecessary_parens)] on by default
../shadertest.rs:222 match (k as u8 as char) {
^~~~~~~~~~~~~~~~~
../shadertest.rs:281:9: 281:23 warning: value assigned to `render_mat` is never read, #[warn(dead_assignment)] on by default
../shadertest.rs:281 let mut render_mat=cam_mat * rot_trans;
^~~~~~~~~~~~~~
../shadertest.rs:371:112: 371:125 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../shadertest.rs:371 glTexImage2D(GL_TEXTURE_2D, i, GL_RGB as GLint, usize as GLint,vsize as GLint, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer.get(0)as*const _ as*const c_void);
^~~~~~~~~~~~~
../bsp/bsp.rs:71:15: 71:31 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../bsp/bsp.rs:71 unsafe { &*(self.data.get(0)as*const _ as*const T)
^~~~~~~~~~~~~~~~
../bsp/bsp.rs:279:43: 279:82 warning: use of deprecated item: renamed to `unsafe_get`, #[warn(deprecated)] on by default
../bsp/bsp.rs:279 (txh as *const _ as *const u8).offset(*txh.miptex_offset.unsafe_ref(i as uint) as int) as *const MipTex
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../bsprender.rs:51:27: 51:49 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default
../bsprender.rs:51 draw_set_texture(0,*self.textures.get(txi));
^~~~~~~~~~~~~~~~~~~~~~
../main.rs:146:51: 146:69 warning: use of deprecated item: use the `pop` method, #[warn(deprecated)] on by default
../main.rs:146 screens.back_mut().unwrap().on_deselect(); screens.pop_back();
^~~~~~~~~~~~~~~~~~
../main.rs:148:7: 148:27 warning: use of deprecated item: use the `push` method, #[warn(deprecated)] on by default
../main.rs:148 screens.push_back(x);
^~~~~~~~~~~~~~~~~~~~
../main.rs:150:14: 150:32 warning: use of deprecated item: use the `pop` method, #[warn(deprecated)] on by default
../main.rs:150 ScPop=>{screens.pop_back(); },
^~~~~~~~~~~~~~~~~~
../main.rs:151:18: 151:38 warning: use of deprecated item: use the `push` method, #[warn(deprecated)] on by default
../main.rs:151 ScPush(x)=>{screens.push_back(x);},
^~~~~~~~~~~~~~~~~~~~
../main.rs:152:21: 152:39 warning: use of deprecated item: use the `pop` method, #[warn(deprecated)] on by default
../main.rs:152 ScReplace(x)=>{screens.pop_back();screens.push_back(x);},
^~~~~~~~~~~~~~~~~~
../main.rs:152:40: 152:60 warning: use of deprecated item: use the `push` method, #[warn(deprecated)] on by default
../main.rs:152 ScReplace(x)=>{screens.pop_back();screens.push_back(x);},
^~~~~~~~~~~~~~~~~~~~
../main.rs:153:56: 153:76 warning: use of deprecated item: use the `push` method, #[warn(deprecated)] on by default
../main.rs:153 ScCycleNext=>{let x=screens.pop_front().unwrap(); screens.push_back(x);}
^~~~~~~~~~~~~~~~~~~~
../main.rs:154:26: 154:44 warning: use of deprecated item: use the `pop` method, #[warn(deprecated)] on by default
../main.rs:154 ScCyclePrev=>{let x=screens.pop_back().unwrap(); screens.push_front(x);}
^~~~~~~~~~~~~~~~~~
../main.rs:207:4: 207:65 warning: use of deprecated item: use the `push` method, #[warn(deprecated)] on by default
../main.rs:207 x.push_back(box shadertest::ShaderTest::new() as Box<Screen>);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: link against the following native artifacts when linking against this static library
note: the order and any duplication can be significant on some platforms, and so may need to be preserved
note: library: dl
note: library: log
note: library: gcc
note: library: c
note: library: m
echo "building ndk sample, including rust code"
building ndk sample, including rust code
ndk-build
make[1]: Entering directory `/home/ozkriff/marauder/android_rust_gl/android'
[armeabi] Compile thumb : native-activity <= main.c
[armeabi] Compile thumb : native-activity <= desktop_gl_emu.c
jni/desktop_gl_emu.c: In function 'CreateShaders':
jni/desktop_gl_emu.c:188:2: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
jni/desktop_gl_emu.c:212:2: warning: passing argument 3 of 'glGetProgramInfoLog' makes pointer from integer without a cast [enabled by default]
/home/ozkriff/Downloads/android-ndk-r10/platforms/android-14/arch-arm/usr/include/GLES2/gl2.h:539:37: note: expected 'int *' but argument is of type 'size_t'
[armeabi] Compile thumb : android_native_app_glue <= android_native_app_glue.c
[armeabi] StaticLibrary : libandroid_native_app_glue.a
[armeabi] SharedLibrary : libnative-activity.so
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(librust_android.o): in function r3d::debugdraw::gl_texcoord0::h6874b40e49cc264eq8e:main.rs(.text._ZN3r3d9debugdraw12gl_texcoord020h6874b40e49cc264eq8eE+0x70): error: undefined reference to 'glTexCoord2f'
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(librust_android.o): in function r3d::debugdraw::V.GlVertex::gl_texcoord::h13810567156500374046:main.rs(.text._ZN3r3d9debugdraw10V.GlVertex11gl_texcoord21h13810567156500374046E+0x7c): error: undefined reference to 'glTexCoord2f'
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(r-compiler-rt-gcc_personality_v0.o): in function __gcc_personality_v0:/home/ozkriff/marauder/rust-for-android/src/compiler-rt/lib/builtins/gcc_personality_v0.c:206: error: undefined reference to '_Unwind_GetIP'
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(r-compiler-rt-gcc_personality_v0.o): in function __gcc_personality_v0:/home/ozkriff/marauder/rust-for-android/src/compiler-rt/lib/builtins/gcc_personality_v0.c:273: error: undefined reference to '_Unwind_SetGR'
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(r-compiler-rt-gcc_personality_v0.o): in function __gcc_personality_v0:/home/ozkriff/marauder/rust-for-android/src/compiler-rt/lib/builtins/gcc_personality_v0.c:274: error: undefined reference to '_Unwind_SetGR'
/home/ozkriff/Downloads/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/librust_android.a(r-compiler-rt-gcc_personality_v0.o): in function __gcc_personality_v0:/home/ozkriff/marauder/rust-for-android/src/compiler-rt/lib/builtins/gcc_personality_v0.c:275: error: undefined reference to '_Unwind_SetIP'
collect2: ld returned 1 exit status
make[1]: *** [obj/local/armeabi/libnative-activity.so] Error 1
make[1]: Leaving directory `/home/ozkriff/marauder/android_rust_gl/android'
make: *** [ndk_build] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment