openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.02k stars 3.09k forks source link

Build on FreeBSD failing with: Syntax error: ")" unexpected" #3783

Open tuaris opened 3 weeks ago

tuaris commented 3 weeks ago

Describe the Bug

Build fails on FreeBSD 14.1 with JDK 17 and NPM 10.8.3 with

Syntax error: ")" unexpected"
Syntax error: Error in command substitution

I suspect it is probably some kind of Linuxism.

Steps to Reproduce

On FreeBSD 14.1-RELEASE, install dependencies:

pkg install -y openjdk17 npm maven

Set Java version (if multiple JDK's installed)

export JAVA_VERSION=17

Clone repository as explained in quickstart instructions.

git clone https://github.com/openzipkin/zipkin
cd zipkin

Run build

./mvnw -T1C -X -e -q --batch-mode -DskipTests --also-make -pl zipkin-server clean package

Build fails (partial log shown)

[INFO] Running 'npm install' in /usr/home/daniel/Shared/Development/zipkin/zipkin-lens
[DEBUG] Executing command line [/usr/home/daniel/Shared/Development/zipkin/zipkin-lens/target/node/node, /usr/home/daniel/Shared/Development/zipkin/zipkin-lens/target/node/node_modules/npm/bin/npm-cli.js, install]
ELF binary type "3" not known.
[INFO] /usr/home/daniel/Shared/Development/zipkin/zipkin-lens/target/node/node: 1: Syntax error: ")" unexpected
[INFO] /usr/home/daniel/Shared/Development/zipkin/zipkin-lens/target/node/node: 1: Syntax error: Error in command substitution
[DEBUG] incrementalBuildHelper#afterRebuildExecution
[WARNING] /usr/home/daniel/Shared/Development/zipkin/zipkin-tests/src/main/java/zipkin2/storage/ITStorage.java:[206,31] [StringCaseLocaleUsage] Specify a `Locale` when calling `String#to{Lower,Upper}Case`. (Note: there are multiple suggested fixes; the third may be most appropriate if you're dealing with ASCII Strings.)
    (see https://errorprone.info/bugpattern/StringCaseLocaleUsage)
  Did you mean 'result = result.toLowerCase(Locale.ROOT);' or 'result = result.toLowerCase(Locale.getDefault());' or 'result = Ascii.toLowerCase(result);'?
[WARNING] /usr/home/daniel/Shared/Development/zipkin/zipkin-tests/src/main/java/zipkin2/storage/ITServiceAndSpanNames.java:[84,43] [StreamToIterable] Using stream::iterator creates a one-shot Iterable, which may cause surprising failures.
    (see https://errorprone.info/bugpattern/StreamToIterable)
  Did you mean '.containsExactlyInAnyOrderElementsOf(spans.stream().map(Span::remoteServiceName).collect(toImmutableList()));'?
[WARNING] /usr/home/daniel/Shared/Development/zipkin/zipkin-tests/src/main/java/zipkin2/storage/ITServiceAndSpanNames.java:[161,43] [StreamToIterable] Using stream::iterator creates a one-shot Iterable, which may cause surprising failures.
    (see https://errorprone.info/bugpattern/StreamToIterable)
  Did you mean '.containsExactlyInAnyOrderElementsOf(spans.stream().map(Span::name).collect(toImmutableList()));'?

Expected Behavior

Build should succeed

Full Log

zipkin.log