Vinatorul / minesweeper-rs

Simple minesweeper in Rust
MIT License
76 stars 9 forks source link

Build fails: /ld: cannot find -lfreetype #15

Closed getreu closed 9 years ago

getreu commented 9 years ago

´´´ Compiling bitflags v0.3.2 Compiling ansi_term v0.6.3 Compiling libc v0.1.10 Compiling pkg-config v0.3.5 Compiling byteorder v0.3.11 Compiling shader_version v0.2.1 Compiling bitflags v0.1.1 Compiling lazy_static v0.1.14 Compiling strsim v0.4.0 Compiling gcc v0.3.13 Compiling winapi-build v0.1.1 Compiling piston-texture v0.2.3 Compiling lzw v0.8.0 Compiling read_color v0.1.0 Compiling bitflags v0.2.1 Compiling piston-shaders_graphics2d v0.1.0 Compiling piston-float v0.1.0 Compiling interpolation v0.1.0 Compiling color_quant v1.0.0 Compiling winapi v0.2.2 Compiling khronos_api v0.0.8 Compiling find_folder v0.2.0 Compiling khronos_api v0.0.7 Compiling rustc-serialize v0.3.16 Compiling glob v0.2.10 Compiling khronos_api v0.0.5 Compiling xml-rs v0.1.26 Compiling gl_common v0.0.4 Compiling dlib v0.1.1 Compiling clock_ticks v0.0.6 Compiling log v0.3.2 Compiling dylib v0.0.1 Compiling shared_library v0.1.0 Compiling kernel32-sys v0.1.4 Compiling advapi32-sys v0.1.2 Compiling clap v1.2.5 Compiling freetype-sys v0.1.2 Compiling draw_state v0.1.2 Compiling vecmath v0.1.1 Compiling piston-viewport v0.1.0 Compiling libz-sys v0.1.8 Compiling gif v0.5.0 Compiling wayland-client v0.2.1 Compiling x11-dl v2.0.1 Compiling osmesa-sys v0.0.5 Compiling gl_generator v0.0.26 Compiling gl_generator v0.0.27 Compiling pistoncore-input v0.5.1 Compiling glutin v0.3.5 Compiling rand v0.3.10 Compiling gl v0.0.12 Compiling gfx_gl v0.1.4 Compiling num v0.1.27 Compiling tempfile v1.1.1 Compiling tempdir v0.3.4 Compiling pistoncore-window v0.9.1 Compiling freetype-rs v0.1.3 Compiling wayland-window v0.1.0 Compiling mmap v0.1.1 Compiling pistoncore-event_loop v0.10.1 Compiling piston2d-graphics v0.4.1 Compiling gfx v0.6.5 Compiling enum_primitive v0.0.1 Compiling wayland-kbd v0.2.0 Compiling piston v0.10.1 Compiling image v0.3.11 Compiling gfx_device_gl v0.4.1 Compiling piston-gfx_texture v0.2.0 Compiling piston2d-gfx_graphics v0.4.0 Compiling pistoncore-glutin_window v0.12.0 Compiling piston_window v0.15.0 Compiling minesweeper v1.0.0 (file:///home/ge error: linking with cc failed: exit code: 1 note: "cc" "-Wl,--as-needed" "-m64" "-L" "/usr/l

...

note: /usr/bin/ld: cannot find -lfreetype collect2: error: ld returned 1 exit status

error: aborting due to previous error Could not compile minesweeper. ´´´

Vinatorul commented 9 years ago

Thank you for the freedback! It looks like you have not installed libc development headers. Try to install libc-dev. This problem also may occurs if rustc is out of date. If this willn't resolve the problem - please provide some information about your OS, rust and gcc version

getreu commented 9 years ago

libc-dev was installed:

Libc-dev: libc6-dev 2.19-18

OS: debian 8 jessie gcc: gcc version 4.9.2 (Debian 4.9.2-10)

rustc: rustc 1.2.0 (082e47636 2015-08-03)

Best

Vinatorul commented 9 years ago

I've looked better at the error. It is reporting about freetype lib. Maybe you are missing dev headers for it, or lib totally. Please, try to install libfreetype6-dev

getreu commented 9 years ago

On 02/09/15 13:26, Alexander Kuvaev wrote:

Please, try to install |libfreetype6-dev|

Thank you. This helped. The build finishes without error, but I get a runtime error:

´´´ :~/.../release$ ./minesweeper [glutin] x error code=48 major=0 minor=0! [glutin] x error code=66 major=0 minor=0! thread '

' panicked at 'called Result::unwrap() on an Err value: "GL context creation failed"', ../src/libcore/result.rs:731 ´´´

Vinatorul commented 9 years ago

Now it should work, if it doesn't help you - let me know, please

Vinatorul commented 9 years ago

Please pass --oldOGL command line flag to run with OpenGL 1.2

getreu commented 9 years ago

It works with ./minesweepers --oldOGL Thank you.