20251023在Ubuntu20.04.6上编译AIO-3576Q38开发板的Buildroot系统出现找不到assimp/Importer.hpp的问题

2025-10-24T14:39:54 qgltf.cpp:29:10: fatal error: assimp/Importer.hpp: No such file or directory
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ sudo apt-get install libassimp-dev


20251023在Ubuntu20.04.6上编译AIO-3576Q38开发板的Buildroot系统出现找不到assimp/Importer.hpp的问题
2025/10/24 16:59


缘起:编译firefly的AIO-3576Q38开发板的Android14。
开动!

https://www.t-firefly.com/doc/download/320.html
AIO-3576C

源代码
https://pan.baidu.com/s/1mGkGxlxodHedXJZqLKRRRg?pwd=1234
Android14.0 bundle
提取码:1234


https://wiki.t-firefly.com/zh_CN/AIO-3576Q38/android_compile_android14.0_firmware.html
AIO-3576Q38


百度:qgltf.cpp:29:10: fatal error: assimp/Importer.hpp: No such file or directory


在 C++ 项目中使用 Assimp 库时遇到 fatal error: assimp/Importer.hpp: No such file or directory 错误,通常是因为编译器的包含路径(include path)没有正确设置,导致编译器无法找到 Assimp 头文件。以下是一些解决这个问题的步骤:

1. 确认 Assimp 是否已正确安装
首先,确保你已经正确安装了 Assimp 库。在 Ubuntu 系统上,你可以使用以下命令安装:

bash
Copy Code
sudo apt-get install libassimp-dev
在 Windows 上,你可以从 Assimp 的 GitHub 页面 下载预编译的二进制文件或者源码,并按照说明进行编译安装。

2. 设置包含目录
确保编译器的包含目录中包含了 Assimp 的头文件路径。这可以通过以下几种方式实现:

对于 CMake:
如果你使用 CMake,可以在 CMakeLists.txt 文件中添加如下代码来设置包含目录:

cmake
Copy Code
find_package(assimp REQUIRED)
include_directories(${ASSIMP_INCLUDE_DIRS})
确保你的 CMakeLists.txt 文件中有这一行:

cmake
Copy Code
target_link_libraries(your_target_name ${ASSIMP_LIBRARIES})
对于 g++ 或其他编译器:
如果你直接使用 g++ 或其他编译器,可以通过 -I 选项来指定头文件搜索路径,例如:

bash
Copy Code
g++ -I/usr/include/assimp your_file.cpp -o your_program
或者在你的编译命令中加入:

bash
Copy Code
g++ -I/usr/include/assimp -o your_program your_file.cpp -lassimp
3. 检查 Assimp 头文件位置
不确定 Assimp 头文件的确切位置?你可以使用 find 命令在 Linux 上搜索头文件:

bash
Copy Code
find /usr -name Importer.hpp
这应该会返回头文件的确切位置。然后,你可以将这个路径添加到你的编译器的包含目录中。

4. 重新编译项目
在设置好包含目录后,重新编译你的项目。如果你使用的是 IDE(如 Visual Studio, CLion 等),确保在项目的设置中更新了包含目录和链接库。

5. 检查环境变量(可选)
在某些情况下,设置环境变量 ASSIMP_DIR 或将 Assimp 的安装目录添加到系统的 PATH 环境变量中也可能有所帮助。但这通常不是必须的,特别是当正确设置了编译器的包含目录和链接库时。

按照这些步骤操作后,应该能解决你遇到的问题。如果问题仍然存在,请检查你的安装步骤是否正确,或者尝试重新安装 Assimp

继续为你解答
如何解决assimp/Importer.hpp文件缺失的问题?assimp库的安装步骤是什么?如何确保assimp库的正确性?
可以问我任何问题
...error: cstddef: no such file or directory-CSDN博客

完整的LOG:


