Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRL-UG-API recompiles always #2

Open
stephanmg opened this issue Aug 24, 2020 · 36 comments
Open

VRL-UG-API recompiles always #2

stephanmg opened this issue Aug 24, 2020 · 36 comments
Assignees
Labels

Comments

@stephanmg
Copy link
Member

stephanmg commented Aug 24, 2020

After installing VRL-UG the API is being recompiled, which is fine.

There seems to be no error in compilation of the API I presume, because it reports as successful.

Then I restart VRL-Studio as suggested and then the API is being recompiled again (See screenshot below).
Repeat workflow, e.g. close VRL-Studio, and start VRL-Studio will compile the API again... and so on.

2020-08-24-152616_1920x1080_scrot

Is there anything I am missing here?

Here is the log which I did not save by accident previously:

>> starting with no param
>> detected x86 (64 bit) os
>> using java executable from: jre/x64/bin/java
Picked up JAVA_TOOL_OPTIONS: 
>> init Studio.class logger
Aug 25, 2020 2:13:43 PM eu.mihosoft.vrlstudio.main.Studio main
INFO: AppFolder: /home/stephan/Downloads/VRL-Studio
>> VRL Version: 0.4.4.0.3, build: 2018/10/31 13:49:41
 --> running on Java Version: 1.8.0_152 (Oracle Corporation)
 --> OS: Linux (x64)
 --> pid: 2221
>> Property Folder Options:
 --> using property folder template, path: resources/studio-resources//property-folder-template
 --> using custom property folder suffix, suffix: default
 --> initializing property folder: /home/stephan/.vrl/0.4.4/default
>> installing payload plugins: [failed]                                                                                                                                       
 --> project main class not found (assuming there is no project)                                                                                                              
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt-natives-linux-amd64.jar" to system classpath                                                   
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt-natives-windows-amd64.jar" to system classpath                                                 
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/args4j-2.0.21.jar" to system classpath                                                                    
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt-natives-windows-i586.jar" to system classpath                                                  
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/VRL.jar" to system classpath                                                                              
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jpedal_lgpl.jar" to system classpath                                                                      
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt.jar" to system classpath                                                                       
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all-natives-windows-amd64.jar" to system classpath                                                   
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen.jar" to system classpath                                                                          
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all.jar" to system classpath                                                                         
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt-natives-macosx-universal.jar" to system classpath                                              
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all-natives-macosx-universal.jar" to system classpath                                                
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all-natives-linux-i586.jar" to system classpath                                                      
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/gluegen-rt-natives-linux-i586.jar" to system classpath                                                    
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/bcpg-jdk15on-147.jar" to system classpath                                                                 
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all-natives-windows-i586.jar" to system classpath                                                    
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/glg2d-0.5-SNAPSHOT.jar" to system classpath
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/bcprov-jdk15on-147.jar" to system classpath
>> adding "file:/home/stephan/Downloads/VRL-Studio/.application/lib/jogl-all-natives-linux-amd64.jar" to system classpath
>> ClassPathUpdater.addAllJarsInDir("custom-lib"): directory does not exist!
>> Plugin Options:
 --> disabling checksum test
 --> no plugin path specified, using default.
 --> installing "VRL-UG-API.jar"
>> searching for plugins in "/home/stephan/.vrl/0.4.4/default/plugin-updates/VRL-UG-API.jar".
>> platform location: eu/mihosoft/vrl/plugin/content/natives/linux/x64//natives.zip
 --> deleting cachefile: vrl-ug-api.jar.xml [ok]
>> loading plugin from cache
 --> plugin "VRL-UG" found
--> plugin = "VRL-UG-0.2.2" already installed. Skipping installation.
>> loading plugin from cache
 --> plugin "VRL-VRN-Generator" found
--> plugin = "VRL-VRN-Generator-0.0.1" already installed. Skipping installation.
>> searching for plugins in "/home/stephan/.vrl/0.4.4/default/plugins/vrl-ug-api.jar".
>> platform location: eu/mihosoft/vrl/plugin/content/natives/linux/x64//natives.zip
 --> plugin "VRL-UG-API" found
>> saving plugin cache
>> loading plugin from cache
 --> plugin "Groovy-Support" found
>> loading plugin from cache
 --> plugin "VRL-JFreeChart" found
