1

我在使用 Scratchbox 时遇到以下错误,请进行安装

$ cd $HOME/sbox2/src
$ git clone git://gitorious.org/scratchbox2/scratchbox2.git
$ cd scratchbox2
$ git checkout 2.3.90 -b devel_env
$ ./autogen.sh
$ ./configure --prefix=$HOME/sbox2/bin/scratchbox
$ make install

make install 后我得到的错误:---

ignite@ignite:~/sbox2/src/scratchbox2$ make install
make[1]: Entering directory `/home/ignite/sbox2/src/scratchbox2'
echo "/* Automatically generated file. Do not edit. */" >include/scratchbox2_version.h
echo '#define SCRATCHBOX2_VERSION "'`cat .version`'"' >>include/scratchbox2_version.h
echo '#define LIBSB2_SONAME "'"libsb2.so.1"'"' >>include/scratchbox2_version.h
[CC] sblib/sb_log.o
[ARCHIVE] sblib/libsblib.a
[SHLIB] preload/libsb2.so
[CC] utils/sb2dctl.o
In file included from /usr/include/i386-linux-gnu/sys/socket.h:251:0,
                 from /usr/include/netinet/in.h:25,
                 from utils/sb2dctl.c:25:
utils/sb2dctl.c: In function ‘recvfrom_nomap_nolog’:
/usr/include/i386-linux-gnu/bits/socket2.h:65:1: error: inlining failed in call to always_inline ‘recvfrom’: mismatched arguments
utils/sb2dctl.c:166:2: error: called from here
make[1]: *** [utils/sb2dctl.o] Error 1
make[1]: Leaving directory `/home/ignite/sbox2/src/scratchbox2'
make: *** [regular] Error 2

请建议我该如何解决。

4

1 回答 1

0

尝试通过编辑 utils/Makefile 的第 28 行在 CFLAGS 之后添加 -O0(即减去大写-哦零)来关闭 sb2dctl 上的 gcc 优化,如下所示。

# sb2dctl, a tool for communicating with sb2d
$(D)/sb2dctl: override CFLAGS := $(CFLAGS) -O0 -Wall -W -Werror \

在 Ubuntu 12.10 64bit 上使用 gcc 4.7.2 及更高版本对我有用。可能是由 gcc 内联错误引起的。

于 2013-02-11T20:21:04.897 回答