Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to OpenCV 4.5.5 and add Mac M1 architecture #1084 #1125

Merged
merged 3 commits into from
Feb 11, 2022

Conversation

nroduit
Copy link
Member

@nroduit nroduit commented Feb 7, 2022

  • Update to OpenCV 4.5.5
  • Update to charls 2.2.1
  • Update openjepg (January 2022)
  • Mac binaries are now signed
  • Add Mac M1 architecture
  • Replace file extension .jnilib with .dylib (see https://bugs.openjdk.java.net/browse/JDK-8127215 )
  • Add a summary of the requirements:

dcm4che uses a native library for the compression and decompression of images. Here is the list of supported systems and architectures:

System Architecture Package Requirement
Linux x86 64-bit linux-x86-64 GLIBC_2.14
Linux x86 32-bit linux-x86 * GLIBC_2.7
Linux ARM 64-bit linux-aarch64 GLIBC_2.27
Linux ARM 32-bit linux-armv7a GLIBC_2.7
Linux s390x linux-s390x * GLIBC_2.7
Windows x86 64-bit windows-x86-64 Windows 7, 8, 10 or 11
Windows x86 32-bit windows-x86 Windows 7, 8, 10 or 11
Mac OS x86 64-bit macosx-x86-64 Mac OS 10.9 or higher
Mac OS ARM 64-bit macosx-aarch64 Mac OS 11 or higher

* The binary is not included in the dcm4che package but downloaded at the first use.

Copy link
Member

@gunterze gunterze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to include i686 and s390x version in binary distribution package:

diff --git a/dcm4che-assembly/pom.xml b/dcm4che-assembly/pom.xml
index 8ee13852e..3a14c1b4a 100644
--- a/dcm4che-assembly/pom.xml
+++ b/dcm4che-assembly/pom.xml
@@ -544,6 +544,13 @@
       <type>so</type>
       <classifier>linux-x86</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.weasis.thirdparty.org.opencv</groupId>
+      <artifactId>libopencv_java</artifactId>
+      <version>${weasis.opencv.native.version}</version>
+      <type>so</type>
+      <classifier>linux-s390x</classifier>
+    </dependency>
     <dependency>
       <groupId>org.weasis.thirdparty.org.opencv</groupId>
       <artifactId>libopencv_java</artifactId>
diff --git a/dcm4che-assembly/src/main/assembly/component.xml b/dcm4che-assembly/src/main/assembly/component.xml
index 17bf68857..bb8b32ec2 100644
--- a/dcm4che-assembly/src/main/assembly/component.xml
+++ b/dcm4che-assembly/src/main/assembly/component.xml
@@ -231,6 +231,22 @@
       </includes>
       <useProjectArtifact>false</useProjectArtifact>
     </dependencySet>
+    <dependencySet>
+      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+      <outputDirectory>lib/linux-x86</outputDirectory>
+      <includes>
+        <include>*:*:so:linux-x86:*</include>
+      </includes>
+      <useProjectArtifact>false</useProjectArtifact>
+    </dependencySet>
+    <dependencySet>
+      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+      <outputDirectory>lib/linux-s390x</outputDirectory>
+      <includes>
+        <include>*:*:so:linux-s390x:*</include>
+      </includes>
+      <useProjectArtifact>false</useProjectArtifact>
+    </dependencySet>
     <dependencySet>

Not sure about appropriate sub directory names in the distribution package. NativeLibraryResourceLoader of jboss-modules expects linux-i686 for x86 32-bit arch - and it does not support loading s390x native libraries, so I agree to keep the s390x version excluded from dcm4che-jboss-modules assembly.

@nroduit
Copy link
Member Author

nroduit commented Feb 10, 2022

The directory name must match with the package name in the table above.

@gunterze
Copy link
Member

The directory name must match with the package name in the table above.

So

+    <dependencySet>
+      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+      <outputDirectory>lib/linux-x86</outputDirectory>
+      <includes>
+        <include>*:*:so:linux-x86:*</include>
+      </includes>
+      <useProjectArtifact>false</useProjectArtifact>
+    </dependencySet>
+    <dependencySet>
+      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+      <outputDirectory>lib/linux-s390x</outputDirectory>
+      <includes>
+        <include>*:*:so:linux-s390x:*</include>
+      </includes>
+      <useProjectArtifact>false</useProjectArtifact>
+    </dependencySet>

looks ok for you? @nroduit

We may think about to provide os-arch specific binary distribution packages to reduce download bandwidth in a separate step...

@gunterze gunterze merged commit c72a401 into dcm4che:master Feb 11, 2022
@gunterze gunterze added this to the 5.26.0 milestone Feb 11, 2022
@gunterze gunterze added the dependencies Pull requests that update a dependency file label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants