Я пытаюсь использовать Yocto с мета-тегрой (https://github.com/madisongh/meta-tegra), чтобы построить минимальную систему для Nvidia Jetson Nano.Мне нужно использовать CUDA (текущая версия 10 для Nano) с OpenCV на этой платформе.CUDA 10 поддерживает только GCC 7, а не GCC 8. GCC 7 устарела и удалена из выпуска OpenEmbedded Warrior в пользу GCC 8.3.Моя ошибка связана с попыткой использовать GCC 7 с выпуском OE для Warrior: configure: error: невозможно вычислить суффикс объектных файлов: не удается скомпилировать
README для мета-тегры устанавливаетследующее:
* 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 deltas от номинала:
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
Как я могу получить этоСкомпилировать?Спасибо.