-
Bug
-
Resolution: Unresolved
-
Major
-
3.15-Interstellar.GA, 3.15.1.ER1, 3.15.1.ER2
-
None
-
False
-
None
-
False
-
---
-
-
Dependency com.aayushatharva.brotli4j:brotli4j requires runtime dependency of com.aayushatharva.brotli4j:native-<arch>. Normally this is managed by brotli's pom, which has profiles like:
<profile>
<id>linux-x86_64</id>
<activation>
<os>
<family>Linux</family>
<arch>amd64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-linux-x86_64</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</profile>
But this does not work properly, if machine that builds the app has different architecture that the one deploying it. For instance we test on OCP instance with aarch64 but local machines has linux_x86_64.
This causes apps with brotli to fail on OCP with:
Caused by: java.lang.UnsatisfiedLinkError: Failed to find Brotli native library in classpath: /lib/linux-aarch64/libbrotli.so
This can be overcomed by manually adding the correct native dependency, but that is not a good solution. Also quarkus-bom (at least upstream) only defines version for brotli4j:native-linux_x86_64. Using any other architecture requires to manually specify the version, which is even worse.