o /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Quick.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Gui.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5QmlModels.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Qml.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Network.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Concurrent.so /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libQt5Core.so -L/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib -lmali-hook -lmali-hook-injector -lmali -ldrm -lwayland-client -lwayland-server -lpthread  -lrt -lpthread -ldl
2025-10-24T14:39:54 mv -f libquick3dextrasplugin.so ../../../../qml/Qt3D/Extras/libquick3dextrasplugin.so
2025-10-24T14:39:54 cd tools/ && ( test -e Makefile || /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/bin/qmake -o Makefile /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/tools/tools.pro -spec devices/linux-buildroot-g++ ) && /usr/bin/make -f Makefile
2025-10-24T14:39:54 cd qgltf/ && ( test -e Makefile || /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/bin/qmake -o Makefile /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/tools/qgltf/qgltf.pro -spec devices/linux-buildroot-g++ ) && /usr/bin/make -f Makefile
2025-10-24T14:39:54 g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.14"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=14 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.14 -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.14/QtCore -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.14 -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.14/QtXml -I/home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qgltf.o qgltf.cpp
2025-10-24T14:39:54 qgltf.cpp:29:10: fatal error: assimp/Importer.hpp: No such file or directory
2025-10-24T14:39:54 29 | #include <assimp/Importer.hpp>
2025-10-24T14:39:54 |          ^~~~~~~~~~~~~~~~~~~~~
2025-10-24T14:39:54 compilation terminated.
2025-10-24T14:39:54 make[4]: *** [Makefile:596: .obj/qgltf.o] Error 1
2025-10-24T14:39:54 make[3]: *** [Makefile:47: sub-qgltf-make_first] Error 2
2025-10-24T14:39:54 make[2]: *** [Makefile:75: sub-tools-make_first] Error 2
2025-10-24T14:39:54 make[1]: *** [package/pkg-generic.mk:303: /home/rootroot/Linux_SDK/Firefly_SDK/buildroot/output/rockchip_rk3576/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/.stamp_built] Error 2
2025-10-24T14:39:54 make: *** [Makefile:112: _all] Error 2
2025-10-24T14:39:54 make: Leaving directory '/home/rootroot/Linux_SDK/Firefly_SDK/buildroot'
Please check details in /home/rootroot/Linux_SDK/Firefly_SDK/output/sessions/2025-10-24_11-59-53/br-rockchip_rk3576_2025-10-24_12-07-28.log
ERROR: Running /home/rootroot/Linux_SDK/Firefly_SDK/device/rockchip/common/scripts/mk-rootfs.sh - build_buildroot failed!
ERROR: exit code 1 from line 16:
    "$RK_SCRIPTS_DIR/mk-buildroot.sh" $RK_BUILDROOT_CFG "$IMAGE_DIR"
ERROR: call stack:
    mk-rootfs.sh: build_buildroot(16)
    mk-rootfs.sh: build_hook(322)
    mk-rootfs.sh: main(352)
ERROR: Running /home/rootroot/Linux_SDK/Firefly_SDK/device/rockchip/common/build-hooks/99-all.sh - build_all failed!
ERROR: exit code 1 from line 23:
    "$RK_SCRIPTS_DIR/mk-rootfs.sh"
ERROR: call stack:
    99-all.sh: build_all(23)
    99-all.sh: build_hook(169)
    build-helper: try_func(63)
    build-helper: try_hook(96)
    build-helper: source(174)
    99-all.sh: main(180)
ERROR: Running /home/rootroot/Linux_SDK/Firefly_SDK/device/rockchip/common/build-hooks/99-all.sh - try_func build_hook all failed!
ERROR: exit code 1 from line 67:
    build_hook
ERROR: call stack:
    build-helper: try_func(67)
    build-helper: try_hook(96)
    build-helper: source(174)
    99-all.sh: main(180)
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ cat /etc/issue
Ubuntu 20.04.6 LTS \n \l

rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ uname -a
Linux rootroot-X99-Turbo 5.15.0-131-generic #141~20.04.1-Ubuntu SMP Thu Jan 16 18:38:51 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ sudo apt-get install libassimp-dev
[sudo] password for rootroot: 
Sorry, try again.
[sudo] password for rootroot: 
Sorry, try again.
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0 libjs-underscore libnvidia-cfg1-535 libnvidia-common-535 libnvidia-decode-535 libnvidia-encode-535 libnvidia-extra-535 libnvidia-fbc1-535
  libnvidia-gl-535 libva-wayland2 libx11-xcb1:i386 libxnvctrl0 nvidia-compute-utils-535 nvidia-kernel-source-535 nvidia-settings nvidia-utils-535 screen-resolution-extra xserver-xorg-video-nvidia-535
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libassimp5 libminizip1
The following NEW packages will be installed:
  libassimp-dev libassimp5 libminizip1
