Cygwin make 错误:*** 目标模式不包含 `%'

发布于 2024-07-14 05:03:05 字数 118 浏览 4 评论 0原文

我在使用 cygwin make.exe 版本:3.81(重新)构建时遇到此错误。

Error : *** target pattern contains no `%'.

I got this error while (re)building, using cygwin make.exe version :3.81.

Error : *** target pattern contains no `%'.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

北城半夏 2024-07-21 05:03:05

此错误是由于存在 ":" 造成的。 因此它不再支持 Windows 路径。
您需要下载3.80版本并替换\bin目录中的make.exe

显然它也需要cygintl12.dll

This error is due to a presence of a ":". Therefore it no longer supports windows paths.
You need to download version 3.80 and replace the make.exe in the \bin directory.

Apparently it needs cygintl12.dll too.

韬韬不绝 2024-07-21 05:03:05
  • 回滚到 3.80 (Geant4)

    • cd /usr/bin
    • mv make.exe make_381.exe
    • wget http://geant4.cern.ch/support/extras/cygwin/make.exe
    • chmod +x make.exe
  • 从 cygwin 安装程序安装 libintl2 以获得所需的 cygintl-2.dll

  • rollback to make 3.80 (Geant4)

    • cd /usr/bin
    • mv make.exe make_381.exe
    • wget http://geant4.cern.ch/support/extras/cygwin/make.exe
    • chmod +x make.exe
  • install libintl2 from cygwin setup for the required cygintl-2.dll

少年亿悲伤 2024-07-21 05:03:05

当我尝试在 Linux 或 OSX 上构建项目时,我遇到了同样的错误,该项目之前是在 Windows 计算机上构建的,并且在输出文件夹中存在一些 .od 文件。

当我手动删除 .od 文件后,问题就解决了。 显然,我的 IDE(本例中为 CodeLite)的“Clean”命令没有删除 .od 文件。

I got the same error when trying to build a project on Linux or OSX, that was previously built on a Windows machine and had some .o.d files hanging around in the output folder.

Once I manually deleted the .o.d files the problem was resolved. Apparently the "Clean" command of my IDE (CodeLite in this case) wasn't deleting the .o.d files.

七七 2024-07-21 05:03:05

最有可能是由于驱动器号后面存在冒号。 例如,考虑

build : $(NativeHeaders)/*

如果

NativeHeaders=../../../cpp/generated

那么一切都很好,但

NativeHeaders=C:/dev/folder/cpp/generated

会导致您收到错误。

Most likely due to the presence of a colon following a drive letter. For example consider

build : $(NativeHeaders)/*

If

NativeHeaders=../../../cpp/generated

then all is well, but

NativeHeaders=C:/dev/folder/cpp/generated

results in the error that you get.

记忆で 2024-07-21 05:03:05

我收到此错误是因为命令开头没有制表符 (\t)。 我的 vim 集中有 Expandtab,所以它用 4 个空格替换制表符。 当我关闭它并将空格更改为选项卡时,它被修复了

I was getting this error because I didn't have a Tab (\t) character at the beginning of my commands. I had expandtab in my vim set so it was replacing a tab character with 4 spaces. When I turned that off and changed spaces to a tab it was fixed

枕花眠 2024-07-21 05:03:05

在使用 cygwin 使用 Android NDK 进行构建时,我遇到了 target pattern contains no '%' 错误。

我发现以下链接很有帮助:

Make 生成的错误

  • '缺少目标模式。 停止。'
  • '多个目标模式。 停下来。”
  • '目标模式不包含`%'。 停止。'
  • '混合隐式和静态模式规则。 停下来。”

这些是为格式错误的静态模式规则生成的。 第一个意味着规则的目标部分没有模式; 第二个表示目标部分中有多个模式; 第三个表示目标不包含模式字符(%); 第四个表示静态模式规则的所有三个部分都包含模式字符 (%)——只有前两个部分应该包含。 如果您看到这些错误并且您没有尝试创建静态模式规则,请检查目标和先决条件列表中任何变量的值,以确保它们不包含冒号。< /strong> 请参阅静态模式规则的语法.


