问题描述
接着在此处,使用OpenSUSE Tumbleweed时,无法获取flatpak-builder
来编译子模块依赖项.在使用Vala依赖Gee和GXml在Gnome Builder中开发控制台应用程序时,我首先注意到了这个问题.
Following on from here, when using OpenSUSE Tumbleweed I cannot get flatpak-builder
to compile submodule dependencies. I first noticed this issue when developing a console application within Gnome Builder using the Vala dependencies Gee and GXml.
作为测试,我已经安装了 org.gnome.Books.json 并发出以下命令(如这里):
As a test, I have installed org.gnome.Books.json and issued the following command (as documented here):
$ flatpak-builder --repo=repo books-app org.gnome.Books.json
结果与我在开发自己的应用程序时所观察到的相同,即致命错误:
The outcome is the same as I observed when developing my own application, the fatal error:
Initializing build dir
Committing stage init to cache
Starting build of org.gnome.Books
fuse: failed to exec fusermount: Permission denied
<more stuff>
Cloning into '/home/robin/Projects-CSim/org.gnome.books/.flatpak-builder/build/gnome-online-accounts-1/telepathy-account-widgets'...
Submodule path 'telepathy-account-widgets': checked out '7d944b79961dfb6291110ceb27597a224d329b36'
error: Build directory /home/<user>/Projects/org.gnome.books/.flatpak-builder/rofiles/rofiles-D4R4cZ not initialized, use flatpak build-init
Error: module gnome-online-accounts: module gnome-online-accounts: Child process exited with code 1
实际上,它无法构建第一个子模块.这是我在项目中从Gnome-Builder调用时观察到的相同行为;它下载但未能构建第一个子模块-在这种情况下,它是libgee-0.8.
Effectively it fails to build the very first submodule. This is the same behaviour that I observed when invoked from Gnome-Builder on my project; it downloaded but failed to build the very first submodule - in that case it was libgee-0.8.
我已经在此处仔细检查了Flatpak(V0.10.4)安装,但找不到解决方案.我从文档中了解到,调用flatpak-builder
应该会自动调用flatpak build-init
.
I've double checked the Flatpak (V0.10.4) installation here and cannot find a solution. I understand from the documentation that invoking flatpak-builder
should automatically invoke flatpak build-init
.
这令人担忧,因为Gnome-Builder似乎正在使用Flatpak作为默认打包程序.有什么建议吗?
This is worrisome as Gnome-Builder seems be using Flatpak as the default packager. Any suggestions?
推荐答案
问题不是Flatpak.这是Flatpak与保险丝之间的冲突.出于某种原因,命令行中的valac或介子仅在Flatpak中不会发生这种情况.
The problem is not Flatpak. It is a conflict between Flatpak and fuse. For some reason this was not occuring with valac or meson from the command line, only Flatpak.
来自此处我们找到了解决方案:
From here we find a solution:
# chmod +x /usr/bin/fusermount
这是OpenSUSE Tumbleweed的独特之处吗?无论如何,在进行此更改之后,Flatpak将按预期方式构建子模块.很棒!
Is this a peculiarity of OpenSUSE Tumbleweed? In any case, after making this change, Flatpak builds submodules as expected. Magnificent!
不确定这一点的安全性,但是欢迎提出任何意见.
Not sure about the security aspect of this, however - any comments would be welcomed.
这篇关于Flatpak(flatpak-build)生成子模块时的致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!