>> Init Plugins ( #6 )
>> Plugin (1): VRL-0.4.4.0.3
>> Plugin (2): VRL-JFreeChart-0.2.5.1
>> Plugin (3): VRL-UG-0.2.2
 -- UG(NONE) -- 
java.lang.ClassNotFoundException: edu.gcsc.vrl.ug.api.UGAPI
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at edu.gcsc.vrl.ug.UG.findCompatibleAPI(UG.java:766)
        at edu.gcsc.vrl.ug.UG.<init>(UG.java:644)
        at edu.gcsc.vrl.ug.UG.getInstance(UG.java:872)
        at edu.gcsc.vrl.ug.UG.getInstance(UG.java:910)
        at edu.gcsc.vrl.ug.Configurator.init(Configurator.java:455)
        at eu.mihosoft.vrl.system.VRL.initPlugins(VRL.java:605)
        at eu.mihosoft.vrl.system.VRL.initAll(VRL.java:334)
        at eu.mihosoft.vrlstudio.main.Studio.main(Studio.java:2537)
>> loading native libraries:
 --> libug4.so [OK]
 --> libCompileInfo.so [OK]
 --> done.
 --> VRL-UG-API missing.
 --> Recompiling API...
>> UG-Build-Location (Automatic Compilation): /home/stephan/.vrl/0.4.4/default/tmp/0/968c0398-f322-42a7-a4d6-3cc9927a69ee
>> UG-Build-Location (Gradle Project):        /home/stephan/.vrl/0.4.4/default/tmp/0/669246c2-b050-4265-8b2c-12ea8508bcc2/VRL-UG-API
>> API code generation done.
>> Plugin (4): VRL-UG-API-0.2.2
 --> VRL-UG-API: installing/updating:
 --> not installing content "natives" (not available or still up to date)
 --> not installing content "help" (not available or still up to date)
 --> VRL-UG-API: calling install()
>> Plugin (5): Groovy-Support-0.1
>> Plugin (6): VRL-VRN-Generator-0.0.1
>> 3D Options:
 --> enabling 3D rendering
>> Graphics2D config:
 --> type not specified, using system default
>> Debugging Options:
 --> Warning: no debugging option specified! Default: no
>> register plugins with canvas: 
 --> VRL-0.4.4.0.3 (ok)
 --> Groovy-Support-0.1 (ok)
>> Default Project Options:
 --> using specified default project file: default.vrlp
>> VRLUpdater: host unreachable: http://vrl-studio.mihosoft.eu/updates/linux/repository.xml
@miho
Copy link
Member

miho commented Aug 28, 2020

It should not report successful compilation. From your output I can see that it didn't create the Java library. That's a bug.

You could try to copy the tmp-folder with the gradle-project (see this line in your log):

 /home/stephan/.vrl/0.4.4/default/tmp/0/669246c2-b050-4265-8b2c-12ea8508bcc2/VRL-UG-API

If you open that in an IDE it should highlight compile errors that occur during the build process. You can also manually build the gradle project via the gradle CLI. In the past, most of these compile errors are related to ug4-registry-entries that violate the inheritance rules used by most statically typed languages (C++, Java, ...). For other bindings, such as LUA, Groovy and Python this would most likely not be a problem.

@stephanmg
Copy link
Member Author

stephanmg commented Aug 28, 2020

@miho thank you. I will give this a shot and will then come back to you.

@stephanmg
Copy link
Member Author

stephanmg commented Aug 28, 2020

I invoked ./gradlew jar on this Gradle project. Here is the output (Attached).
error.log

Here is the beginning of the full error.log file (It mainly complains about UGObjectInfo and Pointer):

> Task :compileJava NO-SOURCE
> Task :compileGroovy
startup failed:
/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AInt.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AInt.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ANumber.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ANumber.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 10: unable to resolve class edu.gcsc.vrl.ug.types.RemoteLoadFileStringType
 @ line 10, column 1.
   import edu.gcsc.vrl.ug.types.RemoteLoadFileStringType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 8: unable to resolve class edu.gcsc.vrl.ug.types.CondUserDataType
 @ line 8, column 1.
   import edu.gcsc.vrl.ug.types.CondUserDataType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 11: unable to resolve class edu.gcsc.vrl.ug.types.RemoteLoadFileType
 @ line 11, column 1.
   import edu.gcsc.vrl.ug.types.RemoteLoadFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 14: unable to resolve class edu.gcsc.vrl.ug.types.UserDataType
 @ line 14, column 1.
   import edu.gcsc.vrl.ug.types.UserDataType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 9: unable to resolve class edu.gcsc.vrl.ug.types.RemoteFileType
 @ line 9, column 1.
   import edu.gcsc.vrl.ug.types.RemoteFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 13: unable to resolve class edu.gcsc.vrl.ug.types.RemoteSaveFileType
 @ line 13, column 1.
   import edu.gcsc.vrl.ug.types.RemoteSaveFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 12: unable to resolve class edu.gcsc.vrl.ug.types.RemoteSaveFileStringType
 @ line 12, column 1.
   import edu.gcsc.vrl.ug.types.RemoteSaveFileStringType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition1.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition1.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition2.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition2.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition3.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition3.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening.groovy: 7: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 7, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=true, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening.groovy: 7: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 7, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=true, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/4bae4b41-03f3-4030-a4d2-afafe60a7f2b/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.

@miho
Copy link
Member

miho commented Aug 28, 2020

It looks like it doesn't find all dependencies. Could it be that you are using a different VRL version for building the VRL-UG plugin? Maybe try to set the vrl directory in the build.properties file of the generated gradle project. Does that help?

@stephanmg
Copy link
Member Author

Okay, so I should put the VRL.jar I build during VRL-UG into the VRL-UG-API Gradle project?

@miho
Copy link
Member

miho commented Aug 28, 2020

No, but my guess is that it uses a different .vrl directory (e.g. /home/user123/.vrl/0.4.3/default vs 0.4.5/...). It is using the VRL-UG.jar plugin as dependency during the build. If the VRL versions do match nothing needs to be specified here. But if they differ, you might run into problems.

Option 1:

change the VRL dependency in the generated build.gradle file so it matches the correct version

build.gradle: L82-83

    compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.3.2.3')
    compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.3.2.3', classifier: 'javadoc')

Option 2:

set the vrldir property in the build.properties file (see https://github.com/VRL-Studio/VRL-UG/blob/master/src/main/resources/edu/gcsc/vrl/ug/build.properties)

@stephanmg
Copy link
Member Author

stephanmg commented Aug 28, 2020

Okay I have set this in VRL-UG gradle project's build.gradle: compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.3.2.3').

The VRL-UG-API gradle project has the same: compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.3.2.3').

My VRL Studio uses VRL Version: 0.4.4.0.3, build: 2018/10/31 13:49:41.

Might this be an issue?

@miho
Copy link
Member

miho commented Aug 28, 2020

Yes, see my previous post for potential fixes.

@miho
Copy link
Member

miho commented Aug 28, 2020

and note, that the generated project in the temp folder needs the correct version as well. here's a link to the template used for generating the project: https://github.com/VRL-Studio/VRL-UG/blob/master/src/main/resources/edu/gcsc/vrl/ug/build.gradle

@stephanmg
Copy link
Member Author

stephanmg commented Aug 28, 2020

@miho I see. So I need to specify for my two projects (VRL-UG) and the generated (VRL-UG-API) the same VRL version as my VRL Studio uses, thus version 0.4.4.0.3. This should be enough?

@miho
Copy link
Member

miho commented Aug 28, 2020

Yes.

@stephanmg
Copy link
Member Author

I changed in VRL-UG project the dependency to use VRL 0.4.4.0.3. Then delete my .vrl folder. I build VRL-UG with ./gradlew jar then installed the VRL-Plugin via the Plugins -> Install Plugins facility in VRL-Studio. (VRL-Studio uses VRL 0.4.4.0.3 as before).

The effect is as before?

> Task :compileJava NO-SOURCE
> Task :compileGroovy
startup failed:
/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AInt.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AInt.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ANumber.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ANumber.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 10: unable to resolve class edu.gcsc.vrl.ug.types.RemoteLoadFileStringType
 @ line 10, column 1.
   import edu.gcsc.vrl.ug.types.RemoteLoadFileStringType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 8: unable to resolve class edu.gcsc.vrl.ug.types.CondUserDataType
 @ line 8, column 1.
   import edu.gcsc.vrl.ug.types.CondUserDataType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 11: unable to resolve class edu.gcsc.vrl.ug.types.RemoteLoadFileType
 @ line 11, column 1.
   import edu.gcsc.vrl.ug.types.RemoteLoadFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 14: unable to resolve class edu.gcsc.vrl.ug.types.UserDataType
 @ line 14, column 1.
   import edu.gcsc.vrl.ug.types.UserDataType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 9: unable to resolve class edu.gcsc.vrl.ug.types.RemoteFileType
 @ line 9, column 1.
   import edu.gcsc.vrl.ug.types.RemoteFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 13: unable to resolve class edu.gcsc.vrl.ug.types.RemoteSaveFileType
 @ line 13, column 1.
   import edu.gcsc.vrl.ug.types.RemoteSaveFileType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APIPluginConfiguratorImpl.groovy: 12: unable to resolve class edu.gcsc.vrl.ug.types.RemoteSaveFileStringType
 @ line 12, column 1.
   import edu.gcsc.vrl.ug.types.RemoteSaveFileStringType;
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition1.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition1.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition2.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition2.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition3.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosition3.groovy: 6: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 6, column 1.
   @UGObjectInfo(instantiable=false, groupRoot=false, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening.groovy: 7: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 7, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=true, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening.groovy: 7: unable to resolve class UGObjectInfo ,  unable to find class for annotation
 @ line 7, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=true, groupChild=false, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/05613287-38ad-4317-bacd-d67fc60fe09a/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 6: unable to resolve class edu.gcsc.vrl.ug.UGObject 
 @ line 6, column 1.

error.log

@miho
Copy link
Member

miho commented Aug 28, 2020

You also need to change the version in the template gradle (see build.gradle link to the resource folder from above).

@stephanmg
Copy link
Member Author

You also need to change the version in the template gradle (see build.gradle link to the resource folder from above).

Yes, I did change the version in the template gradle (build.gradle).

@miho
Copy link
Member

miho commented Aug 28, 2020

Ok, then I will try to compile it on my machine.

Maybe you can just copy the 0.4.4 to 0.4.3 in the meantime. Symlink might also work.

@stephanmg
Copy link
Member Author

I am confused about the 0.4.4 to 0.4.3. I have only one folder in .vrl: 0.4.4

@stephanmg
Copy link
Member Author

stephanmg commented Sep 22, 2020

@miho

Did you have a chance to test this?

@stephanmg
Copy link
Member Author

stephanmg commented Nov 10, 2020

@miho could you give me some more advice here?

@miho
Copy link
Member

miho commented Jan 23, 2021

It seems to be related to an out-of-memory error. If I compile the api manually via gradle (see README.md) I get an out-of-memory error. It looks like the number of registered classes highly increased. I would recommend you copy the auto generated gradle project to a safe location where it's not overwritten by VRL. I made some changes to the build.gradle file to compile it with the newest version of java and vrl. Here's the modified file (I will commit the file if it works for you):

apply plugin: 'groovy'

sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

wrapper {
    gradleVersion = '6.8'
}


buildscript {

    repositories {
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.5.0.0')
    }
}

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.10'

    compileClasspath group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.12'

    compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.5.0.0')
    compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.5.0.0', classifier: 'javadoc')

    compile group: 'org.apache.xmlrpc', name: 'xmlrpc-client', version: '3.1.3'
    compile group: 'org.apache.xmlrpc', name: 'xmlrpc-server', version: '3.1.3'

    // local dependencies can be added by putting them to the lib/jar folder
    compile files("lib/jars/vrl-ug.jar")
    compile files(getVRLDir() + "/plugins/VRL-UG.jar")
}

def loadProperties(String sourceFileName) {

    def config = new Properties()
    def propFile = new File(projectDir,sourceFileName)

    if (propFile.isFile()) {
        config.load(new FileInputStream(propFile))
        for (Map.Entry property in config) {
            ext.set(property.key, property.value)
        }
    }
}

// loads the property file
loadProperties('build.properties')

String getVRLDir() {

    loadProperties('build.properties')

    String result

    if (vrldir == null || vrldir.isEmpty()) {
        result = System.getProperty("user.home");
        result+= "/.vrl/"
        result+= eu.mihosoft.vrl.system.Constants.VERSION_MAJOR
        result+= "/default"
    } else {
        result = vrldir
    }

    return result
}

// compiles and installs the vrl plugin to the specified folder
task installVRLPlugin(dependsOn: [clean,jar]) {
    doLast {
        println(">> copying vrl plugin to: " + getVRLDir() + "/plugin-updates")
        copy {
            from buildDir.getPath() + "/libs/" + rootProject.name + ".jar"
            into getVRLDir() + "/plugin-updates"
            include '**/*.jar'
        }
    }
}

tasks.withType(GroovyCompile) {
    configure(groovyOptions.forkOptions) {
        memoryMaximumSize = '1g'
        jvmArgs = ['-XX:MaxPermSize=512m', '-Xms512m', '-Xmx4096g']
    }
}

Please make sure the path to the vrl-ug.jar is set correctly in the dependency section. I just copied it to lib/jars/ and specified it (see build file above).

Now you can build it in most IDEs (IntellIJ, Eclipse, VS Code etc.). But I prefer the CLI:

./gradlew assemble

or

./gradlew installVRLPlugin

to install the plugin.

When I tried to compile it I got several errors. It looks like the structure of the registered UG classes has changed. If you want to give it a try make sure class groups have a common base class. Alternatively, you could update the code generator to generate common base classes for each class group if none has been provided. Let me know if this works for you.

@miho
Copy link
Member

miho commented Jan 23, 2021

I should have mentioned that the erros you got are gone. All the classes it complained about are found on my system. Here are the errors I am getting (which are presumably related to the class group issue mentioned above):

UG-API\src\main\groovy\edu\gcsc\vrl\ug\api\I_L2QuotientSpace1dCPU3.groovy: 34: unable to resolve class Const__I_UserNumber 
 @ line 34, column 9.
           Const__I_UserNumber p2
           ^

C:\Users\miho\tmp\VRL-UG-API\src\main\groovy\edu\gcsc\vrl\ug\api\I_L2QuotientSpace1dCPU3.groovy: 40: unable to resolve class Const__I_UserNumber 
 @ line 40, column 9.
           Const__I_UserNumber p2, 
           ^

C:\Users\miho\tmp\VRL-UG-API\src\main\groovy\edu\gcsc\vrl\ug\api\I_L2QuotientSpace1dCPU3.groovy: 47: unable to resolve class I_GridFunction 
 @ line 47, column 9.
           I_GridFunction p0
           ^

@stephanmg
Copy link
Member Author

stephanmg commented Jan 25, 2021

Thank you @miho. I will now try and see if it works for me. Anyway I should end up with the 3 errors you show above, correct?

Update: I see, I reproduce the same three errors.

@stephanmg
Copy link
Member Author

stephanmg commented Jan 26, 2021

@miho: Do I understand correctly that GridFunction and ConstUserNumber are missing an explicit base class in the C++ or did you mean in the generated Groovy code? Can one avoid to use a class group for these classes in the C++ registry? (Both classes seem to have a base class on the C++ side.)

miho added a commit that referenced this issue Jan 27, 2021
@miho
Copy link
Member

miho commented Jan 27, 2021

It looks like this error was also related to the memory issue. Considering the fact that the code generator creates more that half a million lines of code just for the ConvectionDiffusion & SmallStrainMechanics plugins with default options I think we should disable the auto-compile feature that was once very convenient.

I just updated the gradle files. So the issue should be fixed now. You should be able to compile the API with ./gradlew installVRLPlugin.

BTW. the code generation takes some time. Make sure you wait until it's done. If you run VRL from the terminal you should see the following output:

>> UG-Build-Location (Automatic Compilation): C:\Users\miho\.vrl\0.4.4\default\tmp\0\74831801-11ba-4333-89e4-39060aae0744
>> UG-Build-Location (Gradle Project):        C:\Users\miho\.vrl\0.4.4\default\tmp\0\de2ce555-34d5-480e-a090-9f1e74ce05d0\VRL-UG-API
>> API code generation done.

Let me know if there are remaining issues.

@miho
Copy link
Member

miho commented Jan 27, 2021

Here's my version of the compiled API:

VRL-UG-API.zip

@stephanmg
Copy link
Member Author

stephanmg commented Jan 28, 2021

@miho do I also have to re-compile ug4/ugcore? I clone the VRL-UG repository, put the binaries in the natives folder, and used gradle assemble. I am using VRL-Studio / VRL 0.4.4.0.3 - so I put the VRL-UG.jar into the .vrl/0.4.4/default/plugin-update folder. API will be recompiled and the vrl-ug-api.jar is created, however it will then lead again to a recompilation when I had closed VRL-Studio.

The natives I put into:
VRL-UG/src/main/resources/eu/mihosoft/vrl/plugin/content/natives/linux/x64

@stephanmg
Copy link
Member Author

I see, my UG API isn't build because of this:

gradle jar
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :compileGroovy
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007bcdd4000000, 137438953472, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 137438953472 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/stephan/.gradle/workers/hs_err_pid32611.log

Any idea how to handle this @miho ? Can't I use OpenJDK?

Best,
Stephan

@miho
Copy link
Member

miho commented Jan 29, 2021

For this type of error it's important to know the OS, the exact Java version etc. Without this information I can only guess. Anyway, here are some thoughts:

First of all, you can use OpenJDK. It's the reference implementation of Java and we use it almost exclusively. I only test on other JVMs to see if VRL is compatible to those implementations as well.

The error message is not directly related to the Java heap. It's related to the native parts of Java and it's the operating system that cannot supply the amount of RAM requested by the JVM process. Files like hs_err_pid32611.log indicate that the process crashed in native code. The Java equivalent of this would be an "out of memory" exception.

Are you running the build process inside a virtualized server (travis, gh action etc.) or a machine with only 4GB of RAM or less? In this case you could reduce the amount of RAM for the Groovy compiler in the build.gradle file.

@stephanmg
Copy link
Member Author

stephanmg commented Jan 29, 2021

Please @miho let me know fi there is anything apparently wrong below:

Yes I think you specified 4096G instead of 4096M in the build.gradle. Is this intentional? I believe not. I'll recompile ugcore head revision from the instructions in the VRL-UG README, then try to build the API again.

Okay, I recompiled ugcore (-DTARGET=vrl, -DEMBEDDED_PLUGINS=ON), using the latest VRL-UG repository, adjusted in the build.gradle the value for -Xmx to 2048m but the errors remain, when I use gradle assemble on the VRL-UG-API project location in my temporary folder ~/.vrl/0.4.4/default/tmp/0/151846df-d671-4dd0-b963-2567ac13f5ef/VRL-UG-API.

Here are my cmake build settings:


-- 
-- Info: Current options:
-- Info: TARGET:            vrl (options are: ugshell, libug4, vrl, vrlgrid, libgrid, gridshell, ugplugin, amg, luashell)
-- Info: DIM:               ALL (options are: 1, 2, 3, ALL, "1;2", "1;3", "2;3")
-- Info: CPU:               ALL  (options are: 1, 2, 3, 4, 5, VAR, ALL, "2;4", "1;3;4" , ...)
-- Info: PRECISION:         double (options are: single, double)
-- Info: STATIC_BUILD:      OFF (options are: ON, OFF)
-- Info: DEBUG:             OFF (options are: ON, OFF)
-- Info: DEBUG_LOGS:        OFF (options are: ON, OFF)
-- Info: PARALLEL:          OFF (options are: ON, OFF)
-- Info: PCL_DEBUG_BARRIER: OFF (options are: ON, OFF)
-- Info: PROFILER:          None (options are: None, Shiny, Scalasca, Vampir, ScoreP)
-- Info: PROFILE_PCL:       OFF (options are: ON, OFF)
-- Info: CPU_FREQ:          OFF (options are: ON, OFF)
-- Info: PROFILE_BRIDGE:    OFF (options are: ON, OFF)
-- Info: LAPACK:            OFF (options are: ON, OFF)
-- Info: BLAS:              OFF (options are: ON, OFF)
-- Info: INTERNAL_BOOST:    ON (options are: ON, OFF)
-- Info: EMBEDDED_PLUGINS   ON (options are: ON, OFF)
-- Info: COMPILE_INFO       ON (options are: ON, OFF)
-- Info: USE_LUA2C          OFF (options are: ON, OFF)
-- Info: USE_LUAJIT         OFF (options are: ON, OFF)
-- 
-- Info: External libraries (path which contains the library or ON if you used uginstall):
-- Info: TETGEN:            
-- Info: HLIBPRO:           
-- Info: USE_JSON:          OFF (options are: ON, OFF)
-- Info: USE_XEUS:          OFF (options are: ON, OFF)
-- 
-- Info: C   Compiler: /usr/lib/ccache/cc (ID: GNU)
-- Info: C++ Compiler: /usr/lib/ccache/c++ (ID: GNU)
-- 
-- Info: Using CPU Algebra.
-- Info: compiling with cxx flags:  -Wall -Wno-multichar -Wno-unused-local-typedefs -Wno-maybe-uninitialized -O3 -DNDEBUG -funroll-loops -ftree-vectorize
-- Info: compiling with c flags:  -Wall -Wno-multichar -Wno-unused-local-typedefs -Wno-maybe-uninitialized -O3 -DNDEBUG -funroll-loops -ftree-vectorize
-- Info: Trying to activate 'CMAKE_CXX_STANDARD 11'
-- Info: Not using LAPACK, use -DLAPACK=ON to enable.
-- Info: Not using BLAS, use -DBLAS=ON to enable.
-- Info: Internal Boost 
-- Info: Including Boost from /home/stephan/test/ug4/ugcore/cmake/../../externals/BoostForUG4/
-- Info: COMPILE_INFO enabled. Causes relinking on each run of make.
-- 
-- Info: Enabled plugins:
-- Info: Disabled plugins:
-- 
-- Hint: To enable/disable a plugin 'PLUGIN_NAME' use the cmake option: -DPLUGIN_NAME=ON/OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephan/test/ug4/build


Here are the first 100 lines of error:

 Task :compileJava NO-SOURCE

> Task :compileGroovy
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
startup failed:
/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 6: unable to resolve class I_APosterioriCoarsening3d 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 116: unable to resolve class I_APosterioriCoarsening3d 
 @ line 116, column 121.
   ame="APosterioriCoarsening3d")I_APosteri
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 114: unable to resolve class I_APosterioriCoarsening3d 
 @ line 114, column 5.
       @ReferenceMethodInfo()
       ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 6: unable to resolve class I_AbsoluteMarking3d 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 116: unable to resolve class I_AbsoluteMarking3d 
 @ line 116, column 109.
   rue, name="AbsoluteMarking3d")I_Absolute
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 114: unable to resolve class I_AbsoluteMarking3d 
 @ line 114, column 5.
       @ReferenceMethodInfo()
       ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 6: unable to resolve class I_ActiveSet3dCPU1 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 27: unable to resolve class Const__I_GridFunction 
 @ line 27, column 137.
   ptions=";serialization=false")Const__I_G
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 37: unable to resolve class I_ILagrangeMultiplierDisc 
 @ line 37, column 158.
   ptions=";serialization=false")I_ILagrang
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 47: unable to resolve class I_GridFunction 
 @ line 47, column 105.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 57: unable to resolve class I_GridFunction 
 @ line 57, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 58: unable to resolve class I_GridFunction 
 @ line 58, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 59: unable to resolve class I_GridFunction 
 @ line 59, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 60: unable to resolve class I_GridFunction 
 @ line 60, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 71: unable to resolve class I_Matrix 
 @ line 71, column 98.
   ptions=";serialization=false")I_Matrix p
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 81: unable to resolve class I_GridFunction 
 @ line 81, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 82: unable to resolve class Const__I_GridFunction 
 @ line 82, column 123.
   ptions=";serialization=false")Const__I_G
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 92: unable to resolve class I_Vector 
 @ line 92, column 98.
   ptions=";serialization=false")I_Vector p
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 93: unable to resolve class Const__I_Matrix 
 @ line 93, column 111.
   ptions=";serialization=false")Const__I_M
                                 ^

