基于 OpenSUSE 构建的鞋子 - Rake 错误

Posted

技术标签:

【中文标题】基于 OpenSUSE 构建的鞋子 - Rake 错误【英文标题】:Shoes building on OpenSUSE - Rake error 【发布时间】:2016-05-14 01:14:03 【问题描述】:

我是 Linux 和 Ruby 的初学者。我的 32 位笔记本电脑安装了 OpenSUSE 13.2,我尝试按照 these instructions 在其上安装 shoes。但是,当我输入rake 时,它开始运行,然后显示以下错误消息:

    gcc -I. -c -o shoes/effects.o -Wall -I/usr/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/ruby/2.1.0/i586-linux-gnu -I/usr/include/ruby-2.1.0 -I/usr/include/ruby-2.1.0/i586-linux-gnu -O  -DRUBY_1_9 -DSHOES_GTK -fPIC -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2  shoes/effects.c
    gcc -I. -c -o shoes/image.o -Wall -I/usr/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/ruby/2.1.0/i586-linux-gnu -I/usr/include/ruby-2.1.0 -I/usr/include/ruby-2.1.0/i586-linux-gnu -O  -DRUBY_1_9 -DSHOES_GTK -fPIC -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2  shoes/image.c
    shoes/image.c: In function ‘shoes_surface_create_from_gif’:
       ^
    In file included from shoes/image.c:31:0:
    /usr/include/gif_lib.h:178:14: note: declared here
     GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
                  ^
    shoes/image.c: In function ‘shoes_surface_create_from_jpeg’:
    shoes/image.c:543:39: warning: variable ‘prevy’ set but not used         [-Wunused-but-set-variable]
       int x, y, w, h, l, i, scans, count, prevy;
                                           ^
    shoes/image.c:543:32: warning: variable ‘count’ set but not used         [-Wunused-but-set-variable]
       int x, y, w, h, l, i, scans, count, prevy;
                                    ^
    rake aborted!
    Command failed with status (1): [gcc -I. -c -o shoes/image.o -Wall -I/usr/i...]
    /home/Miotti/shoes/Rakefile:214:in `cc'
    /home/Miotti/shoes/Rakefile:222:in `block in <top (required)>'
    Tasks: TOP => default => build => linux:build => old_build => build_os => dist/shoes => dist/libshoes.so => shoes/image.o
    (See full trace by running task with --trace)

我不知道我现在应该做什么。我搜索了这个错误,但我没有找到任何东西。你能帮助我吗?提前致谢。

【问题讨论】:

【参考方案1】:

有一个更新的 Shoes3,你应该试试这个:https://github.com/Shoes3/shoes3 使用说明https://github.com/Shoes3/shoes3/wiki/5.0-Building-Shoes 一旦满足所有依赖项,在 Linux 上应该很容易 (此处提供二进制文件 - Shoes 3.3.1 - http://shoesrb.com/downloads/)

【讨论】:

其实还有一个问题。我已经成功安装了shoes,但是我不得不格式化我的笔记本电脑。现在,当我输入rake 时,它会显示unknown architecture。有时,它还说在pkg-config 中找不到ruby-2.1.pc 文件。有什么想法吗? 不,我确实使用 RVM 安装它。我确实按照上面链接中的所有步骤进行操作。 你安装了哪个红宝石? 我猜是 2.2.4(我现在没有笔记本电脑)。

以上是关于基于 OpenSUSE 构建的鞋子 - Rake 错误的主要内容,如果未能解决你的问题,请参考以下文章

openSUSE 必不可少的构建

在 opensuse 上构建 Python kerberos 扩展失败

在 openSUSE 上从头开始构建 python 3.6.3

切诺基基于 OBS 构建

如何从 netatalk 2.0.5 为 opensuse 11.2 创建 RPM 构建

Mage 类似make&&rake 基于golang 的build 工具