You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2024/05/05 16:45:55 UTC

(plc4x) branch develop updated: fix: Get the PLC4C build working on windows aarch64 (#1582)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new b2cbfe04ca fix: Get the PLC4C build working on windows aarch64 (#1582)
b2cbfe04ca is described below

commit b2cbfe04ca9b01ac6089ee5788a1bc8c961a7457
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Sun May 5 18:40:04 2024 +0200

    fix: Get the PLC4C build working on windows aarch64 (#1582)
---
 plc4c/pom.xml                            | 63 ++++++++++++++++++++++++++++++++
 pom.xml                                  |  4 +-
 src/main/script/prerequisiteCheck.groovy |  2 +-
 3 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/plc4c/pom.xml b/plc4c/pom.xml
index 4561e02f21..7508753af1 100644
--- a/plc4c/pom.xml
+++ b/plc4c/pom.xml
@@ -374,6 +374,69 @@
       </dependencies>
     </profile>
 
+    <!--
+      In order to build on windows with aarch64 systems, we need to re-deploy an
+      artifact which was unfortunately deployed with the wrong classifier.
+    -->
+    <profile>
+      <id>.os-windows-aarch64</id>
+      <activation>
+        <os>
+          <family>windows</family>
+          <arch>aarch64</arch>
+        </os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>get-aarch64-windows-binaries</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>copy</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>${project.build.directory}/redeploy</outputDirectory>
+                  <artifactItems>
+                    <artifactItem>
+                      <groupId>com.googlecode.cmake-maven-project</groupId>
+                      <artifactId>cmake-binaries</artifactId>
+                      <version>${cmake.version}</version>
+                      <classifier>windows-arm_64</classifier>
+                    </artifactItem>
+                  </artifactItems>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-install-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>install-aarch64-windows-binaries</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <file>${project.build.directory}/redeploy/cmake-binaries-${cmake.version}-windows-arm_64.jar</file>
+                  <groupId>com.googlecode.cmake-maven-project</groupId>
+                  <artifactId>cmake-binaries</artifactId>
+                  <version>${cmake.version}</version>
+                  <classifier>windows-arm64</classifier>
+                  <packaging>jar</packaging>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
     <!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
     <profile>
       <id>jenkins-build</id>
diff --git a/pom.xml b/pom.xml
index 7f25cd4fdd..0c89d03faf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,7 +111,7 @@
     <bouncycastle.version>1.78.1</bouncycastle.version>
     <byte-buddy.version>1.14.14</byte-buddy.version>
     <!-- Be sure to keep this version set to the version of the cmake-maven-plugin -->
-    <cmake-version>3.27.2</cmake-version>
+    <cmake.version>3.27.7-b1</cmake.version>
     <commons-beanutils.version>1.9.4</commons-beanutils.version>
     <commons-cli.version>1.7.0</commons-cli.version>
     <commons-codec.version>1.17.0</commons-codec.version>
@@ -1326,7 +1326,7 @@
           <groupId>com.googlecode.cmake-maven-project</groupId>
           <artifactId>cmake-maven-plugin</artifactId>
           <!-- Not all versions have all types of binaries deployed -->
-          <version>3.27.7-b1</version>
+          <version>${cmake.version}</version>
         </plugin>
 
         <plugin>
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 7f19e3f69b..ef81acfa12 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -203,7 +203,7 @@ def checkGit() {
 // that's why this is the baseline for python.
 def checkPython() {
     def python = project.properties['python.exe.bin']
-    println "Using python executable:   " + python + "        OK"
+    println "Using python executable:    " + python + "        OK"
     print "Detecting Python version:  "
     try {
         def process = (python + " --version").execute()