ClearVolume / clearvolume

ClearVolume is a real-time live 3D visualization library designed for high-end volumetric microscopes such as SPIM and DLSM microscopes. With ClearVolume you can see live on your screen the stacks acquired by your microscope instead of waiting for offline post-processing to give you an intuitive and comprehensive view on your data.
http://clearvolume.github.io
GNU Lesser General Public License v3.0
44 stars 11 forks source link

Update build to use Gradle7.5.1 #85

Closed nicost closed 2 years ago

nicost commented 2 years ago

Tested on my Windows 10 box only. Builds successfully (including tests). The resulting ClearVolume.jar is functional (in Micro-manager on my Windows machine). I removed the JavaFX part (no idea what it is for, and if anyone still uses it). Also added the maven-publish plugin and configured it, but can not test that part as I do not have credentials.

Please note that I am a complete novice at gradle, and this is a complete hack, just to make things work. We need these builds to resume, so please use this as a basis to get things going again (hopefully easy based on this PR).

skalarproduktraum commented 2 years ago

Hey @nicost! Thanks for this valuable contribution, and apologies for not being in touch earlier :-/ The PR looks good, there's a few notes I have that I'll leave as review. With regard to Github CI, I'm happy to help out with this, we can probably take over most of the CI config we're using for scenery for that purpose.

skalarproduktraum commented 2 years ago

I also invited you to the organisation, so stuff like this becomes easier in the future 👍

nicost commented 2 years ago

I believe I addressed all the points you raised. The CI seems to fail (no idea if that is related to these changes). It would be awesome if you could merge (after testing), and get the CI going so that it will push new versions to the maven scijiva repo. Thanks!

ctrueden commented 2 years ago

I tested this PR on an Ubuntu Linux machine with a naive ./build.sh and the build failed.

Here is the log ``` $ ./build.sh Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details > Configure project : [cmake] [make] > Task :compileJava Note: /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/cleargl/ClearGLVolumeRenderer.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/volume/sink/filter/gui/ChannelFilterSinkJPanel.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. > Task :javadoc /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/cleargl/ClearGLVolumeRenderer.java:1125: warning - @param argument "pPhase" is not a parameter name. /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/cleargl/ClearGLVolumeRenderer.java:1126: warning - @param argument "pClearBuffer" is not a parameter name. /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererBase.java:1238: warning - invalid usage of tag > /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererBase.java:1249: warning - @param argument "pClipBoxBounds" is not a parameter name. /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererBase.java:1271: warning - @param argument "pClipBoxBounds" is not a parameter name. /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererBase.java:2292: warning - @param argument "pByteBuffer" is not a parameter name. /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererInterface.java:267: warning - invalid usage of tag > /home/curtis/code/clearvolume/ClearVolume/src/java/clearvolume/renderer/ClearVolumeRendererInterface.java:601: warning - invalid usage of tag > 8 warnings > Task :cmake Usage cmake [options] cmake [options] cmake [options] -S -B Specify a source directory to (re-)generate a build system for it in the current working directory. Specify an existing build directory to re-generate its build system. Run 'cmake --help' for more information. > Task :make FAILED make: *** No targets specified and no makefile found. Stop. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':make'. > Process 'command 'make'' finished with non-zero exit value 2 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 4s 8 actionable tasks: 8 executed ```
nicost commented 2 years ago

Thanks Curtis! Does that script work on the main branch? It runs gradle build -x test distribution instead of gradle build (which also runs a bunch of tests). The scripts barfs for me even earlier, as I do not have cmake installed (and would like to keep it that way). The error on the make task for you is also fair enough, as gradle launches make without arguments or a Makefile present. My PR did not touch that stuff, and believe this was already not working before. gradle build seems to succeed for you.

I don't know anything about the AppVeyor stuff and how to specify the gradle version there. @skalarproduktraum is the plan to move from AppVeyor to github CI?

ctrueden commented 2 years ago

@nicost Yeah, I was just reporting my findings for that quick test I did, in case it is somehow helpful. I'm not sure about the main branch; my first attempt to run ./build.sh just says ./build.sh: line 3: gradle: command not found because I don't have a system-wide gradle, and IIRC on my other machine the installed gradle was too new to successfully build it. I also tried using the gradlew script just now:

$ ./gradlew build

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.17'.

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

Using the build target is something I gleaned from the .travis.yml.

It would be helpful if the README had instructions on the intended process to build from source, since right now I am just guessing.

nicost commented 2 years ago

Fully agree. Since I don't know what the build process is or should be, I am not the one to write that README. All I did is make it build with a gradle version that is supported on github CI (or so I believe). @skalarproduktraum can you enlighten us? I am happy to help, but it is a bit hard without knowing the requirements. For now I have concentrated on building ClearVolume.version.jar, and be able to distribute it using CI, which I now believe to be possible.

skalarproduktraum commented 2 years ago

Hey @nicost and @ctrueden! Apologies again for delays, I'm severely lagging behind on my todos, so this had to wait a bit. I've made some more changes, so all scripts and Gradle stuff is now working again. Appveyor also builds. I've updated the build info on the README, too. As of now, everything looks good and builds again when running ./gradlew build. The library then ends up in build/libs. I've also made a Zulip channel for ClearVolume, so we can discuss a bit more how this project should be handled in the future - please join!

I'll merge this now. Thanks again @nicost for all the effort in making this compatible with Gradle 7.5.1 👍