graalvm / mx

Command-line tool used for the development of Graal projects.
GNU General Public License v2.0
183 stars 109 forks source link

Cygwin #188

Open peblpebl opened 5 years ago

peblpebl commented 5 years ago

I am trying to run in mx in cygwin, but am getting:

WARNING: No platform-specific definition is available for library NINJA for your OS (cygwin)
library NINJA:
Library without "path" attribute must have a non-empty "urls" list attribute or "maven" attribute

when just doing mx update.

pebl@stationary /cygdrive/d/shared/git/mx
$ which ninja
/usr/bin/ninja
pebl@stationary /cygdrive/d/shared/git/mx
$ ninja --version
1.9.0
pebl@stationary /cygdrive/d/shared/git/mx
$ uname -a
CYGWIN_NT-6.1 stationary 3.0.4(0.338/5/3) 2019-03-16 09:50 x86_64 Cygwin

Adding

       "cygwin" : {
          "amd64" : {
            "urls" : ["https://github.com/ninja-build/ninja/releases/download/v{version}/ninja-win.zip"],
            "sha1" : "637cc6e144f5cc7c6388a30f3c32ad81b2e0442e"
          }
        },

to mx.mx/suite.py, seems to help, but I dont know if this is the right way.

dougxc commented 5 years ago

@peblpebl thanks for submitting. @pejovica does that fix look right?

pejovica commented 5 years ago

@peblpebl I'm not completely sure what are you trying to do, but cygwin-amd64 should be a binary for Cygwin, and not for Windows. So, if you need a Cygwin ninja you could mark NINJA library as optional on Cygwin (like it is done for Solaris), in which case the binary from your environment will be picked up.

On the other hand, if you are trying to build for Windows (and only use Cygwin as a shell), you might be better off using the native Windows Python instead of the Cygwin one. It may happen that things will work better in that case.

peblpebl commented 5 years ago

I am trying to build a native image of a java project. Given win in not supported yet, I have a virtualbox with ubuntu that shares a drive between guest/host. When I see that is working, I want to try to see how far I get with a native image of windows. Secondly I want to see how fast I can get a R script to run (it uses some fortran libs). But I am currently stuck at mx eclipseinit.

dougxc commented 5 years ago

@peblpebl we are now considering to remove cygwin environment support altogether: https://github.com/graalvm/mx/issues/189 Can you please confirm that mx works for you when run with a standard Windows python executable.