活动介绍
file-type

构建脚本指南:如何从零开始安装libc++和libc++abi

ZIP文件

下载需积分: 50 | 9KB | 更新于2025-01-29 | 90 浏览量 | 1 下载量 举报 收藏
download 立即下载
标题和描述中涉及了多个IT相关的知识点,主要包括了构建脚本、编程语言标准库、依赖关系管理、操作系统兼容性以及工具链配置等。以下是详细的知识点说明: 1. libc++ 和 libc++abi 的含义与关系: - libc++ 是 C++ 标准库的一个实现,由 LLVM 项目维护。它提供了支持 C++ 标准定义的所有功能。 - libc++abi 主要用于与操作系统的底层接口相交互,例如异常处理(EH)和程序启动过程(ABI)。 - 这两个库通常一起使用,因为 libc++ 依赖于 libc++abi 来实现一些基础功能。 2. 生成脚本的作用: - 脚本是一种自动化命令的程序,可以用最少的用户输入完成重复性任务。 - 这里的生成脚本用于自动化构建过程,允许用户从源代码开始构建 libc++ 和 libc++abi。 3. 脚本的目标平台与架构: - 脚本支持 x86-64 和 ARM 架构。 - 支持 ARM EHABI(Exception Handling ABI),这是处理异常的一种特定于 ARM 架构的接口。 4. 环境依赖与兼容性: - 脚本已经在 Debian Wheezy 和 Ubuntu 14.04 主机上测试通过,这意味着它们主要兼容基于 Debian 的 Linux 发行版。 - 要在其他平台上使用这些脚本,可能需要进行适当的修改,以适应不同的环境和工具链配置。 5. 必需的构建工具: - 为了使用构建脚本,用户需要安装 bintuils、gcc、g++、cmake 和 clang。 - 这些工具是构建过程中的依赖,例如 gcc 和 g++ 是 GNU 编译器集合,用于编译 C 和 C++ 代码。 - cmake 是一种跨平台的自动化构建系统,用于管理编译过程并生成原生构建环境。 - clang 是另一种编译器,通常用于编译 C 和 C++ 代码,并且与 LLVM 紧密集成。 6. 工具链的版本要求: - 特别提到了 clang 编译器的版本要求是 3.5 或更高版本。工具链的版本要求是构建过程中经常需要考虑的问题,因为新版本的编译器可能会包含对最新标准的改进和对旧代码的错误修正。 7. 操作系统特定的配置(Debian Wheezy): - 文中提到了对 Debian Wheezy 系统的配置说明,提示用户需要将特定的源添加到 /etc/apt/sources.list 文件中。 - 这里的特定源是指 Emdebian,这是一个专门用于交叉编译的 GCC 工具链的 Debian 仓库。 综上所述,文件描述了如何使用 Shell 脚本自动化构建 libc++ 和 libc++abi 的过程,同时指出了构建所需的依赖环境、版本要求和平台兼容性信息。这些脚本对 C++ 开发者和想要深入理解 C++ 标准库实现的人员来说非常有用,可以帮助他们在不同的硬件架构上部署 C++ 应用程序。

相关推荐

filetype

E:\LSHVR\pc-ble-driver-master\build>cmake -G "Visual Studio 17 2022" -A x64 .. -- NRF_BLE_DRIVER_VERSION not specified, setting it to 0.0.0 -- CONNECTIVITY_VERSION not specified, setting it to 0.0.0 -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.44.35211.0 -- The CXX compiler identification is MSVC 19.44.35211.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: E:/MSVS2022/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: E:/MSVS2022/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Architecture not set, using native 64-bit toolchain. -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.45.1.windows.1") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE CMake Error at test/CMakeLists.txt:11 (find_package): Could not find a package configuration file provided by "spdlog" with any of the following names: spdlogConfig.cmake spdlog-config.cmake Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set "spdlog_DIR" to a directory containing one of the above files. If "spdlog" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred!是什么意思

filetype

