sirius-ms / sirius

SIRIUS is a software for discovering a landscape of de-novo identification of metabolites using tandem mass spectrometry. This repository contains the code of the SIRIUS Software (GUI and CLI)
GNU Affero General Public License v3.0
78 stars 17 forks source link

build error on fresh checkout #136

Closed egonw closed 8 months ago

egonw commented 8 months ago

I just made a fresh checkout and had trouble finding the right method to compile from source, so perhaps that is the reason it fails, but it seems to have to do more with a Java/Groovy version conflict?

$ ./gradlew assemble
Downloading https://services.gradle.org/distributions/gradle-7.6-bin.zip
...........10%............20%...........30%............40%............50%...........60%............70%............80%...........90%............100%

Welcome to Gradle 7.6!

Here are the highlights of this release:
 - Added support for Java 19.
 - Introduced `--rerun` flag for individual task rerun.
 - Improved dependency block for test suites to be strongly typed.
 - Added a pluggable system for Java toolchains provisioning.

For more details see https://docs.gradle.org/7.6/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :buildSrc:compileJava
/home/egonw/var/Projects/hub/sirius/buildSrc/src/main/java/SiriusPlatform.java:84: error: cannot find symbol
        return Arrays.stream(SiriusPlatform.values()).filter(it -> it != exclude).toList();
                                                                                 ^
  symbol:   method toList()
  location: interface Stream<SiriusPlatform>
1 error

Help welcome!

(I'm trying to write a patch to update to CDK 2.9)

joXemMx commented 8 months ago

Hi, your error "cannot find symbol" suggests an outdated Java version. What version are you using? The toList() functionality of java.util.stream.Stream was added with Java 16.

egonw commented 8 months ago

What version are you using?

I think I was compiling with Java17, but will explore. Wrong Java version was my first guess.

Update: okay, now it compiles. Sorry for the noise.

egonw commented 8 months ago

@joXemMx, just a quick update, I compiles now. But it turns out that leaves me with half finished things. For example, the sirius_cli ZIP gives me a matching executable but it just seems the java executable. With the GUI I even got less far. I guess this is the clue that suggests it does not know what to build or can build:

> Configure project :
----> Parsing following platform descriptor: Linux-x86-64
----> Following platform detected: LINUX_x86_64
----> LibDir: null
----> includeJreFX:  false | null
----> launch4jJDKPath:  null
----> excludeCbcNative: null
----> excludeJFX: false | null
reading build properties file...

I have been trying to find detailed "building from source" instructions, but have not been able to find that. Where could I find such documenation?

joXemMx commented 8 months ago

I do not think there currently are intructions for this. Anyways, I believe what you are searching for can be done with the distImage gradle tasks. For example, the GUI can be built using ./gradlew sirius-frontend:sirius_dist:sirius_gui_dist:distImage and a standalone CLI with ./gradlew sirius-frontend:sirius_dist:sirius_cli_single_os:distImage.