ibcn-cloudlet / dianne

DIANNE - DIstributed Artificial Neural NEtworks
http://dianne.intec.ugent.be
GNU Affero General Public License v3.0
22 stars 8 forks source link

I got following error when I execute./gradlew build [Any of them; all , core etc.] #11

Closed zhuhuilong closed 6 years ago

zhuhuilong commented 6 years ago

image

tverbele commented 6 years ago

What is your Java JDK installation?

zhuhuilong commented 6 years ago

image

tverbele commented 6 years ago

What is the output of echo $JAVA_HOME, this should point to the java installation dir, something like /usr/lib/jvm/java-8-openjdk

khalidpandit commented 6 years ago

/dianne$ echo $JAVA_HOME /usr

my jdk version is 1.8 and i am getting the same error..please help me with this

tverbele commented 6 years ago

I think your $JAVA_HOME is pointing to a wrong directory. This should be the home dir of your Java installation instead of just /usr. What is the output of whereis java?

khalidpandit commented 6 years ago

whereis

do i need to keep it in /usr/lib or /usr/share

tverbele commented 6 years ago

It seems your JAVA_HOME is configured wrongly. Try export JAVA_HOME=/usr/lib/jvm/java-8-oracle

khalidpandit commented 6 years ago

qq i changed theJAVA_HOME but it still hangs on 87%

tverbele commented 6 years ago

This is actually a successful run, since we integrated launching into the build system for easy testing, the 'build' will only reach 100% once you again stop the run... You can also use the :tools:export.all tasks and then manually launch the create .jar file using java -jar

khalidpandit commented 6 years ago

this does not show the ui builder. how can i get ui builder

tverbele commented 6 years ago

What does it show when you point your browser to localhost:8080?

khalidpandit commented 6 years ago

HTTP ERROR: 404

Problem accessing /. Reason:

Not Found

Powered by Jetty://

tverbele commented 6 years ago

What is the list of bundles if you type lb in the window where the buid runs?

khalidpandit commented 6 years ago

b

tverbele commented 6 years ago

You are missing quite some of the required bundles in this launch configuration. Did you change any of the default bndrun files?

khalidpandit commented 6 years ago

build basically this is the error while ./gradlew build

khalidpandit commented 6 years ago

i did not change any bndrun file

tverbele commented 6 years ago

Ah ok, the native build has failed linking due to missing gfortran library. Install using sudo apt-get install gfortran and try to build again?

khalidpandit commented 6 years ago

sudo apt-get install gfortran does not work..is there any other way of installing gfortran

tverbele commented 6 years ago

