问题描述
Makefile:588: *** qt5base is in the dependency chain of DWKeyboard that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in. Stop.
这里使用的是飞凌的源码,在编译QT5.15+Linux5.10.149
时出现的问题。
解决过程
使用./build.sh buildroot_menuconfig
发现qt5_base
没有打开,但是打开QT5需要编译工具链大于5,且宿主设备的GCC也要大于5。
先设置交叉编译工具链:
然后升级宿主机器(虚拟机中的ubuntu
)的GCC:
sudo apt install gcc-10
并且参考该链接:https://blog.csdn.net/m0_60027682/article/details/127007758
,替换自己的gcc
:
which gcc-10
# /usr/bin/gcc-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
sudo update-alternatives --display gcc
#gcc - 自动模式
# 最佳链接版本为 /usr/bin/gcc-10
# 链接目前指向 /usr/bin/gcc-10
# 链接 gcc 指向 /usr/bin/gcc
#/usr/bin/gcc-10 - 优先级 100
#/usr/bin/gcc-4.8 - 优先级 20
sudo update-alternatives --config gcc
# 选择自己gcc-10
gcc -v
可以看到GCC版本问题都已经是y
。
接着开启上面仍然为开启的配置:
BR2_INSTALL_LIBSTDCPP
BR2_TOOLCHAIN_BUILDROOT_CXX
BR2_USE_WCHAR
BR2_TOOLCHAIN_USES_GLIBC
BR2_TOOLCHAIN_BUILDROOT_GLIBC
搞定以上几个应该BR2_PACKAGE_QT5
可以选中了:
接着:
./build.sh buildroot_saveconfig
然后继续编译buildroot
。
继续报错:
Makefile:588: *** qt5svg is in the dependency chain of DWKeyboard that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in. Stop.
同上开启qt5svg
:
我们选一组:
BR2_PACKAGE_QT5VIRTUALKEYBOARD
记得保存./build.sh buildroot_saveconfig。
继续报错:
qt5serialport is in the dependency chain of terminal_gui that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in. Stop.
这里就不再演示了。