添加之后还有报错huaxi@ubuntu:~/openwrt/openwrt-15.05.1$ make package/shared_memory/{clean,compile,install} V=s make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' rm -f /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/shared_memory_* rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/packages/.list /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/packages/.list rm -rf /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 cp -fpR -u ./src/* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.prepared_d1b905142a8095dca803c611f8f12ccc rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/./; if [ -x ./configure ]; then find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.guess; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.sub; AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CPPFLAGS="-I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; ) rm -f /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_* touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_yyy CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " make -j1 -C /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/. AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CROSS="arm-openwrt-linux-uclibcgnueabi-" ARCH="arm" ; make[3]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' arm-openwrt-linux-uclibcgnueabi-gcc -Wall A.c -o sender cc1: note: someone does not honour COPTS correctly, passed 0 times In file included from A.c:17:0: shm_comm.h: In function 'calculate_checksum': shm_comm.h:74:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < len; i++) { ^ shm_comm.h:74:5: note: use option -std=c99 or -std=gnu99 to compile your code Makefile:10: recipe for target 'sender' failed make[3]: *** [sender] Error 1 make[3]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' Makefile:31: recipe for target '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built' failed make[2]: *** [/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built] Error 2 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' package/Makefile:191: recipe for target 'package/shared_memory/compile' failed make[1]: *** [package/shared_memory/compile] Error 2 make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' /home/huaxi/openwrt/openwrt-15.05.1/include/toplevel.mk:181: recipe for target 'package/shared_memory/compile' failed make: *** [package/shared_memory/compile] Error 2 huaxi@ubuntu:~/openwrt/openwrt-15.05.1$ make package/shared_memory/{clean,compile,install} V=s Collecting package info: done make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' rm -f /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/shared_memory_* rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/packages/.list /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/packages/.list rm -rf /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 cp -fpR -u ./src/* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.prepared_d1b905142a8095dca803c611f8f12ccc rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/./; if [ -x ./configure ]; then find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.guess; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.sub; AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99 " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99 " CPPFLAGS="-I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; ) rm -f /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_* touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_yyy CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99 -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99 -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " make -j1 -C /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/. AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -std=c99" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CROSS="arm-openwrt-linux-uclibcgnueabi-" ARCH="arm" ; make[3]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' arm-openwrt-linux-uclibcgnueabi-gcc -Wall A.c -o sender cc1: note: someone does not honour COPTS correctly, passed 0 times In file included from A.c:17:0: shm_comm.h: In function 'calculate_checksum': shm_comm.h:74:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < len; i++) { ^ shm_comm.h:74:5: note: use option -std=c99 or -std=gnu99 to compile your code Makefile:10: recipe for target 'sender' failed make[3]: *** [sender] Error 1 make[3]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' Makefile:32: recipe for target '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built' failed make[2]: *** [/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built] Error 2 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' package/Makefile:191: recipe for target 'package/shared_memory/compile' failed make[1]: *** [package/shared_memory/compile] Error 2 make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' /home/huaxi/openwrt/openwrt-15.05.1/include/toplevel.mk:181: recipe for target 'package/shared_memory/compile' failed make: *** [package/shared_memory/compile] Error 2

filetype

Setting build type to 'Release' as none was specified. Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100. The C compiler identification is MSVC 19.41.34123.0 The CXX compiler identification is MSVC 19.41.34123.0 Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working C compiler: D:/visual studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped Detecting C compile features Detecting C compile features - done Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Check for working CXX compiler: D:/visual studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped Detecting CXX compile features Detecting CXX compile features - done Setting global options Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) Found TIFF: D:/anaconda/Library/lib/cmake/tiff (found version "4.5.1") Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Looking for sgemm_ Looking for sgemm_ - not found Performing Test CMAKE_HAVE_LIBC_PTHREAD Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed Looking for pthread_create in pthreads Looking for pthread_create in pthreads - not found Looking for pthread_create in pthread Looking for pthread_create in pthread - not found Found Threads: TRUE Could NOT find BLAS (missing: BLAS_LIBRARIES) Could NOT find LAPACK (missing: LAPACK_LIBRARIES) Reason given by package: LAPACK could not be found because dependency BLAS could not be found. Could NOT find BLAS (missing: BLAS_LIBRARIES) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find FFTW (missing: FFTW_INCLUDE_DIRS) Performing Test COMPILER_HAS_DEPRECATED_ATTR Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed Performing Test COMPILER_HAS_DEPRECATED Performing Test COMPILER_HAS_DEPRECATED - Success Setting matplotplusplus compiler options Looking for __fbufsize Looking for __fbufsize - not found CMAKE_INSTALL_PREFIX=C:/Program Files/Matplot++ CMAKE_INSTALL_LIBDIR=lib Configuring done (39.8s)请问我这个结果是否成功配置好

filetype

报错如下:Requirement already satisfied: python-dateutil>=2.5.0 in d:\anaconda3\lib\site-packages (from pandas->datasets) (2.7.3) Requirement already satisfied: pytz>=2011k in d:\anaconda3\lib\site-packages (from pandas->datasets) (2018.5) Requirement already satisfied: six>=1.5 in d:\anaconda3\lib\site-packages (from python-dateutil>=2.5.0->pandas->datasets) (1.11.0) Building wheels for collected packages: safetensors Building wheel for safetensors (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for safetensors (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [41 lines of output] Running `maturin pep517 build-wheel -i d:\anaconda3\python.exe --compatibility off` 馃嵐 Building a mixed python/rust project 馃敆 Found pyo3 bindings with abi3 support for Python 鈮\xa5 3.8 馃摗 Using build options features, bindings from pyproject.toml Compiling target-lexicon v0.12.16 Compiling once_cell v1.20.3 Compiling proc-macro2 v1.0.93 Compiling unicode-ident v1.0.17 Compiling autocfg v1.4.0 Compiling libc v0.2.170 Compiling serde v1.0.218 Compiling serde_json v1.0.139 Compiling heck v0.5.0 Compiling itoa v1.0.14 Compiling memchr v2.7.4 Compiling ryu v1.0.19 Compiling unindent v0.2.3 Compiling cfg-if v1.0.0 Compiling indoc v2.0.5 Compiling memmap2 v0.9.5 Compiling memoffset v0.9.1 Compiling quote v1.0.38 Compiling syn v2.0.98 Compiling pyo3-build-config v0.23.5 error: failed to run custom build command for `pyo3-build-config v0.23.5` Caused by: process didn't exit successfully: `C:\Users\LENOVO\AppData\Local\Temp\pip-install-ogzmgg8g\safetensors_50fcc1da09bc471f8c4dd918bb0737da\bindings\python\target\release\build\pyo3-build-config-5fdab4ccd5b5a8ac\build-script-build` (exit code: 1) --- stdout cargo:r

filetype

cmake_minimum_required(VERSION 3.20) project(OPEN_SOURCE_OPENWRT) include(${CONFIG_CMAKE_DIR}/toolchains/${CONFIG_TOOLCHAIN_LINUX_APP}.cmake) set(CONFIG_OPENSRC_LINUX_VERSION 5.10) set(CONFIG_PRIVATE_C_LIB_DIR ${CONFIG_PUBLIC_COMPILE_FLAGS_CPU} ${CONFIG_PUBLIC_COMPILE_FLAGS_FLOAT_ABI} ${CONFIG_PUBLIC_COMPILE_FLAGS_FPU} ) set(CONFIG_RUNTIME_LIB_DIR ${CONFIG_RUNTIME_LIB_CPU} ${CONFIG_RUNTIME_LIB_FLOAT_ABI} ${CONFIG_RUNTIME_LIB_FPU} ) if(CONFIG_RUNTIME_LIB_DIR) set(CONFIG_PRIVATE_C_LIB_DIR ${CONFIG_RUNTIME_LIB_DIR}) endif() string(REPLACE ";" "_" CONFIG_PRIVATE_C_LIB_DIR "${CONFIG_PRIVATE_C_LIB_DIR}") set(HI_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/openwrt) set(LIST_LINK_SOURCES config dl feeds include package toolchain tools Makefile rules.mk Config.in feeds.conf.default ) add_custom_target(prebuild_openwrt DEPENDS prebuild_${CONFIG_TOOLCHAIN_NAME} COMMAND ${CMAKE_COMMAND} -E rm -rf ${HI_VERSION_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${HI_VERSION_DIR} ) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openwrt_patch) foreach(each ${LIST_LINK_SOURCES}) add_custom_command(TARGET prebuild_openwrt COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/${each} ${each} COMMENT "create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/${each} ${each}" WORKING_DIRECTORY ${HI_VERSION_DIR} ) endforeach() add_custom_command(TARGET prebuild_openwrt COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/target ./target COMMAND [ -d ${CMAKE_CURRENT_SOURCE_DIR}/staging_dir ] && cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/staging_dir ./staging_dir || true COMMAND [ -d ${CMAKE_CURRENT_SOURCE_DIR}/build_dir ] && cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/build_dir ./build_dir || true COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/scripts ./scripts COMMENT "copy generate file directory" WORKING_DIRECTORY ${HI_VERSION_DIR} ) else() if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openwrt-22.03.6.tar.gz) add_custom_command(TARGET prebuild_openwrt COMMAND mkdir -p ${HI_VERSION_DIR}/openwrt_patch COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/* ${HI_VERSION_DIR}/openwrt_patch/ COMMAND cd ${HI_VERSION_DIR}/openwrt_patch && ./apply_patch.sh COMMENT "apply openwrt patch" WORKING_DIRECTORY ${HI_VERSION_DIR} ) else() add_custom_command(TARGET prebuild_openwrt COMMAND [ ! -d ${CMAKE_CURRENT_SOURCE_DIR}/dl ] && mkdir ${CMAKE_CURRENT_SOURCE_DIR}/dl || true COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/dl ${HI_VERSION_DIR}/dl COMMAND ls ${CMAKE_CURRENT_SOURCE_DIR}/ | grep -vE "^dl$" | xargs -i cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/{} ${HI_VERSION_DIR} COMMAND cd ${HI_VERSION_DIR} && ./apply_patch.sh COMMENT "apply openwrt patch" WORKING_DIRECTORY ${HI_VERSION_DIR} ) endif() endif() if("ON" IN_LIST CONFIG_KASAN) add_custom_command(TARGET prebuild_openwrt COMMAND cp -f patches-${CONFIG_OPENSRC_LINUX_VERSION}/kasan/*.patch patches-${CONFIG_OPENSRC_LINUX_VERSION}/ COMMAND cat patches-${CONFIG_OPENSRC_LINUX_VERSION}/kasan/defconfig >> ${CONFIG_CHIP_NAME}/${CONFIG_CHIP_NAME}_${CONFIG_PRODUCT_NAME}_config-${CONFIG_OPENSRC_LINUX_VERSION} WORKING_DIRECTORY ${HI_VERSION_DIR}/target/linux/hisilicon ) endif() add_custom_command(TARGET prebuild_openwrt COMMAND cp -f target/linux/hisilicon/${CONFIG_CHIP_NAME}/${CONFIG_CHIP_NAME}_${CONFIG_PRODUCT_NAME}_config-5.10 target/linux/hisilicon/${CONFIG_CHIP_NAME}/config-5.10 COMMAND [ ${CONFIG_CHIP_NAME} = luofu ] && [ ${CONFIG_PRODUCT_NAME} = wrt_ax3000_lite ] && rm -f target/linux/hisilicon/base-files/etc/init.d/nft2ipset || true COMMAND cp -f target/linux/hisilicon/defconfig/openwrt_hsan_${CONFIG_CHIP_NAME}_${CONFIG_PRODUCT_NAME}_defconfig .config COMMAND echo 'CONFIG_TOOLCHAIN_ROOT=\"${CONFIG_TOOLCHAIN_ROOT}\"' >> .config && echo 'CONFIG_LIBC_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_LIBGCC_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_LIBSTDCPP_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_LIBPTHREAD_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_LIBRT_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_LIBATOMIC_ROOT_DIR=\"${CONFIG_CROSS_COMPILE_LIB_DIR}/${CONFIG_PRIVATE_C_LIB_DIR}\"' >> .config && echo 'CONFIG_TOOLCHAIN_PREFIX=\"${CONFIG_TOOLCHAIN_PREFIX}\"' >> .config && echo 'CONFIG_TARGET_NAME=\"${CONFIG_TOOLCHAIN_NAME}\"' >> .config COMMAND $(MAKE) defconfig COMMAND echo 'CONFIG_BUILD_TYPE=\"${CMAKE_BUILD_TYPE}\"' >> .config COMMAND echo 'CONFIG_PRODUCT_IDENTIFIER=\"${CONFIG_PRODUCT_NAME}\"' >> .config COMMENT "make (openwrt) defconfig ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/staging_dir/host/.prepared) add_custom_command(TARGET prebuild_openwrt COMMAND $(MAKE) tools/compile V=s $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:"V=s"> COMMENT "make (openwrt) tools/compile ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) endif() add_custom_command(TARGET prebuild_openwrt COMMAND $(MAKE) target/linux/compile V=s $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:"V=s"> CONFIG_LINUX_TEXT_OFFSET=${CONFIG_LINUX_TEXT_OFFSET} COMMENT "make (openwrt) target/linux/compile ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) add_custom_target(build_linux_module ) add_custom_target(build_linux_image COMMAND $(MAKE) target/linux/install V=s $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:"V=s"> CONFIG_LINUX_TEXT_OFFSET=${CONFIG_LINUX_TEXT_OFFSET} CONFIG_KERNEL_INITRAMFS_SOURCE_DIR=${CONFIG_KERNEL_INITRAMFS_SOURCE_DIR}/ TARGET_ROOTFS_DIR=${CONFIG_INSTALL_DIR} HSAN_SDK_ROOTFS_DIR=${CONFIG_INSTALL_DIR}/sdk-rootfs COMMENT "make (openwrt) linux uImage ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) add_custom_target(build_openwrt DEPENDS build_linux_module COMMAND $(MAKE) V=s $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:"V=s"> CONFIG_LINUX_TEXT_OFFSET=${CONFIG_LINUX_TEXT_OFFSET} CONFIG_KERNEL_INITRAMFS_SOURCE_DIR=${CONFIG_KERNEL_INITRAMFS_SOURCE_DIR} TARGET_ROOTFS_DIR=${CONFIG_INSTALL_DIR} COMMENT "build openwrt ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) if(CONFIG_CHIP_NAME STREQUAL "luofu" AND CONFIG_PRODUCT_NAME STREQUAL "wrt_ax3000_lite") add_custom_command(TARGET build_openwrt COMMAND rm -f ${CONFIG_INSTALL_DIR}/rootfs.wrt/etc/rc.d/S19mwan3 COMMAND rm -f ${CONFIG_INSTALL_DIR}/rootfs.wrt/etc/rc.d/S19dropbear COMMENT "disable unnecessary startup services ..." WORKING_DIRECTORY ${HI_VERSION_DIR} ) endif() add_custom_command(TARGET build_openwrt COMMAND rm -f ${CONFIG_INSTALL_DIR}/rootfs.wrt/etc/rc.d/S95telnet COMMENT "default disable telnet" WORKING_DIRECTORY ${HI_VERSION_DIR} ) add_custom_command(TARGET build_openwrt COMMAND rm -f ${CONFIG_INSTALL_DIR}/rootfs.wrt/etc/rc.d/S97hsan_easymesh COMMENT "default disable hsan_easymesh" WORKING_DIRECTORY ${HI_VERSION_DIR} ) add_custom_target(wrt COMMAND echo "$(MAKE) $(WRT_TARGET) V=s" COMMAND $(MAKE) $(WRT_TARGET) V=s CONFIG_LINUX_TEXT_OFFSET=${CONFIG_LINUX_TEXT_OFFSET} CONFIG_KERNEL_INITRAMFS_SOURCE_DIR=${CONFIG_KERNEL_INITRAMFS_SOURCE_DIR} TARGET_ROOTFS_DIR=${CONFIG_INSTALL_DIR} WORKING_DIRECTORY ${HI_VERSION_DIR} ) if(TARGET build_dts) add_dependencies(build_dts build_linux_module) endif() if(TARGET build_dts_overlay) add_dependencies(build_dts_overlay build_linux_module) endif() add_dependencies(prebuild_open_source prebuild_openwrt) add_dependencies(build_open_source build_openwrt) #依赖库配置 add_library(openwrt_lib INTERFACE) set(LIST_LINK_LIBS ubus ubox uci ssl crypto ) if(CONFIG_GATEWAY_MML_OMCI STREQUAL ON) list(APPEND LIST_LINK_LIBS sqlite3) endif() if(CONFIG_GATEWAY_SERVICE_VOICE STREQUAL ON) list(APPEND LIST_LINK_LIBS xml2 pjsip pjsip-simple pjsip-ua pj pjnath pjlib-util pjsdp ) endif() set(LIST_OPENWRT_LIBS) foreach(each ${LIST_LINK_LIBS}) target_link_libraries(openwrt_lib INTERFACE ${OPEN_SOURCE_OPENWRT_BINARY_DIR}/openwrt/staging_dir/target-${CONFIG_TOOLCHAIN_NAME}_musl/usr/lib/lib${each}.so ) if(NOT EXISTS ${OPEN_SOURCE_OPENWRT_BINARY_DIR}/openwrt/staging_dir/target-${CONFIG_TOOLCHAIN_NAME}_musl/usr/lib/lib${each}.so) list(APPEND LIST_OPENWRT_LIBS ${each}) endif() endforeach() target_include_directories(openwrt_lib INTERFACE ${OPEN_SOURCE_OPENWRT_BINARY_DIR}/openwrt/staging_dir/target-${CONFIG_TOOLCHAIN_NAME}_musl/usr/include ${OPEN_SOURCE_OPENWRT_BINARY_DIR}/openwrt/staging_dir/target-${CONFIG_TOOLCHAIN_NAME}_musl/usr/include/libubox ${OPEN_SOURCE_OPENWRT_BINARY_DIR}/openwrt/staging_dir/target-${CONFIG_TOOLCHAIN_NAME}_musl/usr/include/libxml2 ) if(LIST_OPENWRT_LIBS) add_dependencies(openwrt_lib build_openwrt) endif() 注释以上代码,切记一定要每一句都必须有注释,不可以遗漏,并且要将代码和注释一起给出来