我在一台x86_64-linux-gnu机器上,试图使用自动工具从源代码中构建一个来自arm-linux-gnueabihf (Raspberry Pi3)的快照。
我成功地构建了快照,但是在上传到商店之后,它总是说支持的体系结构是:
支持的体系结构amd64
我的snapcraft.yaml看起来是这样的:
name: hellocsnap
version: '1.17'
summary: Hello World snap written in C
description: This snap says hello and adds 2 numbers.
grade: stable
confinement: strict
apps:
hello:
command: hellocsnap
parts:
test-hellocsnap:
plugin: autotools
configflags:
- --build=x86_64-linux-gnu
- --host=arm-linux-gnueabihf
source: source/在运行snapcraft时,我得到以下错误:
Priming test-hellocsnap
Unable to determine library dependencies for b' /home/..../prime/bin/hellocsnap'有谁知道如何在amd64上为Raspberry Pi打包一个快照呢?
发布于 2017-03-03 18:59:32
我很肯定我在某个地方读到了“快照”还没有为不同的体系结构提供交叉编译代码的选项。
我想做同样的事情,但不知道如何使用自动工具来完成它。相反,我使用eclipse构建我的项目,并将其配置为为armhf构建。后来,我将可执行文件和应用程序所需的一切放在一个文件夹中,并使用了plugin: dump而不是plugin: autotools。如果计划将architectures: [armhf]添加到Ubuntu商店,则需要添加它。我得到了和你一样的消息,但我已经测试了代码,没有了快照,我知道我打包了我需要的一切,所以我忽略了它。
或者,您可以查看启动板,它可以帮助您为各种环境构建它。
发布于 2019-03-29 03:24:56
我确实跑了:快照构建-目标-拱门=armhf
它从头到尾都没有出错。但是,它没有像预期的那样创建一个hello_2.10_armhf.snap包。
snapcraft.yaml:
name: hello
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: devel
confinement: devmode
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotoolshttps://askubuntu.com/questions/880035
复制相似问题