Linux Nvidia Jetson的Yocto因GCC 7而失败-无法计算对象文件的后缀 我试图用YOTCTO和Meta TeGRA()来为英伟达JETSON纳米构建一个最小的系统。我需要在这个平台上使用CUDA(Nano的当前版本10)和OpenCV。CUDA 10只支持GCC 7,不支持GCC 8。GCC 7已被弃用,并从OpenEmbedded Warrior版本中删除,取而代之的是GCC 8.3。我的错误与试图在OE的Warrior版本中使用GCC 7有关:configure:error:cannotcompute-suffix-of-object-files:cannot compile

Linux Nvidia Jetson的Yocto因GCC 7而失败-无法计算对象文件的后缀 我试图用YOTCTO和Meta TeGRA()来为英伟达JETSON纳米构建一个最小的系统。我需要在这个平台上使用CUDA(Nano的当前版本10)和OpenCV。CUDA 10只支持GCC 7,不支持GCC 8。GCC 7已被弃用,并从OpenEmbedded Warrior版本中删除,取而代之的是GCC 8.3。我的错误与试图在OE的Warrior版本中使用GCC 7有关:configure:error:cannotcompute-suffix-of-object-files:cannot compile,linux,bash,cuda,nvidia,yocto,Linux,Bash,Cuda,Nvidia,Yocto,meta tegra自述文件说明如下: * CUDA 10 supports up through gcc 7 only, and some NVIDIA-provided binary libraries appear to be compiled with g++ 7 and cause linker failures when building applications with g++ 6, so **only** gcc 7 should be used if you in

meta tegra自述文件说明如下:

* CUDA 10 supports up through gcc 7 only, and some NVIDIA-provided
  binary libraries appear to be compiled with g++ 7 and cause linker
  failures when building applications with g++ 6, so **only** gcc 7
  should be used if you intend to use CUDA. (For Jetson-TK1, CUDA 6.5
  supports up through gcc 5.x only.)

Selecting the toolchain version
-------------------------------

Toolchain version selection is usually a distro configuration setting,
but you can also set this in your build/conf/local.conf file. To use
gcc 7 instead of gcc 8, set:

GCCVERSION = "7.%"

but you will also need the gcc 7 toolchain recipes in one of your layers,
since it was retired from OE-Core in favor of gcc 8.
我已经在全新的Ubuntu 16.04和Ubuntu 18.04上尝试了以下脚本。两台计算机都失败,出现相同错误:

# Get current directory
cwd=$PWD

# Yocto build script
cd ~/Desktop
rm -rf dev-jetson-yocto
mkdir -p dev-jetson-yocto/layers
cd dev-jetson-yocto/layers
git clone https://git.yoctoproject.org/git/poky -b warrior
git clone https://github.com/openembedded/meta-openembedded.git -b warrior
git clone https://github.com/meta-qt5/meta-qt5.git -b warrior
git clone https://github.com/madisongh/meta-tegra.git -b warrior
git clone https://git.linaro.org/openembedded/meta-linaro.git -b warrior
cd ../
. layers/poky/oe-init-build-env build
bitbake-layers add-layer ../layers/meta-openembedded/meta-oe
bitbake-layers add-layer ../layers/meta-openembedded/meta-multimedia
bitbake-layers add-layer ../layers/meta-openembedded/meta-python
bitbake-layers add-layer ../layers/meta-openembedded/meta-networking
bitbake-layers add-layer ../layers/meta-linaro/meta-linaro
bitbake-layers add-layer ../layers/meta-linaro/meta-linaro-toolchain
bitbake-layers add-layer ../layers/meta-linaro/meta-linaro-integration
bitbake-layers add-layer ../layers/meta-linaro/meta-aarch64
bitbake-layers add-layer ../layers/meta-tegra
bitbake-layers add-layer ../layers/meta-qt5
cp $cwd/local.conf conf/local.conf
mkdir -p downloads/sdkm_downloads
rsync -av --progress $cwd/nvidia-sources/* downloads/sdkm_downloads
echo 'NVIDIA_DEVNET_MIRROR = "file://sdkm_downloads"' >> conf/local.conf
MACHINE=jetson-nano bitbake core-image-full-cmdline
标称值的Local.conf增量:

CONF_VERSION = "1"
IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash"
GCCVERSION = "linaro-7.2"
SDKGCCVERSION = "linaro-7.2"

NVIDIA_DEVNET_MIRROR = "file://sdkm_downloads"
错误:

| checking build system type... x86_64-pc-linux-gnu
| checking host system type... aarch64-poky-linux-gnu
| checking for --enable-version-specific-runtime-libs... no
| checking for a BSD-compatible install... /home/user/Desktop/dev-jetson-yocto/build/tmp/hosttools/install -c
| checking for gawk... gawk
| checking for aarch64-poky-linux-ar... aarch64-poky-linux-gcc-ar
| checking for aarch64-poky-linux-lipo... no
| checking for lipo... no
| checking for aarch64-poky-linux-nm... aarch64-poky-linux-nm
| checking for aarch64-poky-linux-ranlib... aarch64-poky-linux-gcc-ranlib
| checking for aarch64-poky-linux-strip... aarch64-poky-linux-strip
| checking whether ln -s works... yes
| checking for aarch64-poky-linux-gcc... aarch64-poky-linux-gcc  -march=armv8-a+crc -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/user/Desktop/dev-jetson-yocto/build/tmp/work/aarch64-poky-linux/libgcc-initial/linaro-7.2-r2017.11/recipe-sysroot
| checking for suffix of object files... configure: error: in `/home/user/Desktop/dev-jetson-yocto/build/tmp/work/aarch64-poky-linux/libgcc-initial/linaro-7.2-r2017.11/gcc-linaro-7.2-2017.11/build.aarch64-poky-linux.aarch64-poky-linux/libgcc':
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log' for more details.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/user/Desktop/dev-jetson-yocto/build/tmp/work/aarch64-poky-linux/libgcc-initial/linaro-7.2-r2017.11/temp/log.do_configure.17732)
ERROR: Task (/home/user/Desktop/dev-jetson-yocto/layers/meta-linaro/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-7.2.bb:do_configure) failed with exit code '1'
Waiting for 1 running tasks to finish:
0: qemu-native-3.1.0-r0 do_compile - 100

我怎样才能编译这个?谢谢。

我也遇到了同样的问题,经过快速调查,我发现失败的原因是gcc7中不存在标记
-fmacro debug prefix

变量
DEBUG\u PREFIX\u MAP
bitbake.conf
中使用它,如果将其设置为不包含
local.conf
中的标志,则问题将消失(可能会出现其他问题:p)


我不是Yocto的专家,所以这样的更改可能会产生意想不到的副作用(可能调试过程中的路径会出错)。

不是使用外部工具链,而是将gcc7配方向后移植到Warrior?