Skip to content

Build fails with no method found error #155

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
MagaTailor opened this issue Jan 18, 2016 · 4 comments
Closed

Build fails with no method found error #155

MagaTailor opened this issue Jan 18, 2016 · 4 comments

Comments

@MagaTailor
Copy link

Trying to build on ARM linux with rustc 1.7 nightly:

Compiling zgl v0.0.1 (file:///tmp/zoc-master)
src/zgl/src/font_stash.rs:112:63: 112:74 error: no method named `mul_s` found for type `cgmath::vector::Vector3<f32>` in the current scope
src/zgl/src/font_stash.rs:112                 VertexCoord{v: Vector3{x: i, y: yoff, z: 0.0}.mul_s(size)},
                                                                                            ^~~~~~~~~~~
src/zgl/src/font_stash.rs:113:67: 113:78 error: no method named `mul_s` found for type `cgmath::vector::Vector3<f32>` in the current scope
src/zgl/src/font_stash.rs:113                 VertexCoord{v: Vector3{x: i, y: yoff - h, z: 0.0}.mul_s(size)},
                                                                                                ^~~~~~~~~~~
src/zgl/src/font_stash.rs:114:71: 114:82 error: no method named `mul_s` found for type `cgmath::vector::Vector3<f32>` in the current scope
src/zgl/src/font_stash.rs:114                 VertexCoord{v: Vector3{x: w + i, y: yoff - h, z: 0.0}.mul_s(size)},
                                                                                                    ^~~~~~~~~~~
src/zgl/src/font_stash.rs:115:67: 115:78 error: no method named `mul_s` found for type `cgmath::vector::Vector3<f32>` in the current scope
src/zgl/src/font_stash.rs:115                 VertexCoord{v: Vector3{x: w + i, y: yoff, z: 0.0}.mul_s(size)},
                                                                                                ^~~~~~~~~~~
src/zgl/src/lib.rs:145:21: 145:33 error: no associated item named `one` found for type `cgmath::matrix::Matrix4<_>` in the current scope
src/zgl/src/lib.rs:145         let mut t = Matrix4::one();
                                           ^~~~~~~~~~~~
src/zgl/src/lib.rs:146:9: 146:13 error: the type of this value must be known in this context
src/zgl/src/lib.rs:146         t[3][0] = v.x;
                               ^~~~
src/zgl/src/lib.rs:149:11: 149:20 error: no method named `mul_m` found for type `cgmath::matrix::Matrix4<f32>` in the current scope
src/zgl/src/lib.rs:149         m.mul_m(&t)
                                 ^~~~~~~~~
src/zgl/src/lib.rs:153:21: 153:33 error: no associated item named `one` found for type `cgmath::matrix::Matrix4<_>` in the current scope
src/zgl/src/lib.rs:153         let mut t = Matrix4::one();
                                           ^~~~~~~~~~~~
src/zgl/src/lib.rs:154:9: 154:13 error: the type of this value must be known in this context
src/zgl/src/lib.rs:154         t[0][0] = scale;
                               ^~~~
src/zgl/src/lib.rs:157:11: 157:20 error: no method named `mul_m` found for type `cgmath::matrix::Matrix4<f32>` in the current scope
src/zgl/src/lib.rs:157         m.mul_m(&t)
                                 ^~~~~~~~~
src/zgl/src/lib.rs:162:11: 162:20 error: no method named `mul_m` found for type `cgmath::matrix::Matrix4<f32>` in the current scope
src/zgl/src/lib.rs:162         m.mul_m(&r)
                                 ^~~~~~~~~
src/zgl/src/lib.rs:167:11: 167:20 error: no method named `mul_m` found for type `cgmath::matrix::Matrix4<f32>` in the current scope
src/zgl/src/lib.rs:167         m.mul_m(&r)
                                 ^~~~~~~~~
error: aborting due to 12 previous errors
@MagaTailor
Copy link
Author

I'd asked you about gles on linux a while ago (can't remember the issue) but now that I've tried to build zoc for OpenGL, it's obvious another Makefile target is going to be needed.

@ozkriff
Copy link
Owner

ozkriff commented Jan 19, 2016

Hmm, it compiles on travis (rustc 1.7.0-nightly (d0bac3f14 2016-01-18)):

https://travis-ci.org/ozkriff/zoc/jobs/101669943

@MagaTailor
Copy link
Author

I managed to compile zoc using stable 1.5 after hackishly fixing glutin due to this ARM issue.

However under 1.7 that wouldn't work so easily due to wayland not compiling so it had to be updated to 0.5.8 first and then cargo update'd. That must have broken some dependencies.

I've already got used to doing this and so I completely forgot to mention the fact. Sorry for that.

@MagaTailor
Copy link
Author

I suggest updating the README with info about OpenGL version requirements. For example, I tried to run the binary on ARM Linux @ 16bpp:

GL_VERSION: 2.1 Mesa 10.1.3
GLSL_VERSION: 1.20
GL_VENDOR: Mesa Project
GL_RENDERER: Software Rasterizer
thread '<main>' panicked at '0:1(1): error: syntax error, unexpected $undefined
', src/zgl/src/shader.rs:168

Normally, if the default OpenGL 3.3 is required it aborts immediately so maybe it's something else? (colour depth?)

EDIT
Never mind, I already confirmed it compiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants