linux - 如何在 64 位 mac 上从源代码安装 tcpslice,为 fedora 发布?

标签 linux macos compilation cross-platform

最新公开可用的 tcpslice 版本 1.2a1(在其 github 上找到)有一个错误,它期望时间字段为 8 个字节,但得到 16 个(在 64 位时)。这会导致错误:

tcpslice: problems finding end packet of file ./abc1234.bin

我从以下位置获得了有关此错误的信息:https://bugzilla.redhat.com/show_bug.cgi?id=485670

这让我从这里获取更新版本 (1.2a3) 并尝试从源代码编译:http://pkgs.fedoraproject.org/repo/pkgs/tcpdump/tcpslice-1.2a3.tar.gz/ .我认为这是或接近实际的 patch

但是,我无法在我的 Mac 上 ./configure 这个,因为它说(可以理解):

checking build system type... configure: error: cannot guess build type; you must specify one

没有人会放弃,因为我不想切换到 linux 以继续开发我的包装脚本,我尝试这样编译:

./configure --build=i686-pc-linux-gnu

这个配置好了就搞定了!!!然而,当我运行新制作的 tcpdump 时,它的 32 位仍然给出相同的错误!!

这完全可能吗?对于 x86_64 位系统,我可以使用什么其他 --build 类型?没有其他 --build 类型正在为我编译。我不知道如何找到可接受的构建类型,目前正在引用这个:https://gcc.gnu.org/gcc-4.2/buildstat.html

编辑:我尝试了 Warren Young 的建议 here但是 libtoolize --force 没有重新制作 config.guess,所以我从 this page 上的链接手动下载了“最新的”config.guess。与 curl 。但是,现在 ./configure 说:

checking build system type... Invalid configuration `x86_64-apple-darwin15.4.0': machine `x86_64-apple' not recognized
configure: error: /bin/sh ./config.sub x86_64-apple-darwin15.4.0 failed

我被搞砸了吗?或者我可以试试默认的 x86_64 构建类型(我仍然找不到):

checking build system type... Invalid configuration `x86_64': machine `x86_64' not recognized
configure: error: /bin/sh ./config.sub x86_64 failed

最佳答案

好吧,答案是从这里手动下载最新的 config.guess 和 config.sub 文件:https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html并覆盖 tcpslice 目录中的那些。

但是,同样的问题仍然存在。在 Mac 上出现时间问题肯定还有另一个原因,因为此版本的 tcpslice 在同一 pcap 上的 ubuntu 上运行良好。

感谢 Warren Young 在这个问题中的帖子指导我朝着正确的方向(虽然没有成功):Compiling tcpsplice on a 64-bit machine .我想我会使用 ubuntu 来完成我的脚本!

关于linux - 如何在 64 位 mac 上从源代码安装 tcpslice,为 fedora 发布?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37216538/

相关文章:

python - 如何在 PyInstaller 中指定 .spec 文件

compilation - 无法弄清楚如何运行 .scm(使用 guile 或 scm)文件

linux - 如何查看文件更新内容的全部部分

Android/Linux ioctl FIONREAD 失败

c - 为什么输出被写入正在缓冲的管道

html - 在 lion 中禁用 webview 的橡皮筋滚动

清理相机 osx 和 opencv

Mac 上的 Python Multiprocessing Pool.map() 串行而不是并行运行进程

linux - 当我更改 .config 文件或制作内核包时,如何防止重新编译所有 linux 内核对象?

php - 从 Linux 命令行检查有效的 docx