One thing I noted is that the binaries/natives go to VRL-UG/src/main/resources/eu/mihosoft/vrl/plugin/content/natives/linux/x64/natives.zip but the imports import edu.gcsc.vrl.ug.types.UserDataType; are in a different package/namespace?

@miho
Copy link
Member

miho commented Feb 3, 2021

Sorry, that was a typo ;)

The location of the native libraries and the package of the Java-Classes are not related. The import seems correct.

What irritates me is that you could reproduce the errors I got earlier, which means the compiler found the classes from edu.gcsc.vrl.ug..

Please check that the dependencies for VRL-UG in the auto-generated gradle-file are specified correctly:

dependencies {
    // other dependencies...
    // local dependencies can be added by putting them to the lib/jar folder
    compile files(getVRLDir() + "/plugins/VRL-UG.jar") // check upper- vs. lower-case
}

Try adding the vrl-ug.jar manually, e.g., by adding compile files("lib/jars/vrl-ug.jar").

@stephanmg
Copy link
Member Author

Thanks.

I added the line to the build.gradle but the result is the same.

The first 100 lines:
> Task :clean
> Task :compileJava NO-SOURCE

> Task :compileGroovy
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
startup failed:
/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 6: unable to resolve class I_APosterioriCoarsening3d 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 116: unable to resolve class I_APosterioriCoarsening3d 
 @ line 116, column 121.
   ame="APosterioriCoarsening3d")I_APosteri
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/APosterioriCoarsening3d.groovy: 114: unable to resolve class I_APosterioriCoarsening3d 
 @ line 114, column 5.
       @ReferenceMethodInfo()
       ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 6: unable to resolve class I_AbsoluteMarking3d 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 116: unable to resolve class I_AbsoluteMarking3d 
 @ line 116, column 109.
   rue, name="AbsoluteMarking3d")I_Absolute
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/AbsoluteMarking3d.groovy: 114: unable to resolve class I_AbsoluteMarking3d 
 @ line 114, column 5.
       @ReferenceMethodInfo()
       ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 6: unable to resolve class I_ActiveSet3dCPU1 
 @ line 6, column 1.
   @UGObjectInfo(instantiable=true, groupRoot=false, groupChild=true, constClass=false)
   ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 27: unable to resolve class Const__I_GridFunction 
 @ line 27, column 137.
   ptions=";serialization=false")Const__I_G
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 37: unable to resolve class I_ILagrangeMultiplierDisc 
 @ line 37, column 158.
   ptions=";serialization=false")I_ILagrang
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 47: unable to resolve class I_GridFunction 
 @ line 47, column 105.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 57: unable to resolve class I_GridFunction 
 @ line 57, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 58: unable to resolve class I_GridFunction 
 @ line 58, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 59: unable to resolve class I_GridFunction 
 @ line 59, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 60: unable to resolve class I_GridFunction 
 @ line 60, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 71: unable to resolve class I_Matrix 
 @ line 71, column 98.
   ptions=";serialization=false")I_Matrix p
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 81: unable to resolve class I_GridFunction 
 @ line 81, column 110.
   ptions=";serialization=false")I_GridFunc
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 82: unable to resolve class Const__I_GridFunction 
 @ line 82, column 123.
   ptions=";serialization=false")Const__I_G
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 92: unable to resolve class I_Vector 
 @ line 92, column 98.
   ptions=";serialization=false")I_Vector p
                                 ^

