Hunk#1 Failed at 1.这是什么意思? [英] Hunk #1 FAILED at 1. What's that mean?

查看:2307
本文介绍了Hunk#1 Failed at 1.这是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行make时出现以下错误,我不知道它的含义或处理方法.谁能照亮我或将我指向正确的方向?

I get the following error when running make, and I have no idea what it means or what to do about it. Can anyone illuminate me or point me in the right direction?

(cd libdvdnav-git && patch -p1) < ../../contrib/src/dvdnav/dvdnav.patch
patching file Makefile.am
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej
make: *** [dvdnav] Error 1

我正在尝试针对Win32交叉编译VLC(使用linux).

I'm trying to cross compile VLC for win32 (using linux).

推荐答案

这是patch生成的错误.如果您打开.patch文件,您会看到它是按许多段组织的,即所谓的驼峰".每个大块都通过新旧版本来标识相应的代码段(按行号),这些代码段之间的差异以及它们之间的相似性(上下文").

It is an error generated by patch. If you would open the .patch file, you'd see that it's organized in a bunch of segments, so-called "hunks". Every hunk identifies corresponding pieces of code (by line numbers) in the old and new version, the differences between those pieces of code, and similarities between them (the "context").

如果块的相似性与原始文件中的块不匹配,则块可能会失败.当您看到此错误时,几乎总是因为您使用补丁程序来修补错误版本的代码.有几种方法可以解决此问题:

A hunk might fail if the similarities of a hunk don't match what's in the original file. When you see this error, it is almost always because you're using a patch for the wrong version of the code you're patching. There are a few ways to work around this:

  • 获取已包含补丁程序(最佳选项)的libdvdnav的更新版本.
  • 获取要修补的libdvdnav版本的.patch文件.
  • 手动修补.对于补丁程序中的每个大块,请尝试在libdvdnav中找到相应的文件和行,并根据补丁程序中的说明进行更正.
  • 采用libdvdnav的版本,该版本更接近.patch文件的目标版本(可能是个坏主意).
  • Get an updated version of libdvdnav that already includes the patch (best option).
  • Get a .patch file for the version of libdvdnav you're patching.
  • Patch manually. For every hunk in the patch, try to locate the corresponding file and lines in libdvdnav, and correct them according to the instructions in the patch.
  • Take the version of libdvdnav that's closer to whatever version the .patch file was intended for (probably a bad idea).

这篇关于Hunk#1 Failed at 1.这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