Why is Gradle is trying to create plugin MicrosoftVisualStudioCppPlugin on a linux system


(Jared Buletza) #1

Hi.

We have a bunch of Gradle scripts that are building native projects on linux. All of our development of the Gradle files was done on a Rhel5 (Red Hat Enterprise Linux 5) linux machine, and they all run fine. We just tried running the exact same project on a Rhel 4 machine, and it fails:

> Could not create plugin of type 'MicrosoftVisualCppPlugin'.

This happens on line 3, which is:

apply plugin : 'cpp'

Running “gradle --version” on the Rhel 4 machine provides (retyped):

-----
Gradle 1.11
-----
Build time:
  2014-02-11 11:34:39 UTC
Build number:
none
Revision:
    a831fa866d4cbee94e61a09af15f9dd95987421
  Groovy:
 1.8.6
Ant:
      Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:
       2.2.0
JVM:
     1.6.0_01 (Sun Microsystems Inc. 1.6.0_01-b06)
OS:
        Linux 2.6.9-42.0.8.ELsmp amd64

Any ideas as to why its trying to load the ‘MicrosoftVisualCppPlugin’?

Again… on a Rhel 5 machine, it builds correctly using g++.


(Jared Buletza) #2

Running the same build with Gradle-1.12-rc-1, has provided for more information. It appears that GLIBC_2.4 is missing from that Rhel 4 box we’re using, and it appears to be a requirement of ~/.gradle/native/19/linux-amd64/libnative-platform.so

Clearly the downloadable version of Gradle isn’t going to work. The new question is: If I “build” Gradle from the git source, on a machine with GLIB_2.4, will it compile with the older version (2.3.4), or fail?

I will try to test this, but it will be difficult as those machines for us do not have access to the internet. So it is a chore to get the source onto the box, and it will be problematic if the build process reaches out to the internet (which when I run locally, appears to do).

Any thoughts to the likelihood of success would be appreciated.