SIP Makefile fail (gnuwin and mingw)

瘦欲@ 提交于 2019-12-23 22:31:10

问题


I have downloaded the Sip module for python 2.7, created a makefile and tried the make command on the directory with the makefile, but I get this error:

Makefile:3: recipe for target 'all' failed
mingw32-make[10]: *** [all] Error 2
mingw32-make[10]: Leaving directory 'D:/Users/myLogin/Downloads/python/sip-4.14.5'

I get this error with both Gnuwin and mingw32. So I'm at a loss at what to do now. Any idea?


回答1:


If you use python configure.py, the generated Makefiles are actually nmake makefiles. nmake is Microsoft's equivalent to make. You can run it by invoking nmake in a Visual Studio command prompt, if you have that installed.

For building with mingw, you have to indicate that you want to use that particular platform when creating the makefiles, as follows:

python configure.py --platform win32-g++

After that, invoking make works fine.


A few details about what happens to you when running make on the nmake makefile. The generated nmake file starts with the following lines:

all:
    cd sipgen
    $(MAKE)
    @cd ..
    cd siplib
    $(MAKE)
    @cd ..

Because each command on each line is executed in a new shell, the result of cd sipgen is actually void. Then, make is invoked again, in the current directory -- this results in an infinite recursive loop of make invocations. The [10] in your error message indicates that it was at the 10th level of recursion. I guess that was the moment that you pressed Ctrl-C :-)



来源:https://stackoverflow.com/questions/16016160/sip-makefile-fail-gnuwin-and-mingw

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!