0 upgraded, 3 newly installed, 0 to remove and 1629 not upgraded.
Need to get 2,926 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe amd64 libminizip1 amd64 1.1-8build1 [20.2 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe amd64 libassimp5 amd64 5.0.1~ds0-1build1 [2,775 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe amd64 libassimp-dev amd64 5.0.1~ds0-1build1 [131 kB]
Fetched 2,926 kB in 22s (135 kB/s)      
Selecting previously unselected package libminizip1:amd64.
(Reading database ... 213742 files and directories currently installed.)
Preparing to unpack .../libminizip1_1.1-8build1_amd64.deb ...
Unpacking libminizip1:amd64 (1.1-8build1) ...
Selecting previously unselected package libassimp5:amd64.
Preparing to unpack .../libassimp5_5.0.1~ds0-1build1_amd64.deb ...
Unpacking libassimp5:amd64 (5.0.1~ds0-1build1) ...
Selecting previously unselected package libassimp-dev:amd64.
Preparing to unpack .../libassimp-dev_5.0.1~ds0-1build1_amd64.deb ...
Unpacking libassimp-dev:amd64 (5.0.1~ds0-1build1) ...
Setting up libminizip1:amd64 (1.1-8build1) ...
Setting up libassimp5:amd64 (5.0.1~ds0-1build1) ...
Setting up libassimp-dev:amd64 (5.0.1~ds0-1build1) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ ll
total 56
drwxrwxr-x 14 rootroot rootroot 4096 10月 24 11:59 ./
drwx------  9 rootroot rootroot 4096 10月 24 11:57 ../
drwxrwxr-x  7 rootroot rootroot 4096 10月 24 11:44 app/
drwxrwxr-x 19 rootroot rootroot 4096 10月 24 12:07 buildroot/
lrwxrwxrwx  1 rootroot rootroot   39 10月 24 11:44 build.sh -> device/rockchip/common/scripts/build.sh*
lrwxrwxrwx  1 rootroot rootroot   22 10月 24 11:59 common -> device/rockchip/common/
drwxrwxr-x  3 rootroot rootroot 4096 10月 24 11:44 device/
drwxrwxr-x  7 rootroot rootroot 4096 10月 24 11:44 docs/
drwxrwxr-x 33 rootroot rootroot 4096 10月 24 11:45 external/
lrwxrwxrwx  1 rootroot rootroot   49 10月 24 11:44 firefly-release.sh -> device/rockchip/common/scripts/firefly-release.sh*
lrwxrwxrwx  1 rootroot rootroot   48 10月 24 11:44 firefly-update.sh -> device/rockchip/common/scripts/firefly-update.sh*
drwxrwxr-x 28 rootroot rootroot 4096 10月 24 12:07 kernel/
lrwxrwxrwx  1 rootroot rootroot   31 10月 24 11:44 Makefile -> device/rockchip/common/Makefile
drwxrwxr-x  7 rootroot rootroot 4096 10月 24 12:07 output/
drwxrwxr-x  3 rootroot rootroot 4096 10月 24 11:46 prebuilts/
lrwxrwxrwx  1 rootroot rootroot   32 10月 24 11:59 README.md -> device/rockchip/common/README.md
drwxrwxr-x 10 rootroot rootroot 4096 10月 24 12:00 rkbin/
lrwxrwxrwx  1 rootroot rootroot   41 10月 24 11:44 rkflash.sh -> device/rockchip/common/scripts/rkflash.sh*
drwxrwxr-x  6 rootroot rootroot 4096 10月 24 11:46 tools/
drwxrwxr-x 28 rootroot rootroot 4096 10月 24 12:00 u-boot/
drwxrwxr-x  9 rootroot rootroot 4096 10月 24 11:46 yocto/
rootroot@rootroot-X99-Turbo:~/Linux_SDK/Firefly_SDK$ 


参考资料:
https://www.t-firefly.com/
https://www.t-firefly.com/product/industry/aio3576c
AIO-3576C 行业主板


https://wiki.t-firefly.com/zh_CN/AIO-3576C/android_compile_android14.0_firmware.html
AIO-3576C
3. 编译 Android14.0 固件


https://www.t-firefly.com/doc/download/327.html
ICORE-3576Q38

固件
AIO-3576Q38 Debian固件
https://pan.baidu.com/s/1R-nbnOltqvCfCll-thYURQ
提取码:1234

AIO-3576Q38 Ubuntu固件
https://pan.baidu.com/e/verify?surl=yBIdzP8q3Ft1ux6hCyKjWw
提取码:1234

【无界面?】
EXT-iCore-3576Q38 Debian固件
https://pan.baidu.com/e/verify?surl=OhriRxdR8qQZ0egm4zXPoQ
提取码:1234

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值