tronprotocol / libp2p

The p2p system implemented in java language
33 stars 19 forks source link

Building errors #82

Open leonchuk opened 3 months ago

leonchuk commented 3 months ago

1) Building only libp2p (as written here https://github.com/tronprotocol/libp2p)

$ git clone https://github.com/tronprotocol/libp2p.git $ cd libp2p $ git checkout -t origin/main $ ./gradlew clean build -x test

I see an error:

Task :compileJava FAILED /usr/java-tron/libp2p/src/main/java/org/tron/p2p/connection/Channel.java:97: error: cannot find symbol log.warn("Loop in causal chain detected"); ^ symbol: variable log location: class Channel

2) Building java-tron with source libp2p build.gradle => compile project(":libp2p"))

I see an error:

FAILURE: Build failed with an exception.

  • Where: Build file '/usr/java-tron/libp2p/build.gradle' line: 17
  • What went wrong: A problem occurred evaluating project ':libp2p'. Failed to apply plugin [class 'com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin'] This version of Shadow supports Gradle 7.0+ only. Please upgrade.

Help how to get rid of compilation errors at least in one case

317787106 commented 3 months ago

@leonchuk Can you provide your OS and jdk version, even gradle version ? Case 1 is enough.

leonchuk commented 3 months ago

@leonchuk Can you provide your OS and jdk version, even gradle version ? Case 1 is enough.

Ubuntu 22.04.4 LTS openjdk version "1.8.0_412"

gradle like in "libp2p" repository - 6.3 looked here: https://github.com/tronprotocol/libp2p/blob/main/gradle/wrapper/gradle-wrapper.properties

317787106 commented 3 months ago

@leonchuk You can use oracle jdk 1.8 as Readme. Building libp2p requires git and Oracle JDK 1.8 to be installed, other JDK versions are not supported yet.

leonchuk commented 3 months ago

I found a solution: need to add a file "lombok.config" with content

lombok.log.fieldName = log

317787106 commented 3 months ago

I found a solution: need to add a file "lombok.config" with content

lombok.log.fieldName = log

@leonchuk you can sumbit a pull request to develop branch.

leonchuk commented 3 months ago

@leonchuk you can sumbit a pull request to develop branch.

done