标签: cross-compilation

Docker CrossCompile Debian build-essential:armhf 未满足的依赖项

我尝试将 VirtualBox VM 移动到 docker 映像。我们使用 VirtualBox 为 armhf 设备(基于 BeagleBone 的东西)交叉编译源代码

我在RUN apt-get install -y build-essential:armhf
完整的 Docker 代码中遇到了问题,如下所示:

FROM debian:jessie

RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y build-essential module-assistant curl git cmake
RUN curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
RUN echo "deb http://emdebian.org/tools/debian jessie main" > /etc/apt/sources.list.d/crosstools.list
RUN dpkg --add-architecture armhf
RUN apt-get update
RUN apt-get install -y crossbuild-essential-armhf
RUN apt-get install -y curl:armhf
RUN apt-get install -y libcurl4-openssl-dev:armhf openssl:armhf 
RUN apt-get install -y …
Run Code Online (Sandbox Code Playgroud)

debian cross-compilation docker

5
推荐指数
1
解决办法
1053
查看次数

交叉编译和本机编译有什么区别

交叉编译和本机编译之间的确切区别是什么?

cross-compilation

4
推荐指数
1
解决办法
1万
查看次数

如何处理使用 GCC 6.2.1 编译 GCC 4.7.0 的错误

我正在使用 Arch linux,我需要 GCC 4.7.0 来上课。

目前我的系统上只安装了 GCC 6.2.1。

我正确地遵循了所有安装说明,但在运行初始make.

$ make
.
.
In file included from /home/flounder/src/gcc-4.7.0/gcc-4.7.0/gcc/cp/except.c:987:0:
cfns.gperf: At top level:
cfns.gperf:101:1: error: ‘gnu_inline’ attribute present on ‘libc_name_p’
cfns.gperf:26:14: error: but not here
.
.
make[3]: *** [Makefile:1055: cp/except.o] Error 1
make[3]: Leaving directory '/home/flounder/src/gcc_compile/gcc'
make[2]: *** [Makefile:4101: all-stage1-gcc] Error 2
make[2]: Leaving directory '/home/flounder/src/gcc_compile'
make[1]: *** [Makefile:19342: stage1-bubble] Error 2
make[1]: Leaving directory '/home/flounder/src/gcc_compile'
make: *** [Makefile:898: all] Error 2
Run Code Online (Sandbox Code Playgroud)

我已经读过,当尝试使用现代版本构建旧版本的 GCC 时,可能会发生这种情况,因为:

GCC 会随着版本的发展增加新的错误,因此旧版本的 …

compiling gcc cross-compilation

4
推荐指数
2
解决办法
5987
查看次数

PS1 Shell 变量的正确位置是什么?

我正在关注从头开始交叉编译的 Linux - Embedded .In [3.3。设置环境],PS1 在文件中声明。.bash_profile实际上它永远不会出现在终端中。

当我登录时su - clfs.bash_profile.bashrc文件都被执行。当我登录时,su clfs只有.bashrc文件被执行。

在这两种情况下,PS1 从未在终端中更新。

当我将 PS1 放入.bashrc文件时,它会更新。

CLFS 书已将其放入.bash_profile文件中,例如:

cat > ~/.bash_profile << "EOF"
exec env -i HOME=${HOME} TERM=${TERM} PS1='\u:\w\$ ' /bin/bash
EOF
Run Code Online (Sandbox Code Playgroud)

那么PS1的合适位置是什么?

linux bash cross-compilation

4
推荐指数
2
解决办法
1637
查看次数

FreeBSD 源码以及如何构建

关于 FreeBSD 的几个问题

  1. 我应该在哪里/如何获取源代码(例如通过终端、从网站下载)

  2. 我应该如何(在 ubuntu 上)构建它?

  3. 在构建它之前我可以自定义它(换句话说是可能的)吗?

freebsd compiling kernel cross-compilation

3
推荐指数
1
解决办法
3574
查看次数

机器内存不足时如何编译?

我有一个低端 VPS,它设置了 ZNC 作为 IRC 弹跳器,它运行得很好,它有大约 128 MB 的闪存,这不足以编译我想要使用的模块之一znc-push

尝试在 virtualbox 上编译并发送文件后,当我尝试加载模块时收到“无效的 ELF 标头”错误。如何远程编译这个模块然后发送它?它有足够的内存来运行它,但不会编译它,我已经研究过使用 distcc,但我找不到任何关于如何使用它的可靠信息。

