【问题标题】:How to cross compile debian package for ARM Raspberry Pi如何为 ARM Raspberry Pi 交叉编译 debian 包
【发布时间】:2014-03-01 03:32:05
【问题描述】:

我使用 arm-bcm2708 工具链进行交叉编译。

现在我想构建 debian 包。

$ dpkg-buildpackage -rfakeroot -us -uc

我有错误

... (ELF format: 'elf32-littlearm'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.

我不想在 pi 上构建它。那么如何在 PC 上交叉编译一个 RPi debian 包呢?

【问题讨论】:

    标签: debian raspberry-pi cross-compiling


    【解决方案1】:

    第一种方法是使用与 Raspberry Pi Debian 相同的主机 Debian 发行版。例如 7.0。加deb http://www.emdebian.org/debian/ unstable main 到您的/etc/apt/sources.list 并安装工具链:

    apt-get update
    apt-get install emdebian-archive-keyring
    apt-get install gcc-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf
    apt-get install build-essential git debootstrap u-boot-tools
    

    然后您可以通过xapt 安装交叉编译的依赖项。也许你可以使用dpkg-buildpackage

    替代方案:

    您可以将您的包转换为使用CMake 并使用CPack 生成deb 文件。这种方法也适用于其他发行版,如 openSuSe、Fedora。

    更新:

    由于 Emdebian 发行版更新已停止,建议切换到较新的 Debian 版本并使用 multiarch 功能。

    【讨论】:

    • “截至 2014 年 7 月,Emdebian 发行版的更新已停止。不会有进一步的更新,也不会有进一步的稳定版本。”
    猜你喜欢
    • 2012-07-19
    • 2019-11-23
    • 1970-01-01
    • 1970-01-01
    • 2012-06-28
    • 2021-09-25
    • 2020-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多