Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2459

LibCBackedTerminalDetector throws exception on JamVM

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.3-rc-1

      Description

      Hi,
      I'm trying to integrate a java library into an embedded system. I'm currently using gradle 1.0 and my native environment has JamVM as the virtual machine. This is a thin native environment suitable for building openjdk for the target.

      java -v reports something like this:

      java version "1.5.0"
      JamVM version 1.6.0-devel
      Copyright (C) 2003-2012 Robert Lougher

      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2,
      or (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      GNU General Public License for more details.

      Build information:

      Execution Engine: inline-threaded interpreter with stack-caching
      Compiled with: gcc 4.6.1

      Boot Library Path: /home/gizero/Documents/research/denzil-build/tmp/sysroots/i686-linux/usr/lib/classpath
      Boot Class Path: /home/gizero/Documents/research/denzil-build/tmp/sysroots/i686-linux/usr/share/jamvm/classes.zip:/home/gizero/Documents/research/denzil-build/tmp/sysroots/i686-linux/usr/share/classpath/glibj.zip

      This environment causes gradle to except even on a simple "gradle -v" as follows:

      FAILURE: Build aborted because of an internal error.

      • What went wrong:
        Build aborted because of an unexpected internal error. Please file an issue at: [1]http://forums.gradle.org.
      • Try:
        Run with --debug option to get additional debug info.
      • Exception is:
        org.gradle.internal.UncheckedException: java.lang.NoSuchFieldException
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
        at org.gradle.internal.nativeplatform.jna.LibCBackedTerminalDetector.isTerminal(LibCBackedTerminalDetector.java:39)
        at org.gradle.logging.internal.OutputEventRenderer.addStandardOutputAndError(OutputEventRenderer.java:54)
        at org.gradle.logging.LoggingServiceRegistry.createOutputEventRenderer(LoggingServiceRegistry.java:131)
        at java.lang.reflect.VMMethod.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:327)
        at org.gradle.internal.service.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:179)
        at org.gradle.internal.service.DefaultServiceRegistry.access$300(DefaultServiceRegistry.java:47)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.create(DefaultServiceRegistry.java:340)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:244)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.getService(DefaultServiceRegistry.java:279)
        at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.getService(DefaultServiceRegistry.java:219)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:145)
        at org.gradle.logging.LoggingServiceRegistry.(LoggingServiceRegistry.java:46)
        at org.gradle.logging.LoggingServiceRegistry.newCommandLineProcessLogging(LoggingServiceRegistry.java:53)
        at org.gradle.launcher.cli.CommandLineActionFactory.createLoggingServices(CommandLineActionFactory.java:74)
        at org.gradle.launcher.cli.CommandLineActionFactory.convert(CommandLineActionFactory.java:54)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at java.lang.reflect.VMMethod.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:327)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
        Caused by: java.lang.NoSuchFieldException
        at java.lang.Class.getDeclaredField(Class.java:458)
        at org.gradle.internal.nativeplatform.jna.LibCBackedTerminalDetector.isTerminal(LibCBackedTerminalDetector.java:35)
        ...23 more

      Any idea how to further debug this? It looks like something wrong happening at the very beginning of execution. Running with --debug as suggested does not add any information.

      TIA
      Andrea
      ----------------------------------------------------------------------------------------
      [1] http://forums.gradle.org

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            forums Gradle Forums
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: