You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Nick Wellnhofer (JIRA)" <ji...@apache.org> on 2016/05/21 17:38:12 UTC

[lucy-issues] [jira] [Created] (CLOWNFISH-100) Support building with MSYS make

Nick Wellnhofer created CLOWNFISH-100:
-----------------------------------------

             Summary: Support building with MSYS make
                 Key: CLOWNFISH-100
                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-100
             Project: Apache Lucy-Clownfish
          Issue Type: Bug
          Components: Charmonizer
            Reporter: Nick Wellnhofer
            Priority: Minor


Somewhat ironically, we still can't build the C bindings under MSYS and MSYS2, the Unix-like shells for MinGW, using the make utilities they provide. This is because Charmonizer invokes shell commands via C's {{system}} function which always delegates to {{cmd.exe}} under MinGW, whether under MSYS or not. As a result, backslashes are used as directory separators. This causes problems when commands from the generated Makefile are executed by the MSYS shell. Building with {{mingw32-make}} works, though.

That's what you get when writing a build system based on C instead of a command shell!

One solution is to keep using {{cmd.exe}} and convert backslashes to forward slashes before writing them to the Makefile. But doing this manually in charmonizer.main is extremely cumbersome and I'm not sure whether this could be automated reliably.

I think a better solution is to detect whether we're running in a (mostly) POSIX-compatible environment under Windows and execute POSIX commands via {{sh.exe}} (make {{cmd.exe}} call {{sh.exe}} to be precise).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)