Archived

This forum has been archived. Please start a new discussion on GitHub.

Can't open include file "Ice/Metrics.ice"

Hello.

Please, see the attached build logs and let's find the root of this error:
$ ./gradlew build
:IceGridGUI:compileSlice
:glacier2:compileSlice
/home/dmitry/Downloads/zeroc/ice/slice/Glacier2/Metrics.ice:15: error: Can't open include file "Ice/Metrics.ice"
    #include <Ice/Metrics.ice>
1 error in preprocessor.

:glacier2:compileSlice FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':glacier2:compileSlice'.
> /opt/Ice-3.6.0/bin/slice2java command failed: 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.163 secs


Looking for the Metrics.ice:
sudo find / -type f -iname Metrics.ice

...results are:
/home/dmitry/Downloads/zeroc/ice/slice/Ice/Metrics.ice
/home/dmitry/Downloads/zeroc/ice/slice/IceStorm/Metrics.ice
/home/dmitry/Downloads/zeroc/ice/slice/Glacier2/Metrics.ice
/opt/Ice-3.6.0/slice/Ice/Metrics.ice
/opt/Ice-3.6.0/slice/IceStorm/Metrics.ice
/opt/Ice-3.6.0/slice/Glacier2/Metrics.ice

Checking if ICE_HOME is set:
$ echo $ICE_HOME
/opt/Ice-3.6.0

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    Hi Dimity,

    Could you try editing java/gradle/ice.gradle and move the following @line 129
        slice.srcDist = true
    

    into the else statement a few lines above it
        } else {
            iceCppDir = iceDir + "/cpp"
            slice.srcDist = true
        }
    

    Your build should work then. I will fix this in our repo for the 3.6.1 release.
  • OK. Perfect :)

    Now, let's move to the install instruction:
    $ ./gradlew install
    

    ...leads to this error:
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':IceGridGUI:copyJars'.
    > Could not copy file '/home/dmitry/Downloads/zeroc/ice/java/lib/icegridgui.jar' to '/opt/Ice-3.6.0/lib/icegridgui.jar'.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    

    Let's find the icegridgui.jar:
    $ find . -type f -iname icegridgui.jar
    
    ./lib/icegridgui.jar
    
  • dwayne
    dwayne St. John's, Newfoundland
    That is probably a permissions issue writing to /opt. Try using
    sudo ./gradlew install