我在我的 jessie:x86_64 系统上使用qemu 用户模拟运行 wheezy:armhf chroot 。不知何故,git clone
特定私有存储库上的 a 将挂在 chroot 内,而本机成功。这可能是一个错误,谁知道?为了提高我的业力,我想知道这是怎么回事!
附带说明:我遇到的挂起是在 jessie:armel chroot 中的 git-2.0 中发生的……挂起不会发生在全系统仿真中。所以我继续挖wheezy:armhf 的兔子洞,只是因为我必须选择一个......我无法在本地机器上测试......
所以。没有git-dbg
包,我自己卷。在 wheezy:armhf chroot 里面:
sudo apt-get install build-essential fakeroot
sudo apt-get build-dep git
apt-get source git && cd git-1.7.10.4
DEB_CFLAGS_APPEND="-fno-stack-protector" DEB_CXXFLAGS_APPEND="-fno-stack-protector" DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector,-fortify DEB_BUILD_OPTIONS="noopt nostrip nocheck" fakeroot dpkg-buildpackage -j´getconf _NPROCESSORS_ONLN`
sudo dpkg -i ../git_1.7.10.4-1+wheezy1_armhf.deb
Run Code Online (Sandbox Code Playgroud)
据我阅读gcc-documentation,不需要设置DEB_CFLAGS_APPEND
和DEB_CXXFLAGS_APPEND
附加-fno-stack-protector
,但无论如何,要确定)
然后,在我正在做的 chroot 中使用 qemu 的内置gdb_stub:
QEMU_GDB=1234 git clone /path/to/breaking/repo …
Run Code Online (Sandbox Code Playgroud)