【问题标题】:raspberry: icecc and mixing native gcc compiler with gcc cross compiler覆盆子:icecc 并将本机 gcc 编译器与 gcc 交叉编译器混合
【发布时间】:2020-11-15 00:33:47
【问题描述】:

我正在使用 slurm 和 icecc 设置树莓派 4B 集群。
我还想添加 x86_64 linux 节点(异构集群 - 但在所有节点上运行 ubuntu 64 位)。
'icecc' 现在正在为覆盆子工作。
下一步是添加 x86_64 linux 节点以使用交叉编译器进行分布式编译。
交叉编译器已经在 x86_64 上可用。但是icecc-scheduler(在x86_64上运行并且目前仅在覆盆子之间分发)没有使用它。可能是因为版本不同或可执行文件名不同?

覆盆子

ubuntu@raspi-4B-02:/var/cache$ /usr/bin/aarch64-linux-gnu-g++-9 --version
aarch64-linux-gnu-g++-9 (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

x86_64

frank@frank-M470-2:~$ /usr/bin/aarch64-linux-gnu-g++ --version
aarch64-linux-gnu-g++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我是否需要为 x86_64 编译 9.3.0 "aarch64-linux-gnu-" 交叉编译器并在 x86_64 上将其命名为 /usr/bin/aarch64-linux-gnu-g++-9 ? (或者最好安装在 /opt/linux/... 上的所有 机器上,以免与包管理冲突)。
或者我可以暂时限制到 7.5.0 编译器功能并使用编译器版本的组合吗?

【问题讨论】:

    标签: gcc raspberry-pi cross-compiling


    【解决方案1】:
    1. 如果还不存在:临时添加到 /etc/apt/sources.list

      deb http://de.archive.ubuntu.com/ubuntu groovy main

    2. 安装

      sudo apt-get install g++-9-aarch64-linux-gnu

    3. 如果您添加了 1):再次删除它

    4. 检查

    x86_64

    frank@frank-M470-2:~$ /usr/bin/aarch64-linux-gnu-g++-9 --version
    aarch64-linux-gnu-g++-9 (Ubuntu 9.3.0-13ubuntu1) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    1. 使用'icecc-create-env'构建远程编译的构建环境:

      icecc-create-env --gcc /usr/bin/aarch64-linux-gnu-gcc-9 /usr/bin/aarch64-linux-gnu-g++-9

    2. 在 raspberry 上复制构建环境并通过 env var 使用它:

      导出 ICECC_VERSION="x86_64:/mnt/clusterfs/CROSS/aarch64-x86_64.tar.gz"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-05
      • 2017-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-08
      相关资源
      最近更新 更多