1

I tried to build Chromium on my Ubuntu 10.04 with the cmd, ninja -v -C out/Debug chrome. But I got this error, and found nothing by googling related information.

I've followed the instructions on http://code.google.com/p/chromium/wiki/LinuxBuildInstructions before building. Could someone help me if you know how to resovle this? Thanks a lot.

In file included from obj/build/linux/gio.gen/libgio_loader.cc:4:
../../out/Debug/gen/library_loaders/libgio.h:28: error: ‘::g_settings_new’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:29: error: ‘::g_settings_get_child’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:30: error: ‘::g_settings_get_string’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:31: error: ‘::g_settings_get_boolean’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:32: error: ‘::g_settings_get_int’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:33: error: ‘::g_settings_get_strv’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:34: error: ‘::g_settings_list_schemas’ has not been declared
obj/build/linux/gio.gen/libgio_loader.cc: In member function ‘bool LibGioLoader::Load(const std::string&)’:
obj/build/linux/gio.gen/libgio_loader.cc:42: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:56: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:70: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:84: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:98: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:112: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:126: error: cast from ‘void*’ to ‘int’ loses precision
ninja: build stopped: subcommand failed.
4

2 回答 2

1

https://codereview.chromium.org/21687002

既然我们正在使用 Ubuntu Precise,请删除捆绑的 gsettings 标头。您可以使用 12.04 构建

于 2013-08-09T09:32:38.707 回答
0

我也面临同样的问题。进一步挖掘,我发现最新版本的 GTK 没有上述 API。请按照以下步骤在 Ubuntu 10.04 上构建 Chromium:

  1. 下载旧版本的 GTK,例如。来自http://ftp.gnome.org/pub/gnome/sources/glib/2.38/glib-2.38.2.tar.xz
  2. 提取、配置、编译和安装它。
  3. 重新生成您的 Chromium 项目
  4. 使用 ninja -C out/Debug chrome 再次构建
于 2013-11-27T05:08:51.413 回答