因此,我的解决方案包括将系统变量从 Windows 格式更改为 Unix 格式,如下所示:

  • 我使用了 /cygdrive/c/Android,而不是 C:\Android\android-ndk-r10c /android-ndk-r10c 为 NDK 路径。

同样,我将 NDK 项目路径更改为 /cygdrive/c/Android/project/src/main/jni

I had the target pattern contains no '%' error while building with the Android NDK using cygwin.

I found the following link helpful:

Errors Generated by Make

  • ‘missing target pattern. Stop.’
  • ‘multiple target patterns. Stop.’
  • ‘target pattern contains no `%'. Stop.’
  • ‘mixed implicit and static pattern rules. Stop.’

These are generated for malformed static pattern rules. The first means there’s no pattern in the target section of the rule; the second means there are multiple patterns in the target section; the third means the target doesn’t contain a pattern character (%); and the fourth means that all three parts of the static pattern rule contain pattern characters (%)–only the first two parts should. If you see these errors and you aren’t trying to create a static pattern rule, check the value of any variables in your target and prerequisite lists to be sure they do not contain colons. See Syntax of Static Pattern Rules.

And so, my solution included changing my system variables from Windows format to Unix format like so:

  • Instead of C:\Android\android-ndk-r10c, I used /cygdrive/c/Android/android-ndk-r10c for the NDK path.

Similarly, I changed the NDK project path to /cygdrive/c/Android/project/src/main/jni.

冬天的雪花 2024-07-21 05:03:05

就我而言,当我收到此错误时,我正在 Cygwin 下使用 CMake。 原来是执行了Windows版本的CMake。 随后,在 make 文件中使用了 Windows 路径。 我通过安装程序安装了 Cygwin 版本的 CMake 并使其正常工作。

In my case I was using CMake under Cygwin when I got this error. It turned out the Windows version of CMake was executed. Subsequently, Windows paths were used in the make file. I installed Cygwin's version of CMake through the setup program and got it working.

九公里浅绿 2024-07-21 05:03:05

当构建目录包含“:”时,我在 Linux 上遇到了这个问题,这是由于进行了 Mercurial 签出操作而导致创建了一个名为“server:port”的目录。

I had this problem on Linux when the build directory contained a ":" caused by doing a mercurial checkout which created a directory named "server:port".

青春有你 2024-07-21 05:03:05

我必须在 make 文件中更改以下内容才能与 Make_381 兼容:
之前:
ARDUINO_BASE_DIR = C:\programs/arduino

现在:
ARDUINO_BASE_DIR = \\程序/arduino

I had to change the following in my make file to be compatible with Make_381:
before:
ARDUINO_BASE_DIR = C:\programs/arduino

now:
ARDUINO_BASE_DIR = \\programs/arduino

一抹淡然 2024-07-21 05:03:05

如果您在 Windows 下运行 Eclipse C/C++ 并引用来自 Cygwin 的文件,请尝试此操作,请确保 c:/cygwin/bin 或 c:/cygwin64/bin 位于 Windows 路径环境中您首选的编译器工具之后。

例子:
路径 = ;C:\yagarto\bin;C:\yagarto-tools\bin;C:\cygwin64\bin;

进行更改后,退出 Eclipse 并重新启动以使其生效(仅重新启动 Eclipse 而不退出并不能解决问题。

Try this if you're running Eclipse C/C++ and referencing files from Cygwin under Windows, make sure c:/cygwin/bin or c:/cygwin64/bin comes after your preferred compiler tools in your Windows Path environment.

Example:
Path = ;C:\yagarto\bin;C:\yagarto-tools\bin;C:\cygwin64\bin;

After making the changes, exit Eclipse and restart for it to take effect (simply restarting Eclipse without exiting won't fix the problem.

我很坚强 2024-07-21 05:03:05

在我的项目中,obj 文件夹可能已损坏,并且我收到此错误。 手动删除obj文件夹。 然后 ndk-build 顺利完成。

In my project, obj folder was probably corrupted and I was getting this error. Manually deleted obj folder. Then ndk-build completed fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文