Strainge, the gfortran package should be available on your ubuntu system (https://packages.ubuntu.com/trusty/gfortran). What error do you get? Maybe do an sudo apt-get update first?

khalidpandit commented 6 years ago

i installed gfortran but still ./gradlew build fails .... what should i do 1

eliasdc commented 6 years ago

It seems your computer is missing a lot of general development dependencies. In our getting started guide we state that the software requires the following dependencies for compiling from source:

In the latest screenshot it states cmake: command not found which indicates not all dependencies are installed on your system. For this specific error the following should help you progress:

sudo apt-get update
sudo apt-get install cmake build-essential
khalidpandit commented 6 years ago

i installed the cmake but still build fails cmake --version cmake version 2.8.3

12

tverbele commented 6 years ago

Something went wrong during the build of ALE (I cannot see what from the screenshot). You can skip ALE in the build by adding -x :be.iminds.iot.dianne.rl.environment.ale:build to your gradle command.

khalidpandit commented 6 years ago

./gradlew -x build was successful but run.all stops at 87% Failed to start bundle be.iminds.iot.dianne.tensor-0.7.0.201803281542, exception Resolution failed [BundleRequirement {tensor.native}] ! Failed to start bundle be.iminds.iot.dianne.tensor.util-0.7.0.201803281542, exception Resolution failed [BundleRequirement{Import-Package be.iminds.iot.dianne.tensor;version="[0.7,1)"}] ! Failed to start bundle be.iminds.iot.dianne.api-0.7.0.201803281542, exception Resolution failed [BundleRequirement{Import-Package be.iminds.iot.dianne.tensor;version="[0.7,1)"}]

tverbele commented 6 years ago

./gradle -x build will skip the entire build and do nothing. ./gradle build -x :be.iminds.iot.dianne.rl.environment.ale:build will build everything except the failing ALE bundle. It is the latter that you need.

khalidpandit commented 6 years ago

../../../be.iminds.iot.dianne.tensor/generated/jni-headers/be_iminds_iot_dianne_tensor_Tensor.h:2:17: fatal error: jni.h: No such file or directory compilation terminated. make[2]: [Tensor.o] Error 1 Makefile:27: recipe for target 'Tensor.o' failed make[2]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.tensor.native/jni/torch' Makefile:25: recipe for target 'torch' failed make[1]: [torch] Error 2 make[1]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.tensor.native/jni' Makefile:10: recipe for target 'install' failed make: *** [install] Error 2 :be.iminds.iot.dianne.tensor.native:buildNative FAILED 5

khalidpandit commented 6 years ago

./gradlew build -x :be.iminds.iot.dianne.rl.environment.ale:buildNative i used this command still getting error

tverbele commented 6 years ago

This is again the error from before where JAVA_HOME is configured incorrectly. export JAVA_HOME=/usr/lib/jvm/java-8-oracle jni.hshould be residing in /usr/lib/jvm/java-8-oracle/include/

khalidpandit commented 6 years ago

I have my java path set in bashrc and /etc/environment as well.

What shall be the path?

I face following error

whereis java java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz khalid@khalid-HP-ZBook-15:~$ echo $JAVA_HOME /usr/lib/jvm/java-8-oracle/include/ khalid@khalid-HP-ZBook-15:~$ cd dianne/ khalid@khalid-HP-ZBook-15:~/dianne$ ./gradlew

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle/include/

Please set the JAVA_HOME variable in your environment to match the location of your Java installation.

khalid@khalid-HP-ZBook-15:~/dianne$

khalidpandit commented 6 years ago

when i look for error it displays zlib is missing

khalid@khalid-HP-ZBook-15:~/dianne$ ./gradlew build Duplicate name in Manifest: Created-By. Ensure that the manifest does not have duplicate entries, and that blank lines separate individual sections in both your manifest and in the META-INF/MANIFEST.MF entry in the jar file. Configuring workspace with configuration parameters 'OS': 'Linux', 'ARCH': 'x86_64', 'osgi_os': 'Linux', 'osgi_arch': 'x86_64', extension: 'so' and 'NATIVE' lib: 'torch' :ai.onnx:compileJava UP-TO-DATE :ai.onnx:processResources UP-TO-DATE :ai.onnx:classes UP-TO-DATE :ai.onnx:jar UP-TO-DATE :ai.onnx:assemble UP-TO-DATE :ai.onnx:compileTestJava UP-TO-DATE :ai.onnx:processTestResources UP-TO-DATE :ai.onnx:testClasses UP-TO-DATE :be.iminds.iot.dianne.tensor:compileJava UP-TO-DATE :be.iminds.iot.dianne.tensor:processResources UP-TO-DATE :be.iminds.iot.dianne.tensor:classes UP-TO-DATE :be.iminds.iot.dianne.tensor:javah UP-TO-DATE :be.iminds.iot.dianne.tensor:jar UP-TO-DATE :be.iminds.iot.dianne.tensor:assemble UP-TO-DATE :be.iminds.iot.dianne.api:compileJava UP-TO-DATE :be.iminds.iot.dianne.api:processResources UP-TO-DATE :be.iminds.iot.dianne.api:classes UP-TO-DATE :be.iminds.iot.dianne.api:jar UP-TO-DATE :be.iminds.iot.dianne.api:assemble UP-TO-DATE :be.iminds.iot.dianne.nn.util:compileJava UP-TO-DATE :be.iminds.iot.dianne.nn.util:processResources UP-TO-DATE :be.iminds.iot.dianne.nn.util:classes UP-TO-DATE :be.iminds.iot.dianne.nn.util:jar UP-TO-DATE :be.iminds.iot.dianne.nn.util:assemble UP-TO-DATE :be.iminds.iot.dianne.nn.learn:compileJava UP-TO-DATE :be.iminds.iot.dianne.nn.learn:processResources UP-TO-DATE :be.iminds.iot.dianne.nn.learn:classes UP-TO-DATE :be.iminds.iot.dianne.nn.learn:jar UP-TO-DATE :be.iminds.iot.dianne.nn.learn:assemble UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:generateFiles :be.iminds.iot.dianne.tensor.util:compileJava UP-TO-DATE :be.iminds.iot.dianne.tensor.util:processResources UP-TO-DATE :be.iminds.iot.dianne.tensor.util:classes UP-TO-DATE :be.iminds.iot.dianne.tensor.util:jar UP-TO-DATE :be.iminds.iot.dianne.tensor.util:assemble UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:compileJava UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:processResources UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:classes UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:javah UP-TO-DATE :be.iminds.iot.dianne.rl.environment.ale:buildNative make -C ALE ; make[1]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE' cmake -HArcade-Learning-Environment -BArcade-Learning-Environment/build -DUSE_SDL=OFF -DUSE_RLGLUE=OFF -DBUILD_EXAMPLES=OFF -- Configuring done -- Generating done -- Build files have been written to: /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build make -j 4 -C Arcade-Learning-Environment/build make[2]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[3]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' [ 0%] [ 0%] [ 0%] Building CXX object CMakeFiles/ale.dir/src/common/ScreenExporter.cpp.o Building CXX object CMakeFiles/ale-bin.dir/src/common/ScreenExporter.cpp.o Building CXX object CMakeFiles/ale-lib.dir/src/common/ScreenExporter.cpp.o make[4]: Entering directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' [ 0%] Building CXX object CMakeFiles/ale-c-lib.dir/src/common/ScreenExporter.cpp.o /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/src/common/ScreenExporter.cpp:18:18: fatal error: zlib.h: No such file or directory compilation terminated. make[4]: [CMakeFiles/ale.dir/src/common/ScreenExporter.cpp.o] Error 1 CMakeFiles/ale.dir/build.make:219: recipe for target 'CMakeFiles/ale.dir/src/common/ScreenExporter.cpp.o' failed make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' CMakeFiles/Makefile2:57: recipe for target 'CMakeFiles/ale.dir/all' failed make[3]: [CMakeFiles/ale.dir/all] Error 2 make[3]: Waiting for unfinished jobs.... [ 0%] /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/src/common/ScreenExporter.cpp:18:18: fatal error: zlib.h: No such file or directory compilation terminated. make[4]: [CMakeFiles/ale-lib.dir/src/common/ScreenExporter.cpp.o] Error 1 CMakeFiles/ale-lib.dir/build.make:219: recipe for target 'CMakeFiles/ale-lib.dir/src/common/ScreenExporter.cpp.o' failed make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' CMakeFiles/Makefile2:162: recipe for target 'CMakeFiles/ale-lib.dir/all' failed Building C object CMakeFiles/ale-c-lib.dir/src/emucore/unzip.c.o make[3]: [CMakeFiles/ale-lib.dir/all] Error 2 [ 0%] Building CXX object CMakeFiles/ale-c-lib.dir/src/emucore/CartE7.cxx.o /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/src/common/ScreenExporter.cpp:18:18: fatal error: zlib.h: No such file or directory compilation terminated. /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/src/common/ScreenExporter.cpp:18:18: fatal error: zlib.h: No such file or directory compilation terminated. make[4]: [CMakeFiles/ale-bin.dir/src/common/ScreenExporter.cpp.o] Error 1 make[4]: [CMakeFiles/ale-c-lib.dir/src/common/ScreenExporter.cpp.o] Error 1 make[4]: Waiting for unfinished jobs.... CMakeFiles/ale-bin.dir/build.make:243: recipe for target 'CMakeFiles/ale-bin.dir/src/common/ScreenExporter.cpp.o' failed make[3]: [CMakeFiles/ale-bin.dir/all] Error 2 CMakeFiles/ale-c-lib.dir/build.make:243: recipe for target 'CMakeFiles/ale-c-lib.dir/src/common/ScreenExporter.cpp.o' failed make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' CMakeFiles/Makefile2:92: recipe for target 'CMakeFiles/ale-bin.dir/all' failed /home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/src/emucore/unzip.c:11:18: fatal error: zlib.h: No such file or directory compilation terminated. CMakeFiles/ale-c-lib.dir/build.make:363: recipe for target 'CMakeFiles/ale-c-lib.dir/src/emucore/unzip.c.o' failed make[4]: [CMakeFiles/ale-c-lib.dir/src/emucore/unzip.c.o] Error 1 make[4]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' make[3]: [CMakeFiles/ale-c-lib.dir/all] Error 2 CMakeFiles/Makefile2:127: recipe for target 'CMakeFiles/ale-c-lib.dir/all' failed make[2]: [all] Error 2 make[3]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' Makefile:110: recipe for target 'all' failed make[2]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE/Arcade-Learning-Environment/build' Makefile:38: recipe for target 'Arcade-Learning-Environment/build/libale.a' failed make[1]: [Arcade-Learning-Environment/build/libale.a] Error 2 make[1]: Leaving directory '/home/khalid/dianne/be.iminds.iot.dianne.rl.environment.ale/jni/ALE' Makefile:7: recipe for target 'ALE' failed make: [ALE] Error 2 :be.iminds.iot.dianne.rl.environment.ale:buildNative FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 20.281 secs

tverbele commented 6 years ago

Khalid, are you running on the same machine? Now you are reporting stack traces on

khalid@khalid-HP-ZBook-15:~/dianne$

whereas above your screenshots indicate

khalid@khalid:

This makes it very difficult to spot your problems and help you. In short:

  1. Make sure you have all build dependencies installed
  2. Make sure you have JAVA_HOME pointing to your Java JDK installation dir, meaning that in this directory you can find include/jni.h
  3. Skip ALE from the build as this requires additional dependencies, so use the following build command ./gradle build -x :be.iminds.iot.dianne.rl.environment.ale:build

Also, why do you need to build from source? You can perfectly run Dianne using the prebuilt binaries as done in the examples repo: https://github.ugent.be/e-p/dianne-examples

khalidpandit commented 6 years ago

i was trying on khalid@khalid: first but now i stuck to khalid@khalid-HP-ZBook-15:~/dianne$..

i corrected the JAVA PATH to point to the directory where include /jni,h

now build process shows this error build

khalidpandit commented 6 years ago

while building lb command shows lb the no of bundles have increased to 44

khalidpandit commented 6 years ago

http://localhost:8080/dianne/ui/builder/builder.html in browser shows the UI dianne

khalidpandit commented 6 years ago

the layer tab does not seem to be working

it fails to deploy those modules (LAYER) deploy

eliasdc commented 6 years ago

It looks like we are getting there. First the fact that your build is still failing is because you do ./gradle build -x :be.iminds.iot.dianne.rl.environment.ale:buildNative instead of ./gradle build -x :be.iminds.iot.dianne.rl.environment.ale:build which will only skip the native build and not the complete ale project.

When running the project with ./gradlew the percentage never exceeds 90% as we run a frontend process which can be killed.

With the last screenshot I suspect you forgot to configure the modules. In the build tab double click each module to set appropriate values (not every module has configuration options but most do). This is still a bit hidden and should be improved before releasing a release candidate.