【问题标题】:How do I install tcpslice from source, released for fedora, on a mac 64 bit?如何在 mac 64 位上从源代码安装 tcpslice,为 fedora 发布?
【发布时间】:2016-09-10 00:52:32
【问题描述】:

最新的公开可用的 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 位仍然会出现同样的错误!!

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

编辑:我尝试了 Warren Young 的建议 here,但 libtoolize --force 没有重新制作 config.guess,所以我使用 curl 从 this page 上的链接手动下载了“最新”的 config.guess。但是,现在 ./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 -build 类型(我仍然找不到):

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

【问题讨论】:

    标签: linux macos compilation cross-platform


    【解决方案1】:

    Welp,答案是从这里手动下载最新的 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 来完成我的脚本!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-25
      • 2019-07-08
      相关资源
      最近更新 更多