Apache OpenOffice (AOO) Bugzilla – Issue 52799
SDK examples break during 'make' when cygwin is installed
Last modified: 2013-02-24 21:08:40 UTC
This problem arises because of the make.exe (GNU) doing a search algorithm in order to figure out which shell to use before the makefile is being processed. Cygwin is usually in C:\Cygwin or C:\Program Files\Cygwin and thus its \bin\sh.exe is detected as the to-use shell instead of C:\WINDOWS\system32\cmd.exe and then it tries to use the sh.exe to proceed which lets the examples fail with some error message I don't have around right now (because I moved Cygwin to my D: partition so that the proper cmd.exe is used for making the examples). cyb->jsc: I did some checking on this some time ago and found the source files that were responsible for this. How about a custom GNU Make for Win32 which we will then provide on http://api.openofice.org ? What do you think ? I could probably take a closer look at which parts of the MAKE source code should be changed and would try to build it on Windows generating a custom make.exe . Give me feedback, about what you think.
The install page document that cygwin tools are not supported. So i see no problem here, cygwin make is simply not supported. I don't like the idea of patching gnu make exactly for this purpose. I want to use the default tools. The only thing i would accept is to make the SDK cygwn ready but of course i personally won't do it ;-) And the current normal windows mode has to work in the futrue as well. I suggest WONTFIX -> and close the issue Maybe we should talk about such things before we write issues.
jsc: I am not proposing support for cygwin shells. a Windows user *must* use the command line in order to make the examples. The problem here is that anyone having cygwin installed on its local machine and on the C:\ partition where the WINDOWS\system32\cmd.exe is located will get breaks when trying to 'make' the examples. As said, that's because of GNU make first searching for a to-use shell finding any of the unix-like shells in the cygwin bin folder and trying to use it on the makefile.
Created attachment 28458 [details] the search algorithm C code within GNU Make source code (main.c) that tries to find the to-be-used shell at runtime.
again which make is used. Is it the make from cygwin? If yes, the Ãssue is invalid and won't be fixed because it is documented that cygwin make is not supported.
cyb->jsc: Please see the very first line in the description: "make.exe (GNU)". This issue is not about cygwin's make but the GNU make ported to Win32.
I've installed the cygwin tools on my machine and have tested some SDK examples with my normal gnu make for windows and also the mingw32-make. Both tests works fine for me and i don't see a problem when i have the cygwin tools installed. I don't know which make you use and cygwin tools are not supported and this fact is documented. In don't see any problem here and won't fix anything.
the question then is where you did install cygwin. I think you don't really understand: I don't propose using cygwin, it just fails on my machine merely because it is installed (not used!!). I attached the reason for this as a text file with the specific portion from GNU MAKE main.c which shows that extra algorithms are done for Win32 and if cygwin can be found before on the same partition as GNU MAKE is, then it tries to use sh as the default shell even if make was started from the cmdline. I will try to verify it again and will attach a log file. Please note, that this is an enhancement, not a defect.
I made a default installation of the cygwin tools (including the make package) and that is what probably most of the users did (location is c:\cygwin). I don't use it as well, it is just installed. Your suggested enhancement is to put a patched make verison in the SDK package. I don't wnat to redistribute a make version with the SDK. Feel free to put your special make version somewhere on the web but not in the SDK. Because most of the users won't need it and i won't maintain it.
closed