`ARM-NONE-AEBI-G++ -print-sysroot`是空的

发布于 2025-02-02 18:51:11 字数 736 浏览 2 评论 0原文

If I unpacking the toolchain via

$ arm-none-eabi-g++ --help
...
-print-sysroot           Display the target libraries directory.
...
$ arm-none-eabi-g++ -print-sysroot
$ /opt/gcc-arm-none-eabi-10.3-2021.07/bin/../arm-none-eabi

我会得到sysroot路径,但是如果我使用包装管理器,

$ # ubuntu 20.04
$ sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi \
                   libnewlib-dev libstdc++-arm-none-eabi-newlib 

$ arm-none-eabi-g++ --help
...
-print-sysroot           Display the target libraries directory.
...
$ arm-none-eabi-g++ -print-sysroot
$ # I would expect /usr/lib/gcc/arm-none-eabi, but it's empty

则Sysroot路径为空。

apt install总是这样吗?有没有办法避免这种情况?

If I unpacking the toolchain via gcc-arm-none-eabi-10.3-2021 and run

$ arm-none-eabi-g++ --help
...
-print-sysroot           Display the target libraries directory.
...
$ arm-none-eabi-g++ -print-sysroot
$ /opt/gcc-arm-none-eabi-10.3-2021.07/bin/../arm-none-eabi

I get the sysroot path, but if I use the package manager

$ # ubuntu 20.04
$ sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi \
                   libnewlib-dev libstdc++-arm-none-eabi-newlib 

$ arm-none-eabi-g++ --help
...
-print-sysroot           Display the target libraries directory.
...
$ arm-none-eabi-g++ -print-sysroot
$ # I would expect /usr/lib/gcc/arm-none-eabi, but it's empty

the sysroot path is empty.

Is this always the case for apt install? Is there a way to avoid this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文