另外,我尝试创建一个交换文件,但是这个 VPS 不允许/不可能。

compiling irc cross-compilation vps

3
推荐指数
1
解决办法
2923
查看次数

通过 SSH 卸载编译?

我有一台正在运行 Gentoo 的 Chromebook。当我尝试编译任何东西时,CPU 使用率飙升至 100%,温度升高约 10 摄氏度,电池使用率飙升(4.XW -> 10 W),这是一个缓慢的过程。但我也有一台 Arch Linux 计算机正在运行,我可以通过 SSH 连接到它。它们都是 x86_64 CPU。有什么方法可以通过 SSH 将编译的东西(Linux 内核、日常包等)卸载到 Arch Linux 机器上?我以前没有做过这样的事情。可能需要交叉编译吗?

compiling ssh arch-linux gentoo cross-compilation

3
推荐指数
1
解决办法
953
查看次数

如何交叉编译Linux内核?

我花了几个小时甚至几天的时间来弄清楚如何为 AArch64 交叉编译 Linux。

我在虚拟机中使用 Ubuntu 来执行此操作,但是我找到的所有指南都不能完全正常工作。他们中的大多数人假设最终用户拥有 Debian,并且那里的名称有所不同。一旦我能够获得要制作的配置文件,但我无法使用它。当我输入 时make,我收到了一份针对基于 x86 的系统的调查问卷,尽管我已经使用 menuconfig 保存了配置文件。然后我指定了ARCHCROSS_COMPILE参数,然后我得到了另一份调查问卷,跳过了很多对我的构建目标至关重要的事情。

然后我的 Ubuntu VM 需要重新安装,所以我几乎回到了零,不知道我需要安装什么才能让交叉编译工作,也不知道我如何指定参数CROSS_COMPILE。我已经安装了编译器(花了几个小时才弄清楚它在 Ubuntu 下是如何调用的),但是当需要指定交叉编译时它有不同的名称。也许我跳过了一些东西。

是的,我已经多次用谷歌搜索过它,大多数指南都假设用户知道很多相当晦涩的东西。他们中的许多人甚至已经十多岁了。

kernel cross-compilation

3
推荐指数
1
解决办法
9360
查看次数

主机和目标机

在配置交叉编译器时,有人能解释一下主机代表什么,目标机器代表什么吗?

cross-compilation

1
推荐指数
1
解决办法
500
查看次数

/usr/bin/install: 无法 stat `run': 没有这样的文件或目录

我尝试使用此RSDK 工具链构建嵌入式软件,但之后make menuconfig出现make以下错误

make[7]: Entering directory `/mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/sim/mips'
/bin/sh ../.././sim/mips/../../mkinstalldirs /mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/../gdb-host/bin
mkdir -p -- /mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/../gdb-host/bin
/bin/sh ../.././sim/mips/../../mkinstalldirs /mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/../gdb-host/lib
n=`echo run | sed 's,^,mips-linux-,'`; \
    /usr/bin/install -c run /mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/../gdb-host/bin/$n
/usr/bin/install: cannot stat `run': No such file or directory
make[7]: *** [install-common] Error 1
make[7]: Leaving directory `/mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/sim/mips'
make[6]: *** [install] Error 1
make[6]: Leaving directory `/mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8/sim'
make[5]: *** [install-sim] Error 2
make[5]: Leaving directory `/mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8'
make[4]: *** [install] Error 2
make[4]: Leaving directory `/mnt/hgfs/A/rtl819x-toolchain/users/gdb/gdb-6.8'
make[3]: *** …
Run Code Online (Sandbox Code Playgroud)

linux cross-compilation error-handling

1
推荐指数
1
解决办法
1万
查看次数

为什么我静态编译的 BusyBox ARM 二进制文件可以在我的 x86_64 PC 上运行?

那里的情况有点奇怪。我为 ARM 平台(32 位)编译了 BusyBox 1.32.1 的静态可执行文件,奇怪的是它在两个平台上都没有问题。自己看:

root@smallbuntu /m/n/b/i/n/rootfs# readelf -h bin/busybox-initrd
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x1f419
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1482800 (bytes into file)
  Flags:                             0x5000002, Version5 …
Run Code Online (Sandbox Code Playgroud)

busybox cross-compilation

1
推荐指数
1
解决办法
55
查看次数