mingw32-make的目录更改错误 [英] Directory change error with mingw32-make

查看:231
本文介绍了mingw32-make的目录更改错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在MinGW32下构建POCO库1.6.0,环境:Windows 7 Ultimate 32位,外壳:MSYS.成功执行 ./configure .

I'm building POCO library 1.6.0 under MinGW32, environment: Windows 7 Ultimate 32-bit, shell: MSYS. Successfully executed ./configure.

$ ./configure
Configured for MinGW

config.make的内容:

Contents of config.make:

POCO_CONFIG = MinGW
POCO_BASE = /c/dev/poco
POCO_BUILD = /c/dev/poco
POCO_PREFIX = /usr/local
POCO_FLAGS = 
OMIT = 
export POCO_CONFIG
export POCO_BASE
export POCO_BUILD
export POCO_PREFIX
export POCO_FLAGS

启动mingw32-make之后,我得到:

After launching mingw32-make I'm getting:

$ mingw32-make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
 File `poco' does not exist.
   File `libexecs' does not exist.
     File `Foundation-libexec' does not exist.
    Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
mingw32-make: Entering directory `c:/dev/poco'
C:/app/MinGW/bin/mingw32-make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory.  Stop.
mingw32-make: Leaving an unknown directory
mingw32-make: *** [Foundation-libexec] Error 2
mingw32-make: Leaving directory `c:/dev/poco'

问题出在

mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory.  Stop.

因为/c/dev/poco/Foundation 确实存在:

$ ls
CHANGELOG       LICENSE   VERSION                  build_vs110.cmd  config.make
CMakeLists.txt  MANIFEST  XML                      build_vs120.cmd  configure
CONTRIBUTORS    Makefile  build                    build_vs90.cmd   contrib
CppUnit         NEWS      build_CE_vs90.cmd        buildwin.cmd     doc
DLLVersion.rc   Net       build_vcexpress2008.cmd  cmake            libversion
Foundation      README    build_vcexpress2010.cmd  components       patches
JSON            Util      build_vs100.cmd          config.build

我正在修改 makefile 以将目录更改为其他子文件夹,这很不高兴.似乎有些东西阻止 mingw32-make 更改目录.也可以确认

I was modifying makefile to change directory to other sub-folders, no joy. It seems like something prevents mingw32-make from changing directory. Also can confirm that

cd /c/dev/poco/Foundation

工作正常.

尝试过 make ,结果相同:

$ make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
 File `poco' does not exist.
   File `libexecs' does not exist.
     File `Foundation-libexec' does not exist.
    Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
make: Entering directory `c:/dev/poco'
C:/app/MinGW/msys/1.0/bin/make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
make: Entering an unknown directory
make: *** /c/dev/poco/Foundation: No such file or directory.  Stop.
make: Leaving an unknown directory
make: *** [Foundation-libexec] Error 2
make: Leaving directory `c:/dev/poco'

mingw32-make 失败的原因没有明显的原因,因为路径没有空格.

There are no obvious reasons for mingw32-make to fail as path does not have spaces.

我错过了什么?欢迎任何建议.

What I have missed? Any suggestions welcome.

推荐答案

的上下文中,路径/c/dev/poco/Foundation 并不意味着您似乎在想什么.mingw32-make.exe.请参阅, mingw32-make.exe 是一个原生 Windows应用程序,因此它一定肯定会 不会理解 MSYS 特定路径,例如/c/dev/poco/Foundation ;而是将其按原样"解释为 c:/c/dev/poco/Foundation (假设您当前的工作驱动器为 c:),我肯定不是您想要的.

The path /c/dev/poco/Foundation does not mean what you seem to think, in the context of mingw32-make.exe. See, mingw32-make.exe is a native Windows application, so it definitely will not understand an MSYS specific path such as /c/dev/poco/Foundation; rather, it will interpret it "as is", as c:/c/dev/poco/Foundation, (assuming your current working drive is c:), which I'm sure is not what you intended.

您似乎确实在使用 MSYS 作为外壳程序,所以为什么仍要使用 mingw32-make.exe ?使用 MSYS 本身提供的 make.exe ;它确实了解 MSYS 路径.

You do seem to be using MSYS as your shell, so why are you using mingw32-make.exe anyway? Use the make.exe that MSYS itself provides; it does understand MSYS paths.

请注意,如果从MSYS shell运行 make --version ,则应该看到(在撰写本文时):

Do note that, if you run make --version from the MSYS shell, you should see, (at this time of writing):

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-msys

在更新的问题中,显示了一个运行 make.exe 的示例,该示例显然不是此MSYS版本.看来 you 已经放置了 make.exe 的替代版本-甚至可能是 mingw32-make.exe 本身的副本,输出是相同的-在 $ PATH 中MSYS版本之前的某个目录中.您应该删除此非MSYS版本的 make.exe ;否则,请执行以下操作.调用MinGW版本 mingw32-make.exe 的全部目的是为了避免这种冲突.从MSYS Shell运行 make 时,您需要MSYS版本,而不是 not 一些 mingw32-make.exe 克隆.

In your updated question, you show an example of running make.exe, which clearly is not this MSYS version; it appears that you have placed an alternative version of make.exe -- perhaps even a copy of mingw32-make.exe itself, for the output is identical -- in some directory which precedes the MSYS version in your $PATH. You should delete this non-MSYS version of make.exe; the entire purpose in calling the MinGW version mingw32-make.exe is to avoid this very conflict. When you run make from the MSYS shell, you want the MSYS version, and not some mingw32-make.exe clone.

这篇关于mingw32-make的目录更改错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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