/home/stephan/.vrl/0.4.4/default/tmp/0/067e5746-099c-457c-bb78-2c7cfc0ecb39/VRL-UG-API/src/main/groovy/edu/gcsc/vrl/ug/api/ActiveSet3dCPU1.groovy: 93: unable to resolve class Const__I_Matrix 
 @ line 93, column 111.
   ptions=";serialization=false")Const__I_M

@stephanmg
Copy link
Member Author

I am pretty sure that I recompiled ug4 with DIM=ALL, but I wonder if DIM=3 or so, would lead to the errors above, or not.

Would DIM=3 result in these kind of errors above?! Are my UG build settings okay?

@stephanmg
Copy link
Member Author

Any hints here?

@miho
Copy link
Member

miho commented Mar 20, 2021

I could successfully compile it with your DIM settings (on Windows 10).

@stephanmg
Copy link
Member Author

stephanmg commented Mar 22, 2021

Thank you, could you let us know which JDK you used and which ug revision / plugins? (A colleague and I both could not make it work so far on Windows or Ubuntu)

@miho
Copy link
Member

miho commented Apr 9, 2021

I recently tested it with JDK 8, 11 and 14, UG commit id: c3345494625ba56e29c4c461bcd0b33dfd32a8bd). I compiled the API for the plugins ConvectionDiffusion, SmallStrainMechanics and LuaShell.

@stephanmg
Copy link
Member Author

Thank you, we will try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants