z0w0/rusty-cairo — Issue #1: build failure
Author: gmfawcett
Created: 2012-01-12 16:50:53+00:00
State: open

Hi, z0w0, really looking forward to trying this out! But I had several build errors (below). I'm using a bleeding-edge rustc, perhaps that's related?

% rustc -v
rustc prerelease (0e334c6 2012-01-10 15:59:57 -0800)
host: x86_64-unknown-linux-gnu

% uname -a
Linux remus 2.6.32-36-generic #79-Ubuntu SMP Tue Nov 8 22:29:53 UTC 2011 x86_64 GNU/Linux

% make
rustc --lib ./src/cairo.rs --out-dir=./lib
./src/cairo.rs:547:57: 547:63 error: mismatched types: expected `c_int` but found `status` (types differ)
./src/cairo.rs:547	ret core::str::from_cstr(ccairo::cairo_status_to_string(status));
^~~~~~
./src/cairo.rs:560:43: 560:49 error: mismatched types: expected `c_int` but found `format` (types differ)
./src/cairo.rs:560	ret ccairo::cairo_format_stride_for_width(format, width);
^~~~~~
./src/cairo.rs:560:51: 560:56 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:560	ret ccairo::cairo_format_stride_for_width(format, width);
^~~~~
./src/cairo.rs:560:5: 560:57 error: mismatched types: expected `int` but found `c_int` (types differ)
./src/cairo.rs:560	ret ccairo::cairo_format_stride_for_width(format, width);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/cairo.rs:776:6: 776:44 error: mismatched types: expected `status` but found `c_int` (types differ)
./src/cairo.rs:776	ret ccairo::cairo_device_acquire(internal);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/cairo.rs:804:60: 804:61 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:804	ccairo::cairo_pdf_surface_restrict_to_version(internal, 0);
^
./src/cairo.rs:807:60: 807:61 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:807	ccairo::cairo_pdf_surface_restrict_to_version(internal, 1);
^
./src/cairo.rs:817:60: 817:61 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:817	ccairo::cairo_svg_surface_restrict_to_version(internal, 0);
^
./src/cairo.rs:820:60: 820:61 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:820	ccairo::cairo_svg_surface_restrict_to_version(internal, 1);
^
./src/cairo.rs:923:62: 923:63 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:923	ret ccairo::cairo_surface_has_show_text_glyphs(internal) == 1;
^
./src/cairo.rs:938:93: 938:100 error: mismatched types: expected `c_int` but found `content` (types differ)
./src/cairo.rs:938	let internal: ctypes::intptr_t = ccairo::cairo_surface_create_similar(other.get_internal(), content, width as ctypes::c_int, height as ctypes::c_int);
^~~~~~~
./src/cairo.rs:966:69: 966:75 error: mismatched types: expected `c_int` but found `format` (types differ)
./src/cairo.rs:966	let internal: ctypes::intptr_t = ccairo::cairo_image_surface_create(format, width as ctypes::c_int, height as ctypes::c_int);
^~~~~~
./src/cairo.rs:998:111: 998:117 error: mismatched types: expected `c_int` but found `format` (types differ)
./src/cairo.rs:998	let internal: ctypes::intptr_t = ccairo::cairo_image_surface_create_for_data(core::vec::unsafe::to_ptr(data), format, width as ctypes::c_int, height as ctypes::c_int, stride as ctypes::c_int);
^~~~~~
./src/cairo.rs:1018:29: 1018:30 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1018	let count: ctypes::c_int = 0;
^
./src/cairo.rs:1022:6: 1022:11 error: mismatched types: expected `int` but found `c_int` (types differ)
./src/cairo.rs:1022	ret count;
^~~~~
./src/cairo.rs:1080:45: 1080:51 error: mismatched types: expected `c_int` but found `extend` (types differ)
./src/cairo.rs:1080	ccairo::cairo_pattern_set_extend(internal, extend);
^~~~~~
./src/cairo.rs:1086:45: 1086:51 error: mismatched types: expected `c_int` but found `filter` (types differ)
./src/cairo.rs:1086	ccairo::cairo_pattern_set_filter(internal, filter);
^~~~~~
./src/cairo.rs:1465:103: 1465:108 error: mismatched types: expected `c_int` but found `font_slant` (types differ)
./src/cairo.rs:1465	let internal: ctypes::intptr_t = ccairo::cairo_toy_font_face_create(core::vec::unsafe::to_ptr(bytes), slant, weight);
^~~~~
./src/cairo.rs:1465:110: 1465:116 error: mismatched types: expected `c_int` but found `font_weight` (types differ)
./src/cairo.rs:1465	let internal: ctypes::intptr_t = ccairo::cairo_toy_font_face_create(core::vec::unsafe::to_ptr(bytes), slant, weight);
^~~~~~
./src/cairo.rs:1486:69: 1486:70 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1486	if cft::FT_Init_FreeType(core::ptr::addr_of(library_internal)) != 0 {
^
./src/cairo.rs:1490:116: 1490:117 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1490	if cft::FT_New_Face(library_internal, core::vec::unsafe::to_ptr(bytes), 0, core::ptr::addr_of(face_internal)) != 0{
^
./src/cairo.rs:1495:75: 1495:76 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1495	internal = ccairo::cairo_ft_font_face_create_for_ft_face(face_internal, 0);
^
./src/cairo.rs:1635:6: 1635:49 error: mismatched types: expected `status` but found `c_int` (types differ)
./src/cairo.rs:1635	ret ccairo::cairo_font_options_status(internal);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/cairo.rs:1645:53: 1645:62 error: mismatched types: expected `c_int` but found `antialias` (types differ)
./src/cairo.rs:1645	ccairo::cairo_font_options_set_antialias(internal, antialias);
^~~~~~~~~
./src/cairo.rs:1651:58: 1651:63 error: mismatched types: expected `c_int` but found `subpixel_order` (types differ)
./src/cairo.rs:1651	ccairo::cairo_font_options_set_subpixel_order(internal, order);
^~~~~
./src/cairo.rs:1657:54: 1657:58 error: mismatched types: expected `c_int` but found `hint_style` (types differ)
./src/cairo.rs:1657	ccairo::cairo_font_options_set_hint_style(internal, hint);
^~~~
./src/cairo.rs:1663:56: 1663:60 error: mismatched types: expected `c_int` but found `hint_metrics` (types differ)
./src/cairo.rs:1663	ccairo::cairo_font_options_set_hint_metrics(internal, hint);
^~~~
./src/cairo.rs:1719:50: 1719:57 error: mismatched types: expected `c_int` but found `content` (types differ)
./src/cairo.rs:1719	ccairo::cairo_push_group_with_content(internal, content);
^~~~~~~
./src/cairo.rs:1755:40: 1755:49 error: mismatched types: expected `c_int` but found `antialias` (types differ)
./src/cairo.rs:1755	ccairo::cairo_set_antialias(internal, antialias);
^~~~~~~~~
./src/cairo.rs:1764:6: 1764:44 error: mismatched types: expected `int` but found `c_int` (types differ)
./src/cairo.rs:1764	ret ccairo::cairo_get_dash_count(internal);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/cairo.rs:1781:40: 1781:44 error: mismatched types: expected `c_int` but found `fill_rule` (types differ)
./src/cairo.rs:1781	ccairo::cairo_set_fill_rule(internal, rule);
^~~~
./src/cairo.rs:1787:39: 1787:42 error: mismatched types: expected `c_int` but found `line_cap` (types differ)
./src/cairo.rs:1787	ccairo::cairo_set_line_cap(internal, cap);
^~~
./src/cairo.rs:1793:40: 1793:44 error: mismatched types: expected `c_int` but found `line_join` (types differ)
./src/cairo.rs:1793	ccairo::cairo_set_line_join(internal, join);
^~~~
./src/cairo.rs:1811:39: 1811:41 error: mismatched types: expected `c_int` but found `operator` (types differ)
./src/cairo.rs:1811	ccairo::cairo_set_operator(internal, op);
^~
./src/cairo.rs:1839:45: 1839:46 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1839	ret ccairo::cairo_in_clip(internal,x,y) == 1;
^
./src/cairo.rs:1861:47: 1861:48 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1861	ret ccairo::cairo_in_fill(internal, x, y) == 1;
^
./src/cairo.rs:1892:49: 1892:50 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1892	ret ccairo::cairo_in_stroke(internal, x, y) == 1;
^
./src/cairo.rs:1919:51: 1919:52 error: mismatched types: expected `c_int` but found `int` (types differ)
./src/cairo.rs:1919	ret ccairo::cairo_has_current_point(internal) == 1;
^
./src/cairo.rs:2058:77: 2058:82 error: mismatched types: expected `c_int` but found `font_slant` (types differ)
./src/cairo.rs:2058	ccairo::cairo_select_font_face(internal, core::vec::unsafe::to_ptr(bytes), slant, weight);
^~~~~
./src/cairo.rs:2058:84: 2058:90 error: mismatched types: expected `c_int` but found `font_weight` (types differ)
./src/cairo.rs:2058	ccairo::cairo_select_font_face(internal, core::vec::unsafe::to_ptr(bytes), slant, weight);
^~~~~~
./src/cairo.rs:2142:317: 2142:330 error: mismatched types: expected `c_int` but found `text_cluster_flags` (types differ)
./src/cairo.rs:2142	ccairo::cairo_show_text_glyphs(internal, core::vec::unsafe::to_ptr(bytes), core::vec::len(bytes) as ctypes::c_int, core::vec::unsafe::to_ptr(cglyphs) as ctypes::intptr_t, core::vec::len(cglyphs) as ctypes::c_int, core::vec::unsafe::to_ptr(cclusters) as ctypes::intptr_t, core::vec::len(cclusters) as ctypes::c_int, cluster_flags);
^~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', src/comp/driver/session.rs:75
rust: domain main @0xa5a2d0 root task failed
make: *